FastANI icon indicating copy to clipboard operation
FastANI copied to clipboard

Problem with M1 chip installation

Open GM110Z opened this issue 2 years ago • 4 comments

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?

GM110Z avatar Mar 01 '23 17:03 GM110Z

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.

apbouwens avatar Mar 06 '23 19:03 apbouwens

Thank you that worked!

GM110Z avatar Mar 07 '23 07:03 GM110Z

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.

lm-jkominek avatar May 01 '23 17:05 lm-jkominek

I extended the BioConda recipe to cover osx-arm64 in August 2024.

peterjc avatar Nov 25 '24 19:11 peterjc