pezmaster31 / bamtools

C++ API & command-line toolkit for working with BAM data
MIT License
418 stars 153 forks source link

install error #217

Closed skytguuu closed 3 years ago

skytguuu commented 3 years ago

Hi,

I tried to install bamtools, however when I tried to make, it reported error as followed: ################### /home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_resolve.cpp: In member function ‘bool BamTools::ResolveTool::ReadNamesFileReader::Read(std::map<std::cxx11::basic_string, ReadGroupResolver>&)’: /home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_resolve.cpp:413:74: error: no matching function for call to ‘make_pair<std::cxx11::string, bool>(gnu_cxx::alloc_traits<std::allocator<std::cxx11::basic_string > >::value_type&, bool)’ resolver.ReadNames.insert( make_pair<string,bool>(fields[1], true) ) ; ^ In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0, from /usr/include/c++/7/bits/char_traits.h:39, from /usr/include/c++/7/string:40, from /home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_tool.h:14, from /home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_resolve.h:13, from /home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_resolve.cpp:10: /usr/include/c++/7/bits/stl_pair.h:524:5: note: candidate: template<class _T1, class _T2> constexpr std::pair<typename std::__decay_and_strip<_Tp>::type, typename std::decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&) make_pair(_T1&& x, _T2&& y) ^~~~~ /usr/include/c++/7/bits/stl_pair.h:524:5: note: template argument deduction/substitution failed: /home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_resolve.cpp:413:74: note: cannot convert ‘fields.std::vector<std::cxx11::basic_string >::operator’ (type ‘gnu_cxx::__alloc_traits<std::allocator<std::cxx11::basic_string > >::value_type {aka std::cxx11::basic_string}’) to type ‘std::__cxx11::basic_string&&’ resolver.ReadNames.insert( make_pair<string,bool>(fields[1], true) ) ; ^ /home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_resolve.cpp: In member function ‘bool BamTools::ResolveTool::StatsFileReader::ParseReadGroupLine(const string&, std::map<std::cxx11::basic_string, ReadGroupResolver>&)’: /home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_resolve.cpp:610:75: error: no matching function for call to ‘make_pair<std::cxx11::string, ReadGroupResolver>(const string&, ReadGroupResolver&)’ readGroups.insert( make_pair<string, ReadGroupResolver>(name, resolver) ); ^ In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0, from /usr/include/c++/7/bits/char_traits.h:39, from /usr/include/c++/7/string:40, from /home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_tool.h:14, from /home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_resolve.h:13, from /home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_resolve.cpp:10: /usr/include/c++/7/bits/stl_pair.h:524:5: note: candidate: template<class _T1, class _T2> constexpr std::pair<typename std::__decay_and_strip<_Tp>::type, typename std::decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&) make_pair(_T1&& x, _T2&& y) ^~~~~ /usr/include/c++/7/bits/stl_pair.h:524:5: note: template argument deduction/substitution failed: /home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_resolve.cpp:610:61: note: cannot convert ‘name’ (type ‘const string {aka const std::cxx11::basic_string}’) to type ‘std::cxx11::basic_string&&’ readGroups.insert( make_pair<string, ReadGroupResolver>(name, resolver) ); ^~~~ /home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_resolve.cpp: In member function ‘bool BamTools::ResolveTool::ResolveToolPrivate::MakeStats()’: /home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_resolve.cpp:1017:93: error: no matching function for call to ‘make_pair<std::cxx11::string, bool>(std::cxx11::string&, const bool&)’ else resolver.ReadNames.insert( make_pair<string, bool>(al.Name, isCurrentMateUnique) ); ^ In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0, from /usr/include/c++/7/bits/char_traits.h:39, from /usr/include/c++/7/string:40, from /home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_tool.h:14, from /home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_resolve.h:13, from /home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_resolve.cpp:10: /usr/include/c++/7/bits/stl_pair.h:524:5: note: candidate: template<class _T1, class _T2> constexpr std::pair<typename std::decay_and_strip<_Tp>::type, typename std::decay_and_strip<_T2>::type> std::make_pair(_T1&&, _T2&&) make_pair(_T1&& __x, _T2&& y) ^~~~~ /usr/include/c++/7/bits/stl_pair.h:524:5: note: template argument deduction/substitution failed: /home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_resolve.cpp:1017:68: note: cannot convert ‘al.BamTools::BamAlignment::Name’ (type std::cxx11::string {aka std::cxx11::basic_string}’) to type ‘std::__cxx11::basic_string&&’ else resolver.ReadNames.insert( make_pair<string, bool>(al.Name, isCurrentMateUnique) );


/home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_resolve.cpp: In member function ‘void BamTools::ResolveTool::ResolveToolPrivate::ParseHeader(const BamTools::SamHeader&)’:
/home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_resolve.cpp:1049:93: error: no matching function for call to ‘make_pair<std::__cxx11::string, ReadGroupResolver>(const string&, ReadGroupResolver)’
         m_readGroups.insert( make_pair<string, ReadGroupResolver>(rg.ID, ReadGroupResolver()) );
                                                                                             ^
In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/string:40,
                 from /home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_tool.h:14,
                 from /home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_resolve.h:13,
                 from /home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_resolve.cpp:10:
/usr/include/c++/7/bits/stl_pair.h:524:5: note: candidate: template<class _T1, class _T2> constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&)
     make_pair(_T1&& __x, _T2&& __y)
     ^~~~~~~~~
/usr/include/c++/7/bits/stl_pair.h:524:5: note:   template argument deduction/substitution failed:
/home/dell/softwares/tools/Hi-C/bamtools-2.4.0/src/toolkit/bamtools_resolve.cpp:1049:70: note:   cannot convert ‘rg.BamTools::SamReadGroup::ID’ (type ‘const string {aka const std::__cxx11::basic_string<char>}’) to type ‘std::__cxx11::basic_string<char>&&’
         m_readGroups.insert( make_pair<string, ReadGroupResolver>(rg.ID, ReadGroupResolver()) );
                                                                   ~~~^~
make[2]: *** [src/toolkit/CMakeFiles/bamtools_cmd.dir/build.make:186: src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_resolve.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:506: src/toolkit/CMakeFiles/bamtools_cmd.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
######################
Could you give me a hand?
Thanks!
SoapZA commented 3 years ago

The line of code referenced in your output has been changed in commit https://github.com/pezmaster31/bamtools/commit/01c5637e90a1dc4a70a137efcfc901333f204a42, which is more than 3.5 years ago. Why are you trying to compile a release from over 6 years ago? I'm closing this, reopen it once you can reproduce this issue on the latest release.