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

Use __ARM_ACLE to guard inclusion of arm_acle.h #2264

Merged
merged 2 commits into from
Mar 18, 2025

Conversation

lgoettgens
Copy link
Contributor

When trying to build FLINT v3.2.0 with julia's BinaryBuilder (to produce the julia package FLINT_jll.jl that is a dependency of Nemo.jl), the build for aarch64-linux-gnu failed with the following error message:

[23:35:30] /workspace/srcdir/flint-3.2.0/src/ulong_extras/revbin.c: In function ‘n_revbin’:
[23:35:30] /workspace/srcdir/flint-3.2.0/src/ulong_extras/revbin.c:29:9: error: implicit declaration of function ‘__rbitll’ [-Werror=implicit-function-declaration]
[23:35:30]      n = __rbitll(n);
[23:35:30]          ^~~~~~~~

(full log at https://buildkite.com/julialang/yggdrasil/builds/18605#01958cb4-1ad1-4dac-87ea-34869cf00fad/689-11246)

This could be due to BinaryBuilder.jl using very old compilers for maximum compatibility of produced libraries; the above error was produced with GCC v6.

#2245 added a check wether the arm_acle.h header contains the rbit instruction. However, it does not check if the arm_acle.h header even exists in the first place.
According to https://github.com/ARM-software/acle/releases/download/r2024Q4/acle-2024Q4.pdf, Section 3.5.1, one can test this by checking for __ARM_ACLE (as this PR does).

Adding the patch from this PR to the BinaryBuilder.jl script fixed the above build failure, so I thought it would be good to upstream this.

@albinahlback albinahlback merged commit edb0669 into flintlib:main Mar 18, 2025
9 of 10 checks passed
@albinahlback
Copy link
Collaborator

Good catch, thanks!

@lgoettgens
Copy link
Contributor Author

If you do another 3.2 patch release, I think this would be great to have in there. But please don't spend the time just for this patch, only if you have other reasons to do it.

@albinahlback
Copy link
Collaborator

I will make sure to include it if we push 3.2.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

Successfully merging this pull request may close these issues.

2 participants