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

Doesn't compile with clang #2

Closed andreas-wilm closed 8 years ago

andreas-wilm commented 8 years ago

The default compiler on Mac (clang/LLVM) is not supported. (I know: make mac sort of circumvents this but in theory there should be no need to install GCC in addition.)

$ make clean

$ make
Makefile:66: "*** WARNING g++ minor version <7 ***"
mkdir -p obj_linux/src/alignment/
g++ -static-libgcc -static-libstdc++ -D__cplusplus=201103L -I"./src/" -I"/usr/include/" -I"libs/libdivsufsort-2.0.1/build/include" -I"libs/seqan-library-1.4.2/include" -DRELEASE_VERSION -O3 -fdata-sections -ffunction-sections -c -fmessage-length=0 -ffreestanding -fopenmp -m64 -std=c++11 -Werror=return-type -pthread -o obj_linux/src/alignment/myers.o src/alignment/myers.cpp
clang: warning: argument unused during compilation: '-static-libgcc'
clang: warning: argument unused during compilation: '-static-libstdc++'
clang: warning: argument unused during compilation: '-fopenmp'
mkdir -p obj_linux/src/alignment/
g++ -static-libgcc -static-libstdc++ -D__cplusplus=201103L -I"./src/" -I"/usr/include/" -I"libs/libdivsufsort-2.0.1/build/include" -I"libs/seqan-library-1.4.2/include" -DRELEASE_VERSION -O3 -fdata-sections -ffunction-sections -c -fmessage-length=0 -ffreestanding -fopenmp -m64 -std=c++11 -Werror=return-type -pthread -o obj_linux/src/alignment/cigargen.o src/alignment/cigargen.cc
clang: warning: argument unused during compilation: '-static-libgcc'
clang: warning: argument unused during compilation: '-static-libstdc++'
clang: warning: argument unused during compilation: '-fopenmp'
In file included from src/alignment/cigargen.cc:9:
./src/utility/utility_general.h:108:10: error: no member named 'iota' in namespace 'std'
    std::iota(begin(indices), end(indices), static_cast<size_t>(0));
    ~~~~~^
./src/utility/utility_general.h:120:10: error: no member named 'iota' in namespace 'std'
    std::iota(begin(indices), end(indices), static_cast<size_t>(0));
    ~~~~~^
2 errors generated.
make: *** [obj_linux/src/alignment/cigargen.o] Error 1

$ g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
andreas-wilm commented 8 years ago
#include <numeric> 

in ./src/utility/utility_general.h fixes the iota problem.

Then you get

src/graphmap/graphmap.cc:8:10: fatal error: 'omp.h' file not found

because clang doesn't support OMP yet!

Can be closed as 'won't fix' but add info to README or INSTALL