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

GMP and MPFR arm64 and x86_64 #8194

Closed
petrasvestartas opened this issue May 9, 2024 · 2 comments
Closed

GMP and MPFR arm64 and x86_64 #8194

petrasvestartas opened this issue May 9, 2024 · 2 comments
Assignees

Comments

@petrasvestartas
Copy link

petrasvestartas commented May 9, 2024

Issue Details

GMP and MPFR often gives me a lot of issues. For Mac the only way how you install gmp and mpfr is using Brew.
This means that you must have two MAC computers for x86_64 and also arm64. GMP and MPFR does not provide universal static libraries for different os in their websites. Compiling these libraries from their official websites also do not work directly.

Is there anything you can do to provide instructions of universal mac os compilation for gmp and mpfr? Or release them as you do for windows?

Plus the official gmp repo says that gmp for arm64 often cause problems:

Issues with GMP 6.2.1:
While we added support for Apple's new Arm based computers, our support has a problem. The problem is that Apple reserves CPU register x18, but GMP's mpn/arm64 assembly code uses that register. While GMP runs fine in our tests, we expect things to go awry in some execution situation. (Apple has not been kind enough to specify how they use x18. Therefore, we don't know what the consequences of using x18 might be.)

@sloriot
Copy link
Member

sloriot commented May 13, 2024

Note that starting CGAL 5.6, GMP/MPFR are no longer needed. You can only really on boost.

You can set the following cmake variables to test it:

SET(CGAL_CMAKE_EXACT_NT_BACKEND BOOST_BACKEND CACHE STRING "")
SET(CGAL_DISABLE_GMP ON CACHE BOOL "")
SET(CMAKE_DISABLE_FIND_PACKAGE_GMP ON CACHE BOOL "")

and it should work without any issue (the part about GMP is probably not necessary but in case you have some gmp install that is not compatible it will avoid cmake to mess up with it).

@petrasvestartas
Copy link
Author

It works on mac and windows.

I really like it and thank you very much!

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

No branches or pull requests

3 participants