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

Include MacOS ARM64 wheel building in CI #74

Open
gipert opened this issue Aug 4, 2023 · 10 comments · Fixed by #96
Open

Include MacOS ARM64 wheel building in CI #74

gipert opened this issue Aug 4, 2023 · 10 comments · Fixed by #96
Labels
help wanted Extra attention is needed

Comments

@gipert
Copy link
Member

gipert commented Aug 4, 2023

CI builds on ARM64 fail somehow with the error message first reported in #49. Needs investigation.

@stewartboogert
Copy link
Member

macOS arm64 wheels have been uploaded to pypi for pyg4ometry v1.1.0 and python 3.8, 3.9, 3.10 and 3.11

@stewartboogert stewartboogert added the bug Something isn't working label Aug 9, 2023
gipert added a commit to gipert/pyg4ometry that referenced this issue Aug 25, 2023
@gipert
Copy link
Member Author

gipert commented Aug 25, 2023

Seems like it worked: https://pypi.org/project/pyg4ometry/#files

@gipert
Copy link
Member Author

gipert commented Sep 4, 2023

@stewartboogert could you post the error message here?

@stewartboogert
Copy link
Member

stewartboogert commented Jan 6, 2024

Still problematic with macOS arm64 (so built using pypa/cibuildwheel@v2.16.2). Error seen on import

ImportError: dlopen(/Users/stewart.boogert/venv/python3.11-pyg4-pypi/lib/python3.11/site-packages/pyg4ometry/pycgal/CGAL.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '___gmpn_add_n'

Should create a .dylib directory (confirmed on macOS intel) which contains the dependencies. This is not present on arm64 build. otool does not show the libraries required (arm64 output)

(python3.11-pyg4-pypi) DLAST0155% otool -L /Users/stewart.boogert/venv/python3.11-pyg4-pypi/lib/python3.11/site-packages/pyg4ometry/pycgal/CGAL.cpython-311-darwin.so
/Users/stewart.boogert/venv/python3.11-pyg4-pypi/lib/python3.11/site-packages/pyg4ometry/pycgal/CGAL.cpython-311-darwin.so:
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)

Compared with the intel (x86_64 output)

(py3.11) Stewarts-MacBook-Pro-2:pycgal sboogert$ otool -L CGAL.cpython-311-darwin.so 
CGAL.cpython-311-darwin.so:
	@loader_path/../.dylibs/libgmpxx.4.dylib (compatibility version 12.0.0, current version 12.0.0)
	@loader_path/../.dylibs/libmpfr.6.dylib (compatibility version 9.0.0, current version 9.1.0)
	@loader_path/../.dylibs/libgmp.10.dylib (compatibility version 16.0.0, current version 16.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)

@gipert
Copy link
Member Author

gipert commented Jan 6, 2024

I would open an issue on the cbuildwheel repository.

@stewartboogert
Copy link
Member

Trying a few things first, but I think I will.

@gipert
Copy link
Member Author

gipert commented Jan 6, 2024

New wheels built with the latest cbuildwheel appearing soon on PyPI... let's see if they are still broken

@stewartboogert
Copy link
Member

Ok there are still problems with the .dylib dependency directory. So running cibuildwheel locally on my apple silicon M1 I find the .dylib dependency directory and don't find it in the intel directory. So the other way around from what we observe on the GitHub runners.

So now I can properly build the wheels with all the appropriate deps. My previous apple silicon builds did not have the deps and would often fail as users would need the correct dependencies. So makes sense but strange behaviour from cibuildwheel as this would often come up I suspect

@gipert
Copy link
Member Author

gipert commented Jan 8, 2024

We've decided to upload ARM64 wheels manually for now, but let's keep this open.

@gipert gipert changed the title Fix MacOS ARM64 wheel building Include MacOS ARM64 wheel building in CI Jan 8, 2024
@gipert gipert added help wanted Extra attention is needed and removed bug Something isn't working labels Jan 8, 2024
@stewartboogert
Copy link
Member

Manually uploaded, let’s see if users have issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants