I'm having an issue running KING on Mac OS X . It has to do with a dylib, I think. Does anybody have any suggestions on how to fix this error?
> ./king -b ./ex/ex.bed
dyld: Symbol not found: __ZdaPvm Referenced from: /Users/gaelgarcia/Downloads/./king (which was built for Mac OS X 10.13) Expected in: /usr/local/lib/libstdc++.6.dylib in /Users/gaelgarcia/./king Abort trap: 6
UPDATE: Have been following valuable suggestions, but I'm still stuck in the dreadful circle of missing libraries/broken symlinks... any help is greatly appreciated.
I've tried building my own KING as suggested, and got the error:
clang: error: unsupported option '-fopenmp'.
I further tried to install a new version of
gcc via Homebrew, but get:
gcc 8.1.0 is already installed, it's just not linked.
Then, I ran
brew link --overwrite gcc, which returns:
Could not symlink include/c++/8.1.0 /usr/local/include/c++ is not writable.
Also followed a suggestion somebody else gave on stackoverflow, to run
clang++ -L /opt/local/lib/libomp/ -lm -lz -O2 -fopenmp -o king *.cpp , alas to no avail. Yikes... 😫
Having installed llvm via Homebrew (
brew install llvm), the command that got KING properly built and running on my Mac OS 10.12 was:
/usr/local/Cellar/llvm/6.0.0/bin/clang++ -I /usr/local/Cellar/llvm/6.0.0/include -L /usr/local/Cellar/llvm/6.0.0/lib -O2 -fopenmp -lm -lz -o king *.cpp
Running the newly built executable with the example .bed file provided:
> ./king -b ../ex/ex.bed
KING 2.1.3 - (c) 2010-2018 Wei-Min Chen The following parameters are in effect: Binary File : ../ex/ex.bed (-bname)