langmead-lab / vargas

MIT License
25 stars 2 forks source link

compilation problem #2

Open estolle opened 4 years ago

estolle commented 4 years ago

Hi there,

I seem to have problems compiling vargas on our Ubuntu 16.04 server. It fails during the make step for CMakeFiles/vargas.dir/src/align_main.cpp.o (see below). Any ideas on this error?

Thanks in advance.

/usr/include/c++/5/bits/unordered_map.h:380:54: required from ‘std::pair<typename std::_Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc, std::detail::_Select1st, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::detail::_Default_ranged_hash, std::detail::_Prime_rehash_policy, std::detail::_Hashtable_traits<std::not_<std::and_<std::is_fast_hash<_Hash>, std::detail::is_noexcept_hash<_Key, _Hash> > >::value, false, true> >::iterator, bool> std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::emplace(_Args&& ...) [with _Args = {unsigned int, const unsigned int&}; _Key = unsigned int; _Tp = vargas::AlignerBase::_seed<vargas::SIMD<char, 16u> >; _Hash = std::hash; _Pred = std::equal_to; _Alloc = std::allocator<std::pair<const unsigned int, vargas::AlignerBase::_seed<vargas::SIMD<char, 16u> > > >; typename std::_Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc, std::detail::_Select1st, _Pred, _Hash, std::detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::detail::_Prime_rehash_policy, std::detail::_Hashtable_traits<std::not_<std::and_<std::__is_fast_hash<_Hash>, std::detail::is_noexcept_hash<_Key, _Hash> > >::value, false, true> >::iterator = std::detail::_Node_iterator<std::pair<const unsigned int, vargas::AlignerBase::_seed<vargas::SIMD<char, 16u> > >, false, false>]’ /opt/vargas/include/alignment.h:433:75: required from ‘void vargas::AlignerT<simd_t, END_TO_END, MSONLY, MAXONLY>::align_into(const std::vector<std::__cxx11::basic_string >&, const std::vector<std::vector >&, vargas::Graph::const_iterator, vargas::Graph::const_iterator, vargas::Results&, bool) [with simd_t = vargas::SIMD<char, 16u>; bool END_TO_END = false; bool MSONLY = false; bool MAXONLY = false; vargas::Graph::const_iterator = vargas::Graph::GraphIterator<const vargas::Graph::Node, true>]’ /opt/vargas/include/alignment.h:991:68: required from here /usr/include/c++/5/ext/new_allocator.h:120:4: error: no matching function for call to ‘std::pair<const unsigned int, vargas::AlignerBase::_seed<vargas::SIMD<char, 16u> > >::pair(unsigned int, const unsigned int&)’

CMakeFiles/vargas.dir/build.make:230: recipe for target 'CMakeFiles/vargas.dir/src/align_main.cpp.o' failed make[2]: *** [CMakeFiles/vargas.dir/src/align_main.cpp.o] Error 1

cdarby commented 4 years ago

Hello, thanks for submitting your issue. A couple questions: what is your full CMake command, and what version of GCC are you using?

estolle commented 4 years ago

Hi,

GCC version is: gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10)

htslib compiled fines as far as I can see.

i tried different cmake commands, all getting the identical error in the end:

sudo cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_AVX512BW_GCC=ON -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc .. sudo cmake -DCMAKE_BUILD_TYPE=Release --DBUILD_AVX2_GCC=ON -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc .. sudo cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc ..

cdarby commented 4 years ago

We have not seen this issue with gcc version 6 and above and also see it with your gcc version, so if you are able to use a newer version of gcc, that hopefully will resolve the issue. Alternatively, we just released binaries which you can download based on the processor instructions available on your system.