Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM does no compile on current macOS #1

Open
schoeberl opened this issue Jul 16, 2020 · 6 comments
Open

LLVM does no compile on current macOS #1

schoeberl opened this issue Jul 16, 2020 · 6 comments

Comments

@schoeberl
Copy link
Member

on macOS Catalina the build crashes with:

fatal error: error in backend: Cannot select: 0x7fcbd0020068: ch = AtomicFence
      0x7fcbd6d1db38, Constant:i32<7>, Constant:i32<0>
  0x7fcbd0020340: i32 = Constant<7>
  0x7fcbd0020548: i32 = Constant<0>
@mortbopet
Copy link
Member

Is this from running the build.sh script?

I would need to look further into it, but my initial thoughts are that if this is an error occurring when LLVM tries to run some tests on the compiled backend (and in this, not an issue in the backend of the compiler which you are using to compile LLVM), then it would make perfect sense, since no instruction selection for atomic instructions has been implemented, obviously given the lack of support for this in the ISA.

So again, i would have to look in to when this error happens in the build process - would it be possible to post some further information about when it occurs?

@schoeberl
Copy link
Member Author

Probably this is an issue with the setup of compiling target llvm with a host llvm. More context:

[  8%] Building C object CMakeFiles/clang_rt.hard_pic_x86_64_macho_embedded.dir/atomic_thread_fence.c.o
clang-8: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
clang-8: warning: argument unused during compilation: '-arch i386' [-Wunused-command-line-argument]
clang-8: warning: argument unused during compilation: '-march=pentium' [-Wunused-command-line-argument]
clang-8: /Users/martin/leros-dev/leros-lib/compiler-rt/lib/builtins/atomic_flag_test_and_set_explicit.c:25:10:warning : argument unused during compilation: '-arch x86_64' [-Wunused-command-line-argument]warning: 
clang-8
:       largewarning : atomic argument unused during compilation: '-arch x86_64' [-Wunused-command-line-argument]operation 
may incur significant performance penalty
      [-Watomic-alignment]
  return __c11_atomic_exchange(&(object)->_Value, 1, order);
         ^
1 warning generated.
clang-8: warning: argument unused during compilation: '-arch x86_64' [-Wunused-command-line-argument]
clang-8: warning: argument unused during compilation: '-arch x86_64' [-Wunused-command-line-argument]
fatal error: error in backend: Cannot select: 0x7fe6ca811468: ch = AtomicFence
      0x7fe6da51d668, Constant:i32<7>, Constant:i32<0>
  0x7fe6ca811740: i32 = Constant<7>
  0x7fe6ca811948: i32 = Constant<0>
In function: atomic_signal_fence
1 warning generated.
clang-8: error: clang frontend command failed with exit code 70 (use -v to see invocation)

@mortbopet
Copy link
Member

Could be... to narrow in on the issue, i would suggest compiling the LLVM version which Leros-LLVM points to (ee0e48f), just to figure out whether there is an issue in our codebase, or in your compilation setup.

It's been quite a while since Leros-LLVM synced with upstream, but this should nevertheless not suddenly infer errors.

@schoeberl
Copy link
Member Author

In this commit there is no build.sh. How to compile?

@mortbopet
Copy link
Member

@schoeberl
Copy link
Member Author

Now it fails with:

[ 67%] Building CXX object tools/leros-clang/lib/Basic/CMakeFiles/clangBasic.dir/Targets.cpp.o
/Users/martin/leros-dev/leros-llvm/tools/leros-clang/lib/Basic/Targets.cpp:387:22: error: 
      no member named 'leros32' in 'llvm::Triple'
  case llvm::Triple::leros32:
       ~~~~~~~~~~~~~~^
/Users/martin/leros-dev/leros-llvm/tools/leros-clang/lib/Basic/Targets.cpp:391:22: error: 
      no member named 'leros64' in 'llvm::Triple'
  case llvm::Triple::leros64:
       ~~~~~~~~~~~~~~^
2 errors generated.
gmake[2]: *** [tools/leros-clang/lib/Basic/CMakeFiles/clangBasic.dir/build.make:621: tools/leros-clang/lib/Basic/CMakeFiles/clangBasic.dir/Targets.cpp.o] Error 1
gmake[2]: Leaving directory '/Users/martin/leros-dev/leros-llvm/builddir'
gmake[1]: *** [CMakeFiles/Makefile2:24009: tools/leros-clang/lib/Basic/CMakeFiles/clangBasic.dir/all] Error 2
gmake[1]: Leaving directory '/Users/martin/leros-dev/leros-llvm/builddir'
gmake: *** [Makefile:150: all] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants