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?
Thanks!
  > ./king -b ./ex/ex.bed
Returns:
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... 😫
UPDATE:
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)
Yup. I found it necessary to use Homebrew to install a newer version of gcc in order to build/run KING on my Mac.
Thanks @jbalberge and @chrchang523 - 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 ofgccvia Homebrew, but getgcc 8.1.0 is already installed, it's just not linked. Then, I ranbrew link --overwrite, 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 runclang++ -L /opt/local/lib/libomp/ -lm -lz -O2 -fopenmp -o king *.cpp, alas to no avail. Yikes... 😫My bad, building c++ code with the Open MP lib on Mac OS X seems quite hard. Let's go back to the compiled version. I managed to have it work after setting the dyld library path
Let me know if this works for you
Thank you, @jbalberge! I managed to get it working via the source build alternative (See Update). Thank you for all your time and help!
Great! Thanks for the updates!