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

Failure to build example on mac M1 #404

Open
matthagan15 opened this issue Oct 4, 2024 · 3 comments
Open

Failure to build example on mac M1 #404

matthagan15 opened this issue Oct 4, 2024 · 3 comments

Comments

@matthagan15
Copy link

I'm trying to build the matmul.c example on a mac m1 using the Macaulay2 tap. I managed to figure out the linking issues and get g++ to find the appropriate libraries and headers, but once I get that figured out I run into a massive linker error which has the last two lines

ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation).

the build command I ran to get this was gcc -o out main.cxx -L/opt/homebrew/lib -I/opt/homebrew/include -std=c++11.
I've included the full error in error.txt. If anyone knows of anyway around this I would gladly appreciate it!

@matthagan15
Copy link
Author

error.txt

@pascalgiorgi
Copy link
Member

Unfortunately, looking at Macaulay2 on GitHub shows that Mac M1 is not supported for the provided home-brew tap (see https://github.com/Macaulay2/homebrew-tap/wiki/M2-on-M1).

Your problem is coming from the fact that LinBox/fflas-ffpack have dependency with Givaro library that need to be build for arm64, which is not provided with Macaulay2 tap. You can try to install Givaro on your own from the GitHub repo (https://github.com/linbox-team/givaro) but it would be preferable to build the whole LinBox/fflas-ffpack from their sources (you will get more optimized code).

@matthagan15
Copy link
Author

I appreciate it. Unfortunately it looks like I can't build givaro on arm64 as I run into perl dependency issues and there does not appear to be standardized ways to downgrade the version of perl through homebrew. I went through and tried to upgrade the build scripts for givaro manually to use the version of perl provided through homebrew but the errors kept getting worse so I stopped.

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