-
Notifications
You must be signed in to change notification settings - Fork 26
Description
I am working on Rocky Linux v 9.6 and am getting an error when I try to install whamg using the command: git clone --recursive https://github.com/zeeev/wham.git; cd wham; make
This is the partial, last part, of the output:
MergeItem, std::_IdentityBamTools::Internal::MergeItem, BamTools::Internal::MergeItemSorterBamTools::Algorithms::Sort::ByName, std::allocatorBamTools::Internal::MergeItem >::const_iterator; std::multiset<_Key, _Compare, _Alloc>::value_type = BamTools::Internal::MergeItem]’
/scratch/sheen_lab/programs/whamg/wham/src/bamtools/src/api/internal/bam/wham/src/bamtools/src/api/internal/bam/BamMultiMerger_p.h:130:18: required from ‘void BamTools::Internal::MultiMerger::Add(BamTools::Internal::MergeItem) [with Compare = BamTools::Algorithms::Sort::ByName]’
/scratch/sheen_lab/programs/whamg/wham/src/bamtools/src/api/internal/bam/wham/src/bamtools/src/api/internal/bam/BamMultiMerger_p.h:123:13: required from here
/usr/include/c++/11/bits/stl_tree.h:770:15: error: static assertion failed: comparison object must be invocable as const
770 | is_invocable_v<const _Compare&, const _Key&, const _Key&>,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/stl_tree.h:770:15: note: ‘std::is_invocable_v<const BamTools::Internal::MergeItemSorterBamTools::Algorithms::Sort::ByName&, const BamTools::Internal::MergeItem&, const BamTools::Internal::MergeItem&>’ evaluates to false
/usr/include/c++/11/bits/stl_tree.h: In instantiation of ‘static const _Key& std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_S_key(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type) [with _Key = BamTools::Internal::MergeItem; _Val = BamTools::Internal::MergeItem; _KeyOfValue = std::_IdentityBamTools::Internal::MergeItem; _Compare = BamTools::Internal::MergeItemSorterBamTools::Algorithms::Sort::ByPosition; _Alloc = std::allocatorBamTools::Internal::MergeItem; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type = const std::_Rb_tree_nodeBamTools::Internal::MergeItem]’:
/usr/include/c++/11/bits/stl_tree.h:2102:44: required from ‘std::pair<std::_Rb_tree_node_base, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_equal_pos(const key_type&) [with _Key = BamTools::Internal::MergeItem; _Val = BamTools::Internal::MergeItem; _KeyOfValue = std::_IdentityBamTools::Internal::MergeItem; _Compare = BamTools::Internal::MergeItemSorterBamTools::Algorithms::Sort::ByPosition; _Alloc = std::allocatorBamTools::Internal::MergeItem; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::key_type = BamTools::Internal::MergeItem]’
/usr/include/c++/11/bits/stl_tree.h:2151:4: required from ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_equal(_Arg&&) [with _Arg = const BamTools::Internal::MergeItem&; _Key = BamTools::Internal::MergeItem; _Val = BamTools::Internal::MergeItem; _KeyOfValue = std::_IdentityBamTools::Internal::MergeItem; _Compare = BamTools::Internal::MergeItemSorterBamTools::Algorithms::Sort::ByPosition; _Alloc = std::allocatorBamTools::Internal::MergeItem; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator = std::_Rb_tree<BamTools::Internal::MergeItem, BamTools::Internal::MergeItem, std::_IdentityBamTools::Internal::MergeItem, BamTools::Internal::MergeItemSorterBamTools::Algorithms::Sort::ByPosition, std::allocatorBamTools::Internal::MergeItem >::iterator]’
/usr/include/c++/11/bits/stl_multiset.h:503:36: required from ‘std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = BamTools::Internal::MergeItem; _Compare = BamTools::Internal::MergeItemSorterBamTools::Algorithms::Sort::ByPosition; _Alloc = std::allocatorBamTools::Internal::MergeItem; std::multiset<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<BamTools::Internal::MergeItem, BamTools::Internal::MergeItem, std::_IdentityBamTools::Internal::MergeItem, BamTools::Internal::MergeItemSorterBamTools::Algorithms::Sort::ByPosition, std::allocatorBamTools::Internal::MergeItem >::const_iterator; std::multiset<_Key, _Compare, _Alloc>::value_type = BamTools::Internal::MergeItem]’
/scratch/sheen_lab/programs/whamg/wham/src/bamtools/src/api/internal/bam/wham/src/bamtools/src/api/internal/bam/BamMultiMerger_p.h:130:18: required from ‘void BamTools::Internal::MultiMerger::Add(BamTools::Internal::MergeItem) [with Compare = BamTools::Algorithms::Sort::ByPosition]’
/scratch/sheen_lab/programs/whamg/wham/src/bamtools/src/api/internal/bam/wham/src/bamtools/src/api/internal/bam/BamMultiMerger_p.h:123:13: required from here
/usr/include/c++/11/bits/stl_tree.h:770:15: error: static assertion failed: comparison object must be invocable as const
/usr/include/c++/11/bits/stl_tree.h:770:15: note: ‘std::is_invocable_v<const BamTools::Internal::MergeItemSorterBamTools::Algorithms::Sort::ByPosition&, const BamTools::Internal::MergeItem&, const BamTools::Internal::MergeItem&>’ evaluates to false
make[3]: *** [src/api/CMakeFiles/BamTools.dir/build.make:244: src/api/CMakeFiles/BamTools.dir/internal/bam/BamMultiReader_p.cpp.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:320: src/api/CMakeFiles/BamTools.dir/all] Error 2
make[1]: *** [Makefile:136: all] Error 2
make[1]: Leaving directory '/scratch/sheen_lab/programs/whamg/wham/src/bamtools/src/api/internal/bam/wham/src/bamtools/build'
make: *** [Makefile:26: src/bamtools/lib/libbamtools.a] Error 2
AI is telling me to fix :
bool operator()(const BamAlignment& lhs, const BamAlignment& rhs) {
// comparison logic
}
or
bool operator()(const MergeItem& lhs, const MergeItem& rhs) {
// comparison logic
}
and add 'const' to them, as in :
bool operator()(const BamAlignment& lhs, const BamAlignment& rhs) const {
// comparison logic
bool operator()(const MergeItem& lhs, const MergeItem& rhs) const {
// comparison logic
}
However, I am having difficultly finding the above lines in the program.