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

Rebuild LLVM 6.0.1 #1915

Closed
wants to merge 9 commits into from
Closed

Conversation

fingolfin
Copy link
Member

... to resolve issues on PowerPC due to a "too new glibc".

@giordano
Copy link
Member

giordano commented Oct 18, 2020

@vchuravy any clue about the failure for macOS:

[15:55:28] ninja: job failed: /opt/bin/clang --target=x86_64-apple-darwin14 --sysroot=/opt/x86_64-apple-darwin14/x86_64-apple-darwin14/sys-root -DKERNEL_USE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iprojects/compiler-rt/lib/builtins -I/workspace/srcdir/llvm-project/compiler-rt/lib/builtins -Iinclude -I/workspace/srcdir/llvm-project/llvm/include -O3 -DNDEBUG -arch x86_64    -isysroot /opt/x86_64-apple-darwin14/x86_64-apple-darwin14/sys-root -mmacosx-version-min=10.5 -fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer -arch x86_64 -mkernel -MD -MT projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.cc_kext_x86_64_osx.dir/atomic.c.o -MF projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.cc_kext_x86_64_osx.dir/atomic.c.o.d -o projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.cc_kext_x86_64_osx.dir/atomic.c.o   -c /workspace/srcdir/llvm-project/compiler-rt/lib/builtins/atomic.c
[15:55:28] /workspace/srcdir/llvm-project/compiler-rt/lib/builtins/atomic.c:257:1: error: atomic load requires runtime support that is not available for this target
[15:55:28] OPTIMISED_CASES
[15:55:28] ^
[15:55:28] /workspace/srcdir/llvm-project/compiler-rt/lib/builtins/atomic.c:238:3: note: expanded from macro 'OPTIMISED_CASES'
[15:55:28]   OPTIMISED_CASE(16, IS_LOCK_FREE_16, __uint128_t)
[15:55:28]   ^
[15:55:28] /workspace/srcdir/llvm-project/compiler-rt/lib/builtins/atomic.c:250:12: note: expanded from macro 'OPTIMISED_CASE'
[15:55:28]     return __c11_atomic_load((_Atomic(type)*)src, model);\
[15:55:28]            ^
[15:55:28] /workspace/srcdir/llvm-project/compiler-rt/lib/builtins/atomic.c:272:1: error: atomic store requires runtime support that is not available for this target
[15:55:28] OPTIMISED_CASES
[15:55:28] ^
[15:55:28] /workspace/srcdir/llvm-project/compiler-rt/lib/builtins/atomic.c:238:3: note: expanded from macro 'OPTIMISED_CASES'
[15:55:28]   OPTIMISED_CASE(16, IS_LOCK_FREE_16, __uint128_t)
[15:55:28]   ^
[15:55:28] /workspace/srcdir/llvm-project/compiler-rt/lib/builtins/atomic.c:263:5: note: expanded from macro 'OPTIMISED_CASE'
[15:55:28]     __c11_atomic_store((_Atomic(type)*)dest, val, model);\
[15:55:28]     ^
[15:55:28] 2 errors generated.
[15:55:28] ninja: subcommands failed
[15:55:28]  ---> ninja -j${nproc} -vv
[15:55:28] Previous command exited with 1
[15:55:28] Child Process exited, exit code 1

?

@vchuravy
Copy link
Member

vchuravy commented Oct 18, 2020 via email

@fingolfin fingolfin marked this pull request as draft October 18, 2020 21:24
@vchuravy
Copy link
Member

The error is tres bizzare. The codepath exists in later LLVM versions and the builds are all using the same target, and the same compiler...

You could try setting -DCOMPILER_RT_EXCLUDE_ATOMIC_BUILTIN:Bool=On, but I am very confused.

@vchuravy
Copy link
Member

I suspect that those binaries were build from https://github.com/staticfloat/LLVMBuilder/blob/2c3b8c674f2d5bfecf38448ba96fa0c0ce656def/build_tarballs.jl and/or later so they are pre-historic.

@staticfloat do you recall when we added Clang as a compiler for BB? I suspect that we used to build these with GCC.

@fingolfin fingolfin force-pushed the mh/LLVM-6.0.1 branch 3 times, most recently from fec515f to 1406bb5 Compare October 21, 2020 14:36
@fingolfin fingolfin force-pushed the mh/LLVM-6.0.1 branch 2 times, most recently from 7c87dac to 62b36ba Compare October 30, 2020 11:32
@fingolfin
Copy link
Member Author

Now tried to make it compile using GCC. That gives a different error: it tries to pass -allow-shlib-undefined to ld, but that rejects it as an "unknown option".

@fingolfin
Copy link
Member Author

I experimented some more, switching this to use GCC as compiler. After some patching around, the latest errors on the Apple target is ld: unknown option: -rpath-link. Grepping through the LLVM build system, it is clear that inside the CMake files, the variable APPLE is not set to true; so all these errors I am battling with are consequence of that. I am also seeing this:

[19:58:57] CMake Warning:
[19:58:57]   Manually-specified variables were not used by the project:
[19:58:57] 
[19:58:57]     DARWIN_macosx_OVERRIDE_SDK_VERSION

@giordano giordano added the julia 💜 ❤️ 💚 Builders and issues related to Julia and its dependencies label Nov 3, 2020
@fingolfin fingolfin closed this Jan 21, 2021
@fingolfin fingolfin deleted the mh/LLVM-6.0.1 branch January 22, 2021 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
julia 💜 ❤️ 💚 Builders and issues related to Julia and its dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants