-
Notifications
You must be signed in to change notification settings - Fork 10
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
Instructions in README.md for MPFR on MacOS #2
Comments
Thanks for the comments! |
I suppose that the Java MPFR interface expects libmpfr.4.dylib because it had been compiled against MPFR 3.x. So, the solution would be to reinstall the Java MPFR interface, and actually everything that depends on MPFR. See https://github.com/Homebrew/homebrew-science/issues/869 for a similar issue. |
Thanks for the explanation, I will check this to see whether I can find a good solution which works both on Linux and Mac. |
Under Linux, the problem is solved by having co-installable libraries with binary distributions. For instance, in Debian/unstable, I have both libmpfr4 3.1.6-1 (which provides libmpfr.so.4) and libmpfr6 4.0.1-1 (which provides libmpfr.so.6) installed. |
In README.md it is written: "On macOS, homebrew installs libmpfr.6.dylib, even though the latest version is 4. Renaming the library to libmpfr.4.dylib fixes this issue."
The "6" in the dylib file is correct and comes from the latest supported MPFR ABI. It is not related to the MPFR major version number. For MPFR 3.0.x and MPFR 3.1.x, the latest supported ABI is 4, hence libmpfr.4.dylib with these versions. And since MPFR 4.0.0 is not ABI compatible with the previous MPFR versions, its latest supported ABI is 6, hence libmpfr.6.dylib with MPFR 4.0.x. Renaming this file to libmpfr.4.dylib may yield failures (incorrect results or crashes) in software compiled against MPFR 3.x. Here, I think that the ABI incompatibilities are rather minor, affecting only particular applications, but I'm not sure. In any case, the rename is a bad idea.
The text was updated successfully, but these errors were encountered: