-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
llvmPackages_13: Fix the build on AArch64 #136574
Conversation
The compiler-rt build was failing with: /build/source/compiler-rt/build/lib/fuzzer/libcxx_fuzzer_aarch64/include/c++/v1/__config:1065:41: error: a destructor cannot be 'constexpr' 1065 | # define _LIBCPP_CONSTEXPR_AFTER_CXX17 constexpr | ^~~~~~~~~ make[5]: *** [cxx/src/CMakeFiles/cxx_static.dir/build.make:303: cxx/src/CMakeFiles/cxx_static.dir/optional.cpp.o] Error 1 make[2]: *** [lib/fuzzer/CMakeFiles/libcxx_fuzzer_aarch64-build.dir/build.make:80: lib/fuzzer/libcxx_fuzzer_aarch64-stamps/libcxx_fuzzer_aarch64-build] Error 2 See: - https://hydra.nixos.org/job/nixpkgs/trunk/llvmPackages_13.compiler-rt.aarch64-linux/all - https://hydra.nixos.org/log/nlcppawcbnpff23mdxxk6ianrwp8p7j7-compiler-rt-libc-13.0.0-rc2.drv
@ofborg build llvmPackages_13 Let's see if this is enough. |
Unfortunately it now fails during the linking:
I don't have enough time to have a look at it. |
FYI this is because libcxx and compiler-rt have different minimum compiler requirements to core LLVM. As per https://libcxx.llvm.org/#platform-and-compiler-support we need at least GCC 11 to build these, but it looks like you tried with GCC 9.3 and GCC 10. |
Before that message I'm seeing many errors similar to:
Cursory research seems to indicate this is caused by Because the build is targeting the base ARMv8.0 instruction set atomic operations are not guaranteed to be available (they are part of Armv8.1-A), so helpers from Potential fixes include setting I just tried to build llvm using GCC11 with
I'll try GCC10 next. |
Tests seem to fail at random points ( So the build is probably fine, I just can't verify it. @primeos Can you pick this back up from here? |
I've debugged this with @BBBSnowball for a few more hours. The issue for the problem is #36947. |
The compiler-rt build was failing with:
/build/source/compiler-rt/build/lib/fuzzer/libcxx_fuzzer_aarch64/include/c++/v1/__config:1065:41: error: a destructor cannot be 'constexpr'
1065 | # define _LIBCPP_CONSTEXPR_AFTER_CXX17 constexpr
| ^~~~~~~~~
make[5]: *** [cxx/src/CMakeFiles/cxx_static.dir/build.make:303: cxx/src/CMakeFiles/cxx_static.dir/optional.cpp.o] Error 1
make[2]: *** [lib/fuzzer/CMakeFiles/libcxx_fuzzer_aarch64-build.dir/build.make:80: lib/fuzzer/libcxx_fuzzer_aarch64-stamps/libcxx_fuzzer_aarch64-build] Error 2
See:
Motivation for this change
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)