-
Notifications
You must be signed in to change notification settings - Fork 644
[FLINT] Update to 3.1 #8237
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
[FLINT] Update to 3.1 #8237
Conversation
|
Bumping the MPFR version to 4.2.0 is problematic as I think this will make it incompatible with all julia versions before 1.10. GMP 6.2.1 is available since 1.6.7, so that should be fine. What kind of incompatibility is there between mpfr 4.1.1 and gmp 6.2.1? The most recent MPFR_jll 4.1.1 was built with that GMP version: https://github.com/JuliaPackaging/Yggdrasil/pull/5904/files#diff-f62dea2b4cf76ca6d7ed4b810e53476d7cfd237f5fd9cc221a9c7c251f968335L44 The x86-64 apple build complains about the use of Not sure if |
|
I was under the impression that the GMP and MPFR versions for the jll packages were not directly tied to the version Julia uses? But I could definitely be wrong on this. I tried to run the tests for Arblib.jl with the updated FLINT_jll under Julia 1.6 and it seems to work fine. I don't know if things could be broken in some unexpected way though? Looking at the history of MPFR_jll I agree that it seems like 4.1.1 should be built with GMP 6.2.1. But if I change the MPFR version to 4.1.1 in the build script I get the following error I'm not sure why this is the case |
|
You have to carefully distinguish between compiletime and later runtime: when using a JLL, then GMP will already be loaded, because Julia loaded it; so we end up using the same GMP as Julia (or else we go bust). So we must be compatible with that. The way binary interfaces work, that means the JLL must be built and linked against a version of GMP which is not newer than the version used by Julia -- though it can be older (I am simplifying a bit, it can't be "too old" of course, but that's not relevant for the versions we are talking about). The same rule holds for MPFR. So in general the safest thing is to build against the oldest possible version of both GMP and MPFR, then things are compatible with all the newer versions, too. Regarding the "Unsatisfiable requirements" error, we can help debug that, but the first thing I'd suggest to try is to just leave the GMP and MPFR dependencies exactly as they were -- unless you have an explicit reason why they should be changed? If that also gives an error, we can look deeper. |
|
Since this commit Flint has GMP 6.2.1 as minimal dependency. That commit also sets the minimal MPFR version to 4.2.0, but that was later downgraded to 4.1.0 in this commit. The GMP requirement has been moved around a bit in the code but is still 6.2.1, see this line |
|
I do think that the compat entry in the registry is wrong: There is only one compat entry for MPFR 4.1.1 which restricts GMP to exactly 6.2.0. I think this might have been caused by some old BinaryBuilder version setting an overly restrictive compat entry when passing a specific build version? I think we should either remove that line or change it to |
|
Regarding the x86_64-apple build I realize I never tried to build that one myself. The Flint repository build for that system seems to work though, see for example the build log here. For that build the configuration check |
|
We do require C11, but it does seem like I have to add a check for I will push a fix for this in a new version 3.1.1. Thanks for making me aware of this! |
|
@Joel-Dahne Can you try with the newest release v3.1.1? |
|
Seemed to work fine when building locally for apple, lets see if all the other cases as happy as well! |
|
The failures are due to some instances using a cached version of the Flint repository that doesn't contain the new commit. I'm not sure why they are not fetching the latest version of the repository. It is possibly related to that the new commit is not on any branch. It seems like everything should work as long as we get them to not used the cached version thought! Thank you for the quick patch Albin! |
|
The builders seem to all be happy now! That leaves the issue with the GMP compatibility for MPFR. Looking at the history of I noticed that Flint only depends on MPFR 4.1.0, and this version of MPFR_jll doesn't have the 6.2.0 compat. I tried building against 4.1.0 locally for linux and that seemed to work. However the The only solution that I see is to get the compat for 4.1.1 updated to not require GMP 6.2.0. But I don't know how one would proceed with that. Do any of you have any idea? |
|
Yes this requires making a pull request to the registry, with an explanation of what's going on https://github.com/JuliaRegistries/General |
This bumps the GMP version to 6.2.1 since this is now the minimum supported version by FLINT. It also bumps the MPFR version to 4.2.0 since the previous one was not compatible with GMP 6.2.1. It also uses the new repository at https://github.com/flintlib/flint.git rather than the old one at https://github.com/flintlib/flint2.git.
|
It works locally for me now, thank you @benlorenz! I think the buildbots are failing because they didn't get the absolutely latest version of the registry. Hopefully it should be fine if one restarts them in a little while. |
|
Everything now builds successfully! I did however notice a warning from the audit stage. For the x86_64-linux-gnu build it gives the warning I'm not sure if this could potentially be an issue. |
|
The warning seems to be present also for the 3.0.0 release, so is presumably not an issue. As far as I can tell this is then ready for merging! |
|
I don't think we should require avx2 instructions. |
Unless I have done something wrong in the build system of FLINT, it seems to be a false positive. For instance, it checks for AVX2, but cannot find it, and so the module |
I agree, older builds, even for FLINT 2.9, contain the same warning and we have never seen any issues with it: from: https://buildkite.com/julialang/yggdrasil/builds/7832#018d1def-8625-4083-a52f-edf1bc363adb/629-4831 |
|
Unfortunately the ISA check isn't bullet-proof, for example JuliaPackaging/BinaryBuilder.jl#833 |
But AVX(2) opcodes are pretty distinct from base instructions, no? Even AVX should not be used for this build. |
|
The disassembly seems to contain quite a few |
This bumps the GMP version to 6.2.1 since this is now the minimum supported version by FLINT. It also bumps the MPFR version to 4.2.0 since the previous one was not compatible with GMP 6.2.1.
It also uses the new repository at https://github.com/flintlib/flint.git rather than the old one at https://github.com/flintlib/flint2.git.
@thofma, @benlorenz and @fingolfin I know you have been involved in updating this package before. Do you have any comments on this update?