-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Julia fails to build on on aarch64 because libquadmath.so is not available #41613
Comments
Are you sure you have all required dependencies installed? There's also #36617. What system are you trying to build on? |
I am trying to build on openSUSE Tumbleweed aarch64, with GCC11. |
I just noticed you're trying to build 1.6.1 - I don't think 1.6.1 had even build support on aarch64. The issue I linked is about getting it to work in the future (motivated by Apple's recent move to that architecture) and has only recently begun to work. Do the official 1.7 beta binaries work? If so, you can try building 1.7 from source, which will probably work better than 1.6.1. |
Fiddling around with the download links on julialang.org/downloads, there were binaries available for aarch64 and 1.6.1, so I suspect there's something going on with your setup. Perhaps the libraries are in a non-standard place, making julia unable to find them? |
Any chance to try with GCC 9 or 10? Also, why don't you simply use the official binaries (aarch64 is Tier 1, since it's also tested in CI)? |
The policy of the Linux distribution is to rebuild from sources, not using pre-built binaries. |
It also fails with GCC7 |
What if you remove line Line 213 in 8c97995
? But I'm confused, because this platform is Tier 1 and tested regularly 😕 |
From some digging, I don't think libquadmath is supposed to exist on aarch64 platforms. At first glance, checking the Fedora GCC builds shows that libquadmath is only enabled on x86_64/ppc64le/ia64:
Second, there was this somewhat recent bug in upstream GCC (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96016) that says libquadmath fails to configure on aarch64 because it tries to detect if This begs the question, what is different about the CI builds for aarch64 and the original reporter's build? @ggardet can you please post your entire configure line so we can see the options you are building with? |
With
|
If I drop this line, the build of julia 1.6.3 succeeds on aarch64 as well as on x86_64. |
And what if you replace that line with
? Allowing the library not to be there is used in Lines 215 to 218 in 8c97995
which are other libraries which are not available on all platforms. Again, no idea how the build bot currently works at all. |
It is probably succeeding on the buildbot because the official packaging is using the BinaryBuilder-provided CSL, which is automatically extracted into the local lib directory. The build showing the issue is using the system CSL (it defines The way to fix this would be to guard this line inside an exclusion for aarch64 (I don't think we want to unconditionally make it allowed to fail, since in all other cases it being missing is probably a problem). Line 213 in 8c97995
And now that I think about it some more, shouldn't that line be inside this check as well? Line 210 in 8c97995
Since I think libquadmath is only available if gfortran is available (or at least it is packaged in the gfortran CSL tar). And as a note, this line should probably get a different comment (since it currently reads that the libquadmath is available on all platforms). Lines 64 to 65 in 27c0291
|
But CSL doesn't provide libquadmath for aarch64 |
Yes, but because the build isn't being told to use the system version (via Line 213 in 8c97995
will only be run when this condition is satisfied, with $1 being CSL for libquadmath - making this line only run when the variable USE_SYSTEM_CSL is not equal to 0.Lines 183 to 185 in 8c97995
Because that line actually adds the symlink target to the list of targets to run in the full symlink target here Line 268 in 8c97995
So because USE_SYSTEM_CSL=1 is given in the build options, the symlink_system_libraries step of the build will try to symlink libquadmath.so into the local directory. On the buildbot version though, USE_SYSTEM_CSL=0 is used, so symlink_system_libraries will not try to make a symlink.
|
Build also succeeds with |
I should have some time to pull out my aarch64 board and make the needed changes to the makefile this weekend and will submit a PR after that. |
Might also be good to look into #43071 🙂 |
That one seems to have been fixed by a clean checkout of the branch, so it probably was just a weird state issue. Were you thinking of a different issue? |
...and manually setting Lines 888 to 894 in f458b07
|
As mention in upstream report above, libquadmath is only used in the situation which has no 128bit long double type. In Aarch64 and riscv, it has 128bit long double type. So julia shouldn't use libquadmath on these architectures. It can be detected by check |
@ggardet Are you able to try with 1.9.1 or master? |
Still the same error with julia 1.9.1 and gcc13, built for openSUSE Tumbleweed aarch64. |
We have been reliably building on aarch64 for a while now. Please reopen if still an issue with the latest release or master. |
@ggardet this might be too late but i found out that the gcc specfile in opensuse disabled quadmath... i am currently forcing julia to use the patched libraries so i can update it to 1.10.3. Unfortunately, like i mentioned, aarch64 will be disabled :) |
This is still broken with 1.10.3:
But I cannot re-open. |
I think you should open a ticket to the openSUSE bugzilla. like i said, libquadmath is disabled in opensuse aarch64 of gcc. check out the specfile EDIT: see https://build.opensuse.org/projects/devel:gcc/packages/gcc13/files/gcc13.spec?expand=1 line 50 |
As I said above, I don't think libquadmath is supported for aarch64, so our linking to it is the error here, not the fact it is missing in the distros. (I can't find anything that seems to say for certain that aarch64 isn't supported with libquadmath, so maybe @fxcoudert can comment on that?) |
i am not saying that libquadmath isn't supported. it's that it's disabled in opensuse so i suggested to open a ticket to opensuse bugzilla. you can see the line 50 from the link I posted, aarch64 was not added as the libquadmath_arch. since it's disabled, it also means Julia can't build because it can't locate a non-existing libquadmath.so. I maintain both julia and juliaup in openSUSE. you can see why I disabled aarch64 starting from line 264 https://build.opensuse.org/projects/openSUSE:Factory/packages/julia/files/julia.spec?expand=1 EDIT: I still hope I am wrong but I am not too hopeful because that line 50 from the gcc link is why. I don't know when that happened tbh. |
How do we build Julia on aarch64 linux in our build infrastructure (presumably which is ubuntu)? |
In the Base Julia Buildkite CI, we do not have this flag set. Thus, our CI uses BinaryBuilder to provide various binary dependencies. |
According to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96016 libquadmath is not supported on aarch64. libquadmath is not enabled on aarch64 within Fedora and Debian either. |
I guess it won't be a surprise that openSUSE have the same idea and also disabled libquadmath on aarch64. I guess this means we really cannot fix this issue then by ourselves and hope that one day libquadmath is properly supported (?). BUT, this comment from the discussion is interesting https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96016#c1
Does this mean that we don't really need libquadmath??? I will open a ticket to bugzilla and confirm if that's the case or might open a question to https://forums.opensuse.org |
No, as I said earlier in the thread during the analysis of the issue, the problem lies inside the Julia Makefiles/build system. The error is occurring when trying to make symlinks to the libraries, not when doing any actual building. |
On aarch64-linux, the 128-bit floating-point type is On aarch64-darwin, On other aarch64 targets, I do not know. |
But how come it doesn't break in CI, since we regularly build aarch64 linux builds? |
That has been answered three years ago already: we don't touch that code path in our builds. |
A logical fix would be this:
Edit: I see it was already proposed by @giordano at #41613 (comment) |
@ggardet Can you please test one of the binaries built in https://build.opensuse.org/projects/home:uncomfyhalomacro:branches:science/packages/julia/repositories/openSUSE_Tumbleweed/binaries ? I would really appreciate if you can test it. I don't own an aarch64 machine sadly. |
Build works, but I get the following error on run:
I guess the build machine is a |
That's because the build system should set JULIA_CPU_TARGETS="generic;cortex-a57;thunderx2t99;carmel,clone_all;apple-m1,base(3);neoverse-512tvb,base(3)" See e.g. https://discourse.julialang.org/t/unexpected-precompilation-in-binder-based-on-docker-image/114473 |
I used |
Thanks for the heads up! I will update it. |
…54605) Fix #41613. Co-authored-by: FX Coudert <[email protected]> (cherry picked from commit e5549c2)
…54605) Fix #41613. Co-authored-by: FX Coudert <[email protected]> (cherry picked from commit e5549c2)
…uliaLang#54605) Fix JuliaLang#41613. Co-authored-by: FX Coudert <[email protected]>
Julia fails to build on aarch64 because
libquadmath.so
is not available on this arch.Log:
The text was updated successfully, but these errors were encountered: