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

building for macOS-x86_64 but attempting to link with file built for macOS-arm64 Undefined symbols for architecture x86_64: #329

Open
Seif-Mohamed2 opened this issue May 18, 2022 · 1 comment

Comments

@Seif-Mohamed2
Copy link

I am trying to build the pymesh and I am getting this error

[ 91%] Linking CXX executable cork
ld: warning: ignoring file /opt/local/lib/libgmp.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
"___gmpn_add_n", referenced from:
...

error: linker command failed with exit code 1

I am not sure what is the issue exactly but I am suspecting that it is either related to the fact that I am using the macbook with new chip so the different processor causing some issue. The other possible issue can be that the gmp is not installed in the correct path or something causing the cork make file being not able to reach it.

Can anyone help with that issue?

@Ieremie
Copy link

Ieremie commented Jul 11, 2022

After two days of banging my head, I managed to install it on my M1 MacBook Pro:

Follow the instructions from: https://pymesh.readthedocs.io/en/latest/installation.html

  1. Install the third party dependencies using Macports, however make sure you do this using a terminal that is run with Rosseta. (arch must return i386 not arm64) - this is to ensure that the packages run as normal rather than complaining about the architecture.
  2. In my case, for the 'boost' package, using MacPorts the instalation fails. Use brew instead, but again make sure you do this in a Rosseta terminal. I have installed home-brew with the Rosseta terminal too.
  3. Follow the next steps in the instruction page to build and install pymesh.

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

2 participants