ParBLiSS / FastANI

Fast Whole-Genome Similarity (ANI) Estimation
Apache License 2.0
368 stars 66 forks source link

OS X: Symbols not found #31

Closed bede closed 5 years ago

bede commented 5 years ago

OS 10.12.6 throws a trap for me, using fastani-OSX64-v1.1.tar.gz

fastani-OSX64-v1.1 bede$ ./fastANI -q kp/HS11286.fasta -r ec/E24377A.fasta -o kp
>>>>>>>>>>>>>>>>>>
Reference = [ec/E24377A.fasta]
Query = [kp/HS11286.fasta]
Kmer size = 16
Fragment length = 3000
Threads = 1
ANI output file = kp
>>>>>>>>>>>>>>>>>>
dyld: lazy symbol binding failed: Symbol not found: ___emutls_get_address
  Referenced from: /Users/bede/Downloads/fastani-OSX64-v1.1/.//./libgomp.1.dylib
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ___emutls_get_address
  Referenced from: /Users/bede/Downloads/fastani-OSX64-v1.1/.//./libgomp.1.dylib
  Expected in: /usr/lib/libSystem.B.dylib

Abort trap: 6
fastani-OSX64-v1.1 bede$
cjain7 commented 5 years ago

Are you using Clang for C++ compilation? Also, did you install libomp via brew as mentioned in the install instructions?

bede commented 5 years ago

Thanks Chirag. I am using Clang, but was attempting to run the OS X binary release rather than building from source.

Yes libomp is also installed, but I don't know much about dylibs on OS X, so am likely doing something silly…

cjain7 commented 5 years ago

Can you start the installation process from source in a different directory? Shouldn't take long if you already have Clang and libomp.

bede commented 5 years ago

Right, I'd figured out the additonal Darwin CXXFLAGS needed to Makefile.in and forked the repo in order to PR, only to see you'd already commited the same change to master since the last release 😅

ifeq ($(UNAME_S),Darwin)  #macOS clang
    CXXFLAGS += -mmacosx-version-min=10.7 -stdlib=libc++ -Xpreprocessor -fopenmp -lomp

For me (OS 10.12.6) the process was therefore

$ ./bootstrap.sh
$ ./configure --with-gsl=/usr/local/Cellar/gsl/2.5
$ make

Perhaps you could tag a new binary and/or source release that works for Mac users : )

rotheconrad commented 5 years ago

I got this similar error with macOS 10.13.6 trying to use fastani-OSX64-v1.1.tar.gz So the dependency-free binary for macOS does not appear to work. It would be really cool if it did.

fastANI -r E_coli_randomG_0001.fna -q E_coli_randomG_0002.fna -o temp.ani
>>>>>>>>>>>>>>>>>>
Reference = [E_coli_randomG_0001.fna]
Query = [E_coli_randomG_0002.fna]
Kmer size = 16
Fragment length = 3000
Threads = 1
ANI output file = temp.ani
>>>>>>>>>>>>>>>>>>
dyld: lazy symbol binding failed: Symbol not found: ___emutls_get_address
  Referenced from: /Users/rothconrad/Downloads/ReSearch/fastani-OSX64-v1.1//./libgomp.1.dylib
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ___emutls_get_address
  Referenced from: /Users/rothconrad/Downloads/ReSearch/fastani-OSX64-v1.1//./libgomp.1.dylib
  Expected in: /usr/lib/libSystem.B.dylib

Abort trap: 6
bede commented 5 years ago

Yeah, no release has been tagged since I opened this, and the OS X bin is still broken. Do my instructions work for you @rotheconrad ? You'll need a clone or tarball of master.

rotheconrad commented 5 years ago

@bede I didn't try the instructions. I abandoned running it on OS X and I'm just running it in Linux. Everything there is working fine.

cjain7 commented 5 years ago

I've marked a new release (1.2) today, sorry for the delay :)
The pre-built binary is provided for linux users; mac users are recommended to build from source.