pygalmesh
pygalmesh copied to clipboard
M1 Apple Silicon support
Are there plans to support Apple Silicon with pygalmesh? Currently, it appears to be unsupported by the pip/conda builds.
Thanks!
Nope, not planned.
@nschloe for pip cross-compiling is a pain^1, but for conda-forge
it shouldn't be a problem. I couldn't spot any host or run time dependencies that are not already available and cross-platform in conda-forge
. Any idea why conda-forge
is not building for the rest of the architectures?
^1: FYI if you use GitHub Actions (or another CI) for your PyPi releases you then leverage scikit-build
and CMake to build wheels cross-platform
I was able to compile this on an M1 mac. Haven't tested everything but re-meshing seems to work fine. Just pip install pygalmesh
as usual and it will trigger the compile.
The 2 main steps to get this working were:
- There are some missing includes, and cgal is trying to find them in
/usr/include
. If you use brew, it puts them in/opt/homebrew/include
. I just copied the relevant folders from this brew location to/usr/include
, which are:boost
,CGAL
andEigen
. Keep in mind not to copy eigen3 as the folder, but the inner folders containing the header files. - There was a library linking problem with lgmp, for this I added the following to my .zshsrc file:
export LIBRARY_PATH="$LIBRARY_PATH:/opt/homebrew/lib"
. If you use bash, then adjust accordingly.
I tried symlinking and adding to the INCLUDE_PATH in my zshsrc file to solve the first point, but it didn't work out. Maybe someone else can figure this part out. Hopefully this helps someone else out.
I was able to compile this on an M1 mac. Haven't tested everything but re-meshing seems to work fine. Just
pip install pygalmesh
as usual and it will trigger the compile.The 2 main steps to get this working were:
- There are some missing includes, and cgal is trying to find them in
/usr/include
. If you use brew, it puts them in/opt/homebrew/include
. I just copied the relevant folders from this brew location to/usr/include
, which are:boost
,CGAL
andEigen
. Keep in mind not to copy eigen3 as the folder, but the inner folders containing the header files.- There was a library linking problem with lgmp, for this I added the following to my .zshsrc file:
export LIBRARY_PATH="$LIBRARY_PATH:/opt/homebrew/lib"
. If you use bash, then adjust accordingly.I tried symlinking and adding to the INCLUDE_PATH in my zshsrc file to solve the first point, but it didn't work out. Maybe someone else can figure this part out. Hopefully this helps someone else out.
Thanks for the solution, these steps are really useful.
And since now is 2023, there are version problems, i.e., pygalmesh doesn't install with the newest version of CGAL. It reports things like: src/generate.cpp:170:13: error: call to 'odt' is ambiguous
The solution is that install a previous version of CGAL via brew which you can refer to https://nelson.cloud/how-to-install-older-versions-of-homebrew-packages/
I installed CGAL 5.3.1 and then successfully installed pygalmesh.
I had the same problem. To follow up on totomobile43, clang uses CPLUS_INCLUDE_PATH,
export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:/opt/homebrew/include:/opt/homebrew/include/eigen3"
with CGAL-5.5.2, pygalmesh compiles for me and seems to be working. Thanks all.