ParBLiSS / FastANI

Fast Whole-Genome Similarity (ANI) Estimation
Apache License 2.0
368 stars 66 forks source link

make problem in Linux: "MapType’ has no member named ‘emplace_hint’ " #35

Closed vinisalazar closed 5 years ago

vinisalazar commented 5 years ago

Output of $ ./configure:

configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for g++ option to support OpenMP... -fopenmp
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking gsl/gsl_cdf.h usability... yes
checking gsl/gsl_cdf.h presence... yes
checking for gsl/gsl_cdf.h... yes
configure: creating ./config.status
config.status: creating Makefile

Output of $ make or $ sudo make:

g++ -O3 -DNDEBUG -std=c++11 -Isrc -I /usr/local//include -fopenmp -include src/common/memcpyLink.h -Wl,--wrap=memcpy  src/cgi/core_genome_identity.cpp -o fastANI -L/usr/local//lib -lgsl -lgslcblas -lstdc++ -lz -lm
In file included from src/map/include/computeMap.hpp:24:0,
                 from src/cgi/core_genome_identity.cpp:18:
src/map/include/slidingMap.hpp: In instantiation of ‘void skch::SlideMapper<Q_Info>::init() [with Q_Info = skch::QueryMetaData<kseq_t*, std::vector<skch::MinimizerInfo> >]’:
src/map/include/slidingMap.hpp:104:11:   required from ‘skch::SlideMapper<Q_Info>::SlideMapper(Q_Info&) [with Q_Info = skch::QueryMetaData<kseq_t*, std::vector<skch::MinimizerInfo> >]’
src/map/include/computeMap.hpp:437:41:   required from ‘void skch::Map::computeL2MappedRegions(Q_Info&, skch::Map::L1_candidateLocus_t&, skch::Map::L2_mapLocus_t&) [with Q_Info = skch::QueryMetaData<kseq_t*, std::vector<skch::MinimizerInfo> >]’
src/map/include/computeMap.hpp:369:13:   required from ‘bool skch::Map::doL2Mapping(Q_Info&, VecIn&, VecOut&) [with Q_Info = skch::QueryMetaData<kseq_t*, std::vector<skch::MinimizerInfo> >; VecIn = std::vector<skch::Map::L1_candidateLocus_t>; VecOut = std::vector<skch::MappingResult>]’
src/map/include/computeMap.hpp:221:11:   required from ‘void skch::Map::mapSingleQuerySeq(Q_Info&, skch::MappingResultsVector_t&, std::ofstream&) [with Q_Info = skch::QueryMetaData<kseq_t*, std::vector<skch::MinimizerInfo> >; skch::MappingResultsVector_t = std::vector<skch::MappingResult>; std::ofstream = std::basic_ofstream<char>]’
src/map/include/computeMap.hpp:178:57:   required from here
src/map/include/slidingMap.hpp:121:13: error: ‘skch::SlideMapper<skch::QueryMetaData<kseq_t*, std::vector<skch::MinimizerInfo> > >::MapType’ has no member named ‘emplace_hint’
make: *** [fastANI] Error 1

Any idea of where the problem might be? I think all my dependencies are OK.

Thank you for any assistance you can provide.

V

patflick commented 5 years ago

std::map::emplace_hint was added in C++11. Check your C++ compiler version, and whether it supports C++11.

vinisalazar commented 5 years ago

Thanks, that really helps. Ill see to that and post an update tomorrow.

vinisalazar commented 5 years ago

I'm using OpenSUSE OS. I tried sudo zypper in gcc, got the latest version of gcc-c++ and now ./configure returns me this:

configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether the C++ compiler works... no
configure: error: in `/home/vini/code/FastANI':
configure: error: C++ compiler cannot create executables
See `config.log' for more details

It really puzzled me. Do you have any thoughts? I'm having some trouble connecting to the server ATM, but when I do, I will uninstall the gcc update and try again.

Thanks

patflick commented 5 years ago

Maybe check with your sysadmin. It's really weird that ./configure can't find a compiler.

vinisalazar commented 5 years ago

Thanks @patflick. In the end I managed to get it running with the Conda install.