shendurelab / LACHESIS

The LACHESIS software, as described in Nature Biotechnology (http://dx.doi.org/10.1038/nbt.2727)
Other
76 stars 33 forks source link

Compiling error #18

Open tangerzhang opened 7 years ago

tangerzhang commented 7 years ago

Hello, I am trying to installl LACHESIS in our linux server (centos6.2) with gcc4.9, boost1.61 and samtools v0.19. I think I have installed all the dependency correctly, however, I still got error when compiling HMM.c. Could you please help me solve this problem? Thanks so much! Please see below for error details:

make[2]: Leaving directory /home/zhangxt/software/LACHESIS-master/include/gtools' make -C markov make[2]: Entering directory/home/zhangxt/software/LACHESIS-master/include/markov' g++ -c TestMarkovModel.cc -Wall -ansi -pedantic -g -O3 -std=c++11 -I/home/zhangxt/software/boost_1_61_0 g++ -c SymbolSet.cc -Wall -ansi -pedantic -g -O3 -std=c++11 -I/home/zhangxt/software/boost_1_61_0 g++ -c WDAG.cc -Wall -ansi -pedantic -g -O3 -std=c++11 -I/home/zhangxt/software/boost_1_61_0 g++ -c MarkovModel.cc -Wall -ansi -pedantic -g -O3 -std=c++11 -I/home/zhangxt/software/boost_1_61_0 g++ -c MarkovChain.cc -Wall -ansi -pedantic -g -O3 -std=c++11 -I/home/zhangxt/software/boost_1_61_0 g++ -c HMM.cc -Wall -ansi -pedantic -g -O3 -std=c++11 -I/home/zhangxt/software/boost_1_61_0 HMM.cc: In member function 'bool HMM::AdjustProbsToBaumWelch(const WDAG&)': HMM.cc:422:38: error: call of overloaded 'isnan(gnu_cxx::alloc_traitsstd::allocator::value_type&)' is ambiguous if ( isnan( new_trans_probs[S1][S2] ) ) ^ HMM.cc:422:38: note: candidates are: In file included from /home/zhangxt/include/features.h:358:0, from /home/zhangxt/include/c++/4.9.0/x86_64-unknown-linux-gnu/bits/os_defines.h:39, from /home/zhangxt/include/c++/4.9.0/x86_64-unknown-linux-gnu/bits/c++config.h:430, from /home/zhangxt/include/c++/4.9.0/bits/stl_algobase.h:59, from /home/zhangxt/include/c++/4.9.0/vector:60, from MarkovModel.h:46, from HMM.h:57, from HMM.cc:18: /home/zhangxt/include/bits/mathcalls.h:235:1: note: int isnan(double) MATHDECL_1 (int,isnan,, (Mdouble value)) attribute ((const)); ^ In file included from WDAG.h:28:0, from HMM.h:58, from HMM.cc:18: /home/zhangxt/include/c++/4.9.0/cmath:626:3: note: constexpr bool std::isnan(long double) isnan(long double x) ^ /home/zhangxt/include/c++/4.9.0/cmath:622:3: note: constexpr bool std::isnan(double) isnan(double x) ^ /home/zhangxt/include/c++/4.9.0/cmath:618:3: note: constexpr bool std::isnan(float) isnan(float __x) ^ make[2]: * [HMM.o] Error 1 make[2]: Leaving directory `/home/zhangxt/software/LACHESIS-master/include/markov' make[1]: * [libJmarkov.a] Error 2 make[1]: Leaving directory`/home/zhangxt/software/LACHESIS-master/include' make: *\ [libs] Error 2

zorg-it commented 7 years ago

I came across same issue, solved removing -std=c++11 option from CFLAGS in Makefile, only in the Makefile of include/markov folder. Hope could help.

tangerzhang commented 7 years ago

Thanks for your message. Yes, I also solved the problem by simply removing the flag.

2016年10月3日星期一,zorg-it notifications@github.com 写道:

I came across same issue, solved removing -std=c++11 option from CFLAGS in Makefile, only in the Makefile of include/markov folder. Hope could help.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/shendurelab/LACHESIS/issues/18#issuecomment-251074831, or mute the thread https://github.com/notifications/unsubscribe-auth/AGG2qmZayUK51h0yDpSXc6tSUWSEDbQ-ks5qwNldgaJpZM4KHTJn .