yangao07 / abPOA

abPOA: an SIMD-based C library for fast partial order alignment using adaptive band
MIT License
118 stars 18 forks source link

Does not install on Mac M1 #44

Closed iskandr closed 9 months ago

iskandr commented 1 year ago
clang: error: the clang compiler does not support '-march=armv8-a+simd -D__AVX2__'
yangao07 commented 1 year ago

It works on my M1 pro.

cc --version
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: arm64-apple-darwin22.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

what is your clang version?

sirselim commented 1 year ago

I'm getting the same error on my M1 Mac, clang version below:

cc --version
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
sirselim commented 1 year ago

I built from source and changed -march=native to -mcpu=apple-m1, seems to be working now.

cjw85 commented 9 months ago

For me building from source and running the test listed in the README fails:

$ ./bin/abpoa ./test_data/seq.fa
[main] CMD:  ./bin/abpoa ./test_data/seq.fa
[simd_abpoa_align_sequence_to_subgraph] Error in cg_backtrack.
$ clang --version
Apple clang version 15.0.0 (clang-1500.1.0.2.5)
Target: arm64-apple-darwin23.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
yangao07 commented 9 months ago

Can you copy the full output of make command on your mac?

yangao07 commented 9 months ago

@cjw85 I guess you didn't add flags like armv8=1 to the make command, right?

cjw85 commented 9 months ago

Oh! I see. The Makefile doesn't detect the arch.

yangao07 commented 9 months ago

Great! Thanks @cjw85 !