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

Problem with M1 chip installation #112

Open
GM110Z opened this issue Mar 1, 2023 · 3 comments
Open

Problem with M1 chip installation #112

GM110Z opened this issue Mar 1, 2023 · 3 comments

Comments

@GM110Z
Copy link

GM110Z commented Mar 1, 2023

Hello

I have tried to install fastANI on my mac with M1 chip but I received the following error:
src/cgi/core_genome_identity.cpp:11:10: fatal error: 'omp.h' file not found

I followed various threads here in the issues page and as suggested I tried to install libomp but the issue was not solved and the error remained.
I even tried to install by conda but in that case I got the error '/usr/lib/libgsl.25.dylib' (no such file, not in dyld cache)

Then tried by brew but the error I got in this case was
checking for boost/math/distributions/binomial.hpp... no
configure: error: Boost Library headers not found.

Any idea how I could bypass any of the problems so I could use fastANI?

@apbouwens
Copy link

I was able to compile fastANI on my MacBookPro M1 (2020) using the following steps:

I used brew to install libomp and gsl:

brew install libomp gsl

Then followed the installation instructions:
./bootstrap.sh
./configure --with-gsl=/opt/homebrew/opt/gsl

Before running make, I edited the Makefile:

  • on line 1, by adding -I /opt/homebrew/opt/libomp/include at the end:
    CXXFLAGS += -O3 -DNDEBUG -std=c++11 -Isrc -I /opt/homebrew/opt/gsl/include -I /opt/homebrew/opt/libomp/include

  • on line 7, by adding -L/opt/homebrew/opt/libomp/lib at the end, after -lomp:
    CXXFLAGS += -mmacosx-version-min=10.7 -stdlib=libc++ -Xpreprocessor -fopenmp -lomp -L/opt/homebrew/opt/libomp/lib

Finally, I ran make successfully.

@GM110Z
Copy link
Author

GM110Z commented Mar 7, 2023

Thank you that worked!

@lm-jkominek
Copy link

Run into the similar issue on my 2020 Intel Mac, running Ventura 13.1. Your answer helped, but the homebrew paths were different- instead of "/opt/homebrew/opt/" my machine used "/usr/local/opt/", just thought I'd share.

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

3 participants