grenaud / schmutzi

Maximum a posteriori estimate of contamination for ancient samples
20 stars 2 forks source link

GCC 7.1.1 Build Error #1

Closed apeltzer closed 6 years ago

apeltzer commented 7 years ago

Hi Gabriel,

me again ;-)

` ^~~~~ /usr/include/c++/7.1.1/bits/stl_pair.h:519:5: note: template argument deduction/substitution failed: /home/alex/IDEA/arch-pkgbuilds/schmutzi/src/schmutzi/bamtools/src/toolkit/bamtools_resolve.cpp:1019: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/alex/IDEA/arch-pkgbuilds/schmutzi/src/schmutzi/bamtools/src/toolkit/bamtools_resolve.cpp: In member function ‘void BamTools::ResolveTool::ResolveToolPrivate::ParseHeader(const BamTools::SamHeader&)’:
/home/alex/IDEA/arch-pkgbuilds/schmutzi/src/schmutzi/bamtools/src/toolkit/bamtools_resolve.cpp:1051: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.1.1/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/7.1.1/bits/char_traits.h:39,
                 from /usr/include/c++/7.1.1/string:40,
                 from /home/alex/IDEA/arch-pkgbuilds/schmutzi/src/schmutzi/bamtools/src/toolkit/bamtools_tool.h:14,
                 from /home/alex/IDEA/arch-pkgbuilds/schmutzi/src/schmutzi/bamtools/src/toolkit/bamtools_resolve.h:13,
                 from /home/alex/IDEA/arch-pkgbuilds/schmutzi/src/schmutzi/bamtools/src/toolkit/bamtools_resolve.cpp:10:
/usr/include/c++/7.1.1/bits/stl_pair.h:519: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.1.1/bits/stl_pair.h:519:5: note:   template argument deduction/substitution failed:
/home/alex/IDEA/arch-pkgbuilds/schmutzi/src/schmutzi/bamtools/src/toolkit/bamtools_resolve.cpp:1051: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[3]: *** [src/toolkit/CMakeFiles/bamtools_cmd.dir/build.make:255: src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_resolve.cpp.o] Error 1
make[3]: Leaving directory '/home/alex/IDEA/arch-pkgbuilds/schmutzi/src/schmutzi/bamtools/build'
make[2]: *** [CMakeFiles/Makefile2:521: src/toolkit/CMakeFiles/bamtools_cmd.dir/all] Error 2
make[2]: Leaving directory '/home/alex/IDEA/arch-pkgbuilds/schmutzi/src/schmutzi/bamtools/build'
make[1]: *** [Makefile:130: all] Error 2
make[1]: Leaving directory '/home/alex/IDEA/arch-pkgbuilds/schmutzi/src/schmutzi/bamtools/build'
make: *** [Makefile:29: bamtools/lib/libbamtools.a] Error 2
`

Any idea on this? 
grenaud commented 7 years ago

hey Alex! Smells like a problem with bamtools, I just built it using gcc version 4.9.4 (Ubuntu 4.9.4-2ubuntu1~12.04) without any problems. Could you report this to https://github.com/pezmaster31/bamtools/ and see what they say?

apeltzer commented 7 years ago

I opened an issue there, too: https://github.com/pezmaster31/bamtools/issues/148

Lets see what they think!

grenaud commented 7 years ago

awesome, in the meantime, could you build on gcc 4.9? I tried on my local machine and it compiles and runs.

apeltzer commented 7 years ago

Seems to work there - I suppose its upstream between BAMTools and GCC >= 7 (maybe even with GCC 6?).

apeltzer commented 6 years ago

They fixed it today upstream in https://github.com/pezmaster31/bamtools/issues/148#event-1304243722

I'll test tomorrow !

apeltzer commented 6 years ago

So the BAMtools related stuff works fine now - I guess this is gone. Regarding the GCC issues, I opened another ticket