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_full] Build version 16 #6777
Conversation
Ambitious, but I like it xD. I need to look at our patch list and rebase them appropriately. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this patch for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I have no clue why it fails to apply
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Especially because it works locally, but then it fails to apply the templates patch.
|
Ok, let's start with the fun errors:
|
And here we go |
I think we now need C++17? |
https://llvm.org/docs/GettingStarted.html#software says gcc 7 is the minimum requirement and we're using that already
|
Should we rebase it to 16.0.4? |
It seems GCC8 did make a difference. |
But now do we want to talk about
https://buildkite.com/julialang/yggdrasil/builds/3136#01884a92-6e09-4021-bbfa-ca61d3742a74 which fails on Edit: restarting the job got past that error, which would confirm that's a race condition. |
And
According to https://en.cppreference.com/w/cpp/memory/c/aligned_alloc |
What version of glibc are we targeting? https://stackoverflow.com/questions/52777209/compiler-cant-find-aligned-alloc-function |
Right % julia --compile=min -e 'using BinaryBuilderBase; BinaryBuilderBase.runshell(Platform("x86_64", "linux"); preferred_gcc_version=v"8")'
sandbox:${WORKSPACE} # echo '#include <cstdlib>' | c++ -x c++ -E -dM - | grep GLIBCXX_HAVE_AL
sandbox:${WORKSPACE} #
logout
% julia --compile=min -e 'using BinaryBuilderBase; BinaryBuilderBase.runshell(Platform("aarch64", "linux"); preferred_gcc_version=v"8")'
sandbox:${WORKSPACE} # echo '#include <cstdlib>' | c++ -x c++ -E -dM - | grep GLIBCXX_HAVE_AL
#define _GLIBCXX_HAVE_ALIGNED_ALLOC 1
sandbox:${WORKSPACE} #
logout
[mose@dream]/tmp/tmp.PUce7Bs0Uk% julia --compile=min -e 'using BinaryBuilderBase; BinaryBuilderBase.runshell(Platform("powerpc64le", "linux"); preferred_gcc_version=v"8")'
sandbox:${WORKSPACE} # echo '#include <cstdlib>' | c++ -x c++ -E -dM - | grep GLIBCXX_HAVE_AL
#define _GLIBCXX_HAVE_ALIGNED_ALLOC 1
sandbox:${WORKSPACE} # Sigh. |
https://linux.die.net/man/3/aligned_alloc
🪦 |
Maybe we can add a patch, though I'm worried it might use other C11 features |
792c286
to
48a3af8
Compare
Failure to build for |
simdjson/simdjson#578 the tie issue. |
This makes it work for me. But it seems to bump it to 11.3 because of the libc++ bug. And we use the system one IIRC. diff --git a/L/LLVM/common.jl b/L/LLVM/common.jl
index 548d5a24..c5f9e343 100644
--- a/L/LLVM/common.jl
+++ b/L/LLVM/common.jl
@@ -23,7 +23,7 @@ const buildscript = raw"""
# We want to exit the program if errors occur.
set -o errexit
-if [[ ("${target}" == x86_64-apple-darwin*) && ("${LLVM_MAJ_VER}" -ge "15") ]]; then
+if [[ ("${target}" == x86_64-apple-darwin*) && ("${LLVM_MAJ_VER}" -eq "15") ]]; then
# LLVM 15 requires macOS SDK 10.14, see
# <https://github.com/JuliaPackaging/Yggdrasil/pull/5592#issuecomment-1309525112> and
# references therein.
@@ -35,6 +35,16 @@ if [[ ("${target}" == x86_64-apple-darwin*) && ("${LLVM_MAJ_VER}" -ge "15") ]];
popd
fi
+if [[ ("${target}" == *-apple-darwin*) && ("${LLVM_MAJ_VER}" -ge "16") ]]; then
+ # LLVM 16 exposes a libc++ that needs 11.3
+ pushd $WORKSPACE/srcdir/MacOSX11.*.sdk
+ rm -rf /opt/${target}/${target}/sys-root/System
+ cp -ra usr/* "/opt/${target}/${target}/sys-root/usr/."
+ cp -ra System "/opt/${target}/${target}/sys-root/."
+ export MACOSX_DEPLOYMENT_TARGET=11.3
+ popd
+fi
+
if [[ ${bb_full_target} == *-sanitize+memory* ]]; then
# Install msan runtime (for clang)
cp -rL ${prefix}/lib/linux/* /opt/x86_64-linux-musl/lib/clang/*/lib/linux/
@@ -592,6 +602,10 @@ function configure_build(ARGS, version; experimental_platforms=false, assert=fal
"0f03869f72df8705b832910517b47dd5b79eb4e160512602f593ed243b28715f"))
end
if version >= v"16"
+ push!(sources,
+ ArchiveSource(
+ "https://github.com/alexey-lysiuk/macos-sdk/releases/download/11.3/MacOSX11.3.tar.bz2",
+ "d6604578f4ee3090d1c3efce1e5c336ecfd7be345d046c729189d631ea3b8ec6"))
push!(dependencies,
# On Intel Linux platforms we use glibc 2.12, but building LLVM 16
# requires glibc 2.16+. |
For future reference, the errors we're facing with macOS are
|
As discussed on Slack, we may want to disable AMDGPU target on platforms where we trigger the libc++ bug, that is macOS (FreeBSD seems to be good?) |
Why is this still trying to build AMDGPU 😠 |
206111c
to
527b777
Compare
L/LLVM/common.jl
Outdated
CMAKE_CXX_FLAGS+=(-fno-gnu-unique) | ||
fi | ||
|
||
# LLVM 16 requires `align_alloc`, make it available for Intel Linux platforms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This hack should probably be removed now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this solved by the glibc bump?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should have been, yes
Also should disable NVIDIA there, if we don't already, since drivers for that haven't existed for many years |
@giordano do we have a way to only rebuild macos, or do we just let ccache do it's thing? |
No, it's only all or nothing. But a hot ccache rebuild should take relatively little, in the range of 5 minutes for the build proper (audit is much longer though) |
Co-authored-by: Gabriel Baraldi <baraldigabriel@gmail.com> Co-authored-by: Valentin Churavy <vchuravy@users.noreply.github.com>
Just to start the ride, it'll likely have problems. CC: @gbaraldi