cgal
cgal copied to clipboard
GMP and MPFR arm64 and x86_64
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.)
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).
It works on mac and windows.
I really like it and thank you very much!