isovic / graphmap

GraphMap - A highly sensitive and accurate mapper for long, error-prone reads http://www.nature.com/ncomms/2016/160415/ncomms11307/full/ncomms11307.html Note: This was the original repository which will no longer be officially maintained. Please use the new official repository here:
https://github.com/lbcb-sci/graphmap2
MIT License
178 stars 44 forks source link

Additional steps required for building on OS X #16

Closed bede closed 8 years ago

bede commented 8 years ago

Hi there, In spite of the Makefile seemingly accomodating OS X, make failed for me using Clang which was no big surprise. Your Makefile also seemingly ignores the CC and CXX environment variables and uses its own variables which need to be set.

Using GCC 5.3 and OpenMPI installed with Homebrew, these were steps I used to build graphmap on OS 10.10.5.

Perhaps this may help others:

export GCC=/usr/local/bin/g++-5
export GCC_MAC=/usr/local/bin/g++-5
make deps
make

Binaries then appear in a bin/Linux-x64 directory... But they are executable.

Best wishes, Bede

andreas-wilm commented 8 years ago

Hi Bede,

thanks for the info. Most of this is actually already covered in the INSTALL file:

Clang was never supported (even though it might not take much change). GCC is required. Quote:

You will need a recent GCC/G++ version (>=4.7) to compile the source.

Yes, CC and CXX are ignored and GCC/GCC_MAC is used instead. Quote:

To override the default compiler choice you can set GCC (or GCC_MAC on Mac), e.g.: GCC=/usr/local/bin/g++ make

A freshly unpacked release can also be compiled like that on OS X:

make clean
export GCC_MAC=/opt/local/bin/g++-mp-4.8
make deps
make mac

Supporting Clang might be the best route in the future

Andreas

bede commented 8 years ago

Apologies @andreas-wilm for my oversight.

Of course Clang support would be easier, but anyone who has installed a modest number of bioinformatics software packages has had to grapple with GCC. As long as it is documented clearly then I don't see a big problem. Installing GCC with Homebrew is trivial.

Bede