jermp / fulgor

Fulgor is a fast and space-efficient colored de Bruijn graph index.
MIT License
44 stars 9 forks source link

Fulgor build failed because of 128bits integers #26

Closed Malfoy closed 8 months ago

Malfoy commented 8 months ago

Hello @jermp! I'm trying to build fulgor and I got such compilation problem on several machines using gcc11 and 12

In file included from /home/malfoy/devel/fulgor/tools/../include/index.hpp:6, from /home/malfoy/devel/fulgor/tools/../include/index_types.hpp:3, from /home/malfoy/devel/fulgor/tools/fulgor.cpp:4: /home/malfoy/devel/fulgor/tools/../include/util.hpp: In function ‘int128 unsigned fulgor::util::hash128(const char, uint64_t, uint64_t)’: /home/malfoy/devel/fulgor/tools/../include/util.hpp:143:41: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] 143 | (reinterpret_cast<uint64_t*>(&out) + 0) = ret.first; | ~~~~~~~^~~~ In file included from /usr/include/c++/12/bits/hashtable.h:35, from /usr/include/c++/12/unordered_map:46, from /home/malfoy/devel/fulgor/tools/../include/../external/sshash/include/../external/pthash/include/encoders/encoders.hpp:8, from /home/malfoy/devel/fulgor/tools/../include/../external/sshash/include/../external/pthash/include/pthash.hpp:3, from /home/malfoy/devel/fulgor/tools/../include/../external/sshash/include/hash_util.hpp:3, from /home/malfoy/devel/fulgor/tools/../include/../external/sshash/include/util.hpp:8, from /home/malfoy/devel/fulgor/tools/../include/../external/sshash/include/dictionary.hpp:3, from /home/malfoy/devel/fulgor/tools/../include/index.hpp:3: /usr/include/c++/12/bits/hashtable_policy.h: In instantiation of ‘std::__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, cache_hash_code>::hash_code std::__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, cache_hash_code>::_M_hash_code(const _Key&) const [with _Key = int128 unsigned; _Value = std::pair<const __int128 unsigned, unsigned int>; _ExtractKey = std::detail::_Select1st; _Hash = std::hash<__int128 unsigned>; _RangeHash = std::detail::_Mod_range_hashing; _Unused = std::detail::_Default_ranged_hash; bool cache_hash_code = true; hash_code = long unsigned int]’: /usr/include/c++/12/bits/hashtable.h:1653:46: required from ‘std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::iterator std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::find(const key_type&) [with _Key = int128 unsigned; _Value = std::pair<const __int128 unsigned, unsigned int>; _Alloc = std::allocator<std::pair<const int128 unsigned, unsigned int> >; _ExtractKey = std::detail::_Select1st; _Equal = std::equal_to<__int128 unsigned>; _Hash = std::hash<int128 unsigned>; _RangeHash = std::detail::_Mod_range_hashing; _Unused = std::detail::_Default_ranged_hash; _RehashPolicy = std::detail::_Prime_rehash_policy; _Traits = std::detail::_Hashtable_traits<true, false, true>; iterator = std::detail::_Insert_base<int128 unsigned, std::pair<const int128 unsigned, unsigned int>, std::allocator<std::pair<const int128 unsigned, unsigned int> >, std::detail::_Select1st, std::equal_to<int128 unsigned>, std::hash<__int128 unsigned>, std::detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::detail::_Prime_rehash_policy, std::detail::_Hashtable_traits<true, false, true> >::iterator; key_type = __int128 unsigned]’ /usr/include/c++/12/bits/unordered_map.h:869:25: required from ‘std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::iterator std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::find(const key_type&) [with _Key = int128 unsigned; _Tp = unsigned int; _Hash = std::hash<__int128 unsigned>; _Pred = std::equal_to<__int128 unsigned>; _Alloc = std::allocator<std::pair<const int128 unsigned, unsigned int> >; iterator = std::detail::_Insert_base<int128 unsigned, std::pair<const int128 unsigned, unsigned int>, std::allocator<std::pair<const int128 unsigned, unsigned int> >, std::detail::_Select1st, std::equal_to<__int128 unsigned>, std::hash<__int128 unsigned>, std::detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::detail::_Prime_rehash_policy, std::detail::_Hashtable_traits<true, false, true> >::iterator; key_type = int128 unsigned]’ /home/malfoy/devel/fulgor/tools/../include/meta_builder.hpp:187:52: required from ‘void fulgor::index::meta_builder::build(fulgor::index&) [with ColorClasses = fulgor::meta]’ /home/malfoy/devel/fulgor/tools/build.cpp:9:18: required from here /usr/include/c++/12/bits/hashtable_policy.h:1268:23: error: static assertion failed: hash function must be invocable with an argument of key type 1268 | static_assert(is_invocable<const _Hash&, const _Key&>{}, | ^~~~~~~~~~~ /usr/include/c++/12/bits/hashtable_policy.h:1268:23: note: ‘std::__is_invocable<const std::hash<int128 unsigned>&, const int128 unsigned&>()’ evaluates to false /usr/include/c++/12/bits/hashtable_policy.h:1270:25: error: no match for call to ‘(const std::hash<__int128 unsigned>) (const int128 unsigned&)’ 1270 | return _M_hash()(k); | ~~~^~~ /usr/include/c++/12/bits/hashtable.h: In instantiation of ‘std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::~_Hashtable() [with _Key = int128 unsigned; _Value = std::pair<const int128 unsigned, unsigned int>; _Alloc = std::allocator<std::pair<const __int128 unsigned, unsigned int> >; _ExtractKey = std::detail::_Select1st; _Equal = std::equal_to<__int128 unsigned>; _Hash = std::hash<__int128 unsigned>; _RangeHash = std::detail::_Mod_range_hashing; _Unused = std::detail::_Default_ranged_hash; _RehashPolicy = std::detail::_Prime_rehash_policy; _Traits = std::detail::_Hashtable_traits<true, false, true>]’: /usr/include/c++/12/bits/unordered_map.h:102:11: required from ‘constexpr void std::_Destroy(_Tp) [with _Tp = unordered_map<__int128 unsigned, unsigned int>]’ /usr/include/c++/12/bits/stl_construct.h:163:19: required from ‘static void std::_Destroy_aux< >::destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = std::unordered_map<int128 unsigned, unsigned int>; bool = false]’ /usr/include/c++/12/bits/stl_construct.h:196:11: required from ‘void std::_Destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = unordered_map<int128 unsigned, unsigned int>]’ /usr/include/c++/12/bits/alloc_traits.h:850:15: required from ‘void std::_Destroy(_ForwardIterator, _ForwardIterator, allocator<_T2>&) [with _ForwardIterator = unordered_map<__int128 unsigned, unsigned int>; _Tp = unordered_map<__int128 unsigned, unsigned int>]’ /usr/include/c++/12/bits/stl_vector.h:730:15: required from ‘std::vector<_Tp, _Alloc>::~vector() [with _Tp = std::unordered_map<int128 unsigned, unsigned int>; _Alloc = std::allocator<std::unordered_map<int128 unsigned, unsigned int> >]’ /home/malfoy/devel/fulgor/tools/../include/meta_builder.hpp:179:68: required from ‘void fulgor::index::meta_builder::build(fulgor::index&) [with ColorClasses = fulgor::meta]’ /home/malfoy/devel/fulgor/tools/build.cpp:9:18: required from here /usr/include/c++/12/bits/hashtable.h:1586:5: error: use of deleted function ‘std::detail::_Hashtable_base<int128 unsigned, std::pair<const int128 unsigned, unsigned int>, std::detail::_Select1st, std::equal_to<int128 unsigned>, std::hash<__int128 unsigned>, std::detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::detail::_Hashtable_traits<true, false, true> >::~_Hashtable_base()’ 1586 | } | ^ /usr/include/c++/12/bits/hashtable_policy.h:1631:12: note: ‘std::detail::_Hashtable_base<int128 unsigned, std::pair<const int128 unsigned, unsigned int>, std::detail::_Select1st, std::equal_to<__int128 unsigned>, std::hash<__int128 unsigned>, std::detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::detail::_Hashtable_traits<true, false, true> >::~_Hashtable_base()’ is implicitly deleted because the default definition would be ill-formed: 1631 | struct _Hashtable_base | ^~~~~~~ /usr/include/c++/12/bits/hashtable_policy.h:1631:12: error: use of deleted function ‘std::detail::_Hash_code_base<int128 unsigned, std::pair<const int128 unsigned, unsigned int>, std::__detail::_Select1st, std::hash<int128 unsigned>, std::detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, true>::~_Hash_code_base()’ /usr/include/c++/12/bits/hashtable_policy.h:1239:12: note: ‘std::detail::_Hash_code_base<int128 unsigned, std::pair<const int128 unsigned, unsigned int>, std::detail::_Select1st, std::hash<__int128 unsigned>, std::__detail::_Mod_range_hashing, std::detail::_Default_ranged_hash, true>::~_Hash_code_base()’ is implicitly deleted because the default definition would be ill-formed: 1239 | struct _Hash_code_base | ^~~~~~~ /usr/include/c++/12/bits/hashtable_policy.h:1239:12: error: use of deleted function ‘std::detail::_Hashtable_ebo_helper<1, std::hash<__int128 unsigned>, true>::~_Hashtable_ebo_helper()’ /usr/include/c++/12/bits/hashtable_policy.h:1175:12: note: ‘std::__detail::_Hashtable_ebo_helper<1, std::hash<int128 unsigned>, true>::~_Hashtable_ebo_helper()’ is implicitly deleted because the default definition would be ill-formed: 1175 | struct _Hashtable_ebo_helper<_Nm, _Tp, true> | ^~~~~~~~~ /usr/include/c++/12/bits/hashtable_policy.h:1175:12: error: use of deleted function ‘std::hash<__int128 unsigned>::~hash()’ In file included from /usr/include/c++/12/string_view:43, from /usr/include/c++/12/bits/basic_string.h:47, from /usr/include/c++/12/string:53, from /usr/include/c++/12/bits/locale_classes.h:40, from /usr/include/c++/12/bits/ios_base.h:41, from /usr/include/c++/12/ios:42, from /usr/include/c++/12/ostream:38, from /usr/include/c++/12/iostream:39, from /home/malfoy/devel/fulgor/tools/fulgor.cpp:1: /usr/include/c++/12/bits/functional_hash.h:102:12: note: ‘std::hash<__int128 unsigned>::~hash()’ is implicitly deleted because the default definition would be ill-formed: 102 | struct hash : hash_enum<_Tp> | ^~~~ /usr/include/c++/12/bits/functional_hash.h:102:12: error: ‘std::hash_enum<_Tp, >::~hash_enum() [with _Tp = __int128 unsigned; bool = false]’ is private within this context /usr/include/c++/12/bits/functional_hash.h:84:7: note: declared private here 84 | ~hash_enum(); | ^ In file included from /usr/include/c++/12/bits/alloc_traits.h:33, from /usr/include/c++/12/ext/alloc_traits.h:34, from /usr/include/c++/12/bits/basic_string.h:39: /usr/include/c++/12/bits/stl_construct.h: In instantiation of ‘void std::_Construct(_Tp, _Args&& ...) [with _Tp = unordered_map<__int128 unsigned, unsigned int>; _Args = {}]’: /usr/include/c++/12/bits/stl_uninitialized.h:638:18: required from ‘static _ForwardIterator std::uninitialized_default_n_1<_TrivialValueType>::uninit_default_n(_ForwardIterator, _Size) [with _ForwardIterator = std::unordered_map<__int128 unsigned, unsigned int>; _Size = long unsigned int; bool _TrivialValueType = false]’ /usr/include/c++/12/bits/stl_uninitialized.h:701:20: required from ‘_ForwardIterator std::uninitialized_default_n(_ForwardIterator, _Size) [with _ForwardIterator = unordered_map<int128 unsigned, unsigned int>; _Size = long unsigned int]’ /usr/include/c++/12/bits/stl_uninitialized.h:766:44: required from ‘_ForwardIterator std::uninitialized_default_n_a(_ForwardIterator, _Size, allocator<_Tp>&) [with _ForwardIterator = unordered_map<int128 unsigned, unsigned int>; _Size = long unsigned int; _Tp = unordered_map<int128 unsigned, unsigned int>]’ /usr/include/c++/12/bits/vector.tcc:644:35: required from ‘void std::vector<_Tp, _Alloc>::_M_default_append(size_type) [with _Tp = std::unordered_map<int128 unsigned, unsigned int>; _Alloc = std::allocator<std::unordered_map<int128 unsigned, unsigned int> >; size_type = long unsigned int]’ /usr/include/c++/12/bits/stl_vector.h:1011:4: required from ‘void std::vector<_Tp, _Alloc>::resize(size_type) [with _Tp = std::unordered_map<int128 unsigned, unsigned int>; _Alloc = std::allocator<std::unordered_map<int128 unsigned, unsigned int> >; size_type = long unsigned int]’ /home/malfoy/devel/fulgor/tools/../include/meta_builder.hpp:180:26: required from ‘void fulgor::index::meta_builder::build(fulgor::index&) [with ColorClasses = fulgor::meta]’ /home/malfoy/devel/fulgor/tools/build.cpp:9:18: required from here /usr/include/c++/12/bits/stl_construct.h:119:7: error: use of deleted function ‘std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = int128 unsigned; _Tp = unsigned int; _Hash = std::hash<int128 unsigned>; _Pred = std::equal_to<__int128 unsigned>; _Alloc = std::allocator<std::pair<const int128 unsigned, unsigned int> >]’ 119 | ::new((void)p) _Tp(std::forward<_Args>(args)...); | ^~~~~~~~~~~~~ In file included from /usr/include/c++/12/unordered_map:47: /usr/include/c++/12/bits/unordered_map.h:141:7: note: ‘std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = int128 unsigned; _Tp = unsigned int; _Hash = std::hash<int128 unsigned>; _Pred = std::equal_to<__int128 unsigned>; _Alloc = std::allocator<std::pair<const int128 unsigned, unsigned int> >]’ is implicitly deleted because the default definition would be ill-formed: 141 | unordered_map() = default; | ^~~~~ /usr/include/c++/12/bits/unordered_map.h:141:7: error: use of deleted function ‘std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::_Hashtable() [with _Key = __int128 unsigned; _Value = std::pair<const int128 unsigned, unsigned int>; _Alloc = std::allocator<std::pair<const int128 unsigned, unsigned int> >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<int128 unsigned>; _Hash = std::hash<__int128 unsigned>; _RangeHash = std::detail::_Mod_range_hashing; _Unused = std::detail::_Default_ranged_hash; _RehashPolicy = std::detail::_Prime_rehash_policy; _Traits = std::detail::_Hashtable_traits<true, false, true>]’ /usr/include/c++/12/bits/hashtable.h:531:7: note: ‘std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::_Hashtable() [with _Key = int128 unsigned; _Value = std::pair<const __int128 unsigned, unsigned int>; _Alloc = std::allocator<std::pair<const int128 unsigned, unsigned int> >; _ExtractKey = std::detail::_Select1st; _Equal = std::equal_to<__int128 unsigned>; _Hash = std::hash<int128 unsigned>; _RangeHash = std::detail::_Mod_range_hashing; _Unused = std::detail::_Default_ranged_hash; _RehashPolicy = std::detail::_Prime_rehash_policy; _Traits = std::detail::_Hashtable_traits<true, false, true>]’ is implicitly deleted because the default definition would be ill-formed: 531 | _Hashtable() = default; | ^~~~~~ /usr/include/c++/12/bits/hashtable.h:531:7: error: use of deleted function ‘std::detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _Traits>::_Hashtable_base() [with _Key = __int128 unsigned; _Value = std::pair<const int128 unsigned, unsigned int>; _ExtractKey = std::detail::_Select1st; _Equal = std::equal_to<__int128 unsigned>; _Hash = std::hash<int128 unsigned>; _RangeHash = std::detail::_Mod_range_hashing; _Unused = std::detail::_Default_ranged_hash; _Traits = std::detail::_Hashtable_traits<true, false, true>]’ /usr/include/c++/12/bits/hashtable_policy.h:1674:7: note: ‘std::__detail::_Hashtable_base<_Key, _Value, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _Traits>::_Hashtable_base() [with _Key = int128 unsigned; _Value = std::pair<const int128 unsigned, unsigned int>; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<int128 unsigned>; _Hash = std::hash<__int128 unsigned>; _RangeHash = std::detail::_Mod_range_hashing; _Unused = std::detail::_Default_ranged_hash; _Traits = std::detail::_Hashtable_traits<true, false, true>]’ is implicitly deleted because the default definition would be ill-formed: 1674 | _Hashtable_base() = default; | ^~~~~~~ /usr/include/c++/12/bits/hashtable_policy.h:1674:7: error: use of deleted function ‘std::__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, cache_hash_code>::_Hash_code_base() [with _Key = int128 unsigned; _Value = std::pair<const __int128 unsigned, unsigned int>; _ExtractKey = std::detail::_Select1st; _Hash = std::hash<__int128 unsigned>; _RangeHash = std::detail::_Mod_range_hashing; _Unused = std::detail::_Default_ranged_hash; bool cache_hash_code = true]’ /usr/include/c++/12/bits/hashtable_policy.h:1261:7: note: ‘std::__detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, cache_hash_code>::_Hash_code_base() [with _Key = int128 unsigned; _Value = std::pair<const __int128 unsigned, unsigned int>; _ExtractKey = std::detail::_Select1st; _Hash = std::hash<__int128 unsigned>; _RangeHash = std::detail::_Mod_range_hashing; _Unused = std::detail::_Default_ranged_hash; bool cache_hash_code = true]’ is implicitly deleted because the default definition would be ill-formed: 1261 | _Hash_code_base() = default; | ^~~~~~~ /usr/include/c++/12/bits/hashtable_policy.h:1261:7: error: use of deleted function ‘std::detail::_Hashtable_ebo_helper<1, std::hash<__int128 unsigned>, true>::~_Hashtable_ebo_helper()’ /usr/include/c++/12/bits/hashtable_policy.h:1674:7: error: use of deleted function ‘std::detail::_Hash_code_base<int128 unsigned, std::pair<const int128 unsigned, unsigned int>, std::__detail::_Select1st, std::hash<int128 unsigned>, std::detail::_Mod_range_hashing, std::detail::_Default_ranged_hash, true>::~_Hash_code_base()’ 1674 | _Hashtable_base() = default; | ^~~~~~~ /usr/include/c++/12/bits/hashtable.h:531:7: error: use of deleted function ‘std::detail::_Hashtable_base<int128 unsigned, std::pair<const int128 unsigned, unsigned int>, std::detail::_Select1st, std::equal_to<int128 unsigned>, std::hash<__int128 unsigned>, std::__detail::_Mod_range_hashing, std::detail::_Default_ranged_hash, std::detail::_Hashtable_traits<true, false, true> >::~_Hashtable_base()’ 531 | _Hashtable() = default; | ^~~~~~ /usr/include/c++/12/bits/hashtable.h:531:7: error: use of deleted function ‘constexpr std::_Enable_default_constructor<false, _Tag>::_Enable_default_constructor() [with _Tag = std::detail::_Hash_node_base]’ In file included from /usr/include/c++/12/bits/hashtable.h:36: /usr/include/c++/12/bits/enable_special_members.h:113:15: note: declared here 113 | constexpr _Enable_default_constructor() noexcept = delete; | ^~~~~~~ /usr/include/c++/12/bits/hashtable.h: In instantiation of ‘std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>::_Hashtable(const std::_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal, _Hash, _RangeHash, _Unused, _RehashPolicy, _Traits>&) [with _Key = int128 unsigned; _Value = std::pair<const int128 unsigned, unsigned int>; _Alloc = std::allocator<std::pair<const int128 unsigned, unsigned int> >; _ExtractKey = std::__detail::_Select1st; _Equal = std::equal_to<int128 unsigned>; _Hash = std::hash<__int128 unsigned>; _RangeHash = std::detail::_Mod_range_hashing; _Unused = std::detail::_Default_ranged_hash; _RehashPolicy = std::detail::_Prime_rehash_policy; _Traits = std::detail::_Hashtable_traits<true, false, true>]’: /usr/include/c++/12/bits/unordered_map.h:181:7: required from ‘void std::_Construct(_Tp, _Args&& ...) [with _Tp = unordered_map<int128 unsigned, unsigned int>; _Args = {const unordered_map<int128 unsigned, unsigned int, hash<__int128 unsigned>, equal_to<__int128 unsigned>, allocator<pair<const int128 unsigned, unsigned int> > >&}]’ /usr/include/c++/12/bits/stl_uninitialized.h:120:21: required from ‘_ForwardIterator std::do_uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = const unordered_map<int128 unsigned, unsigned int>*; _ForwardIterator = unordered_map<int128 unsigned, unsigned int>]’ /usr/include/c++/12/bits/stl_uninitialized.h:137:32: required from ‘static _ForwardIterator std::uninitialized_copy<_TrivialValueTypes>::uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = const std::unordered_map<__int128 unsigned, unsigned int>; _ForwardIterator = std::unordered_map<int128 unsigned, unsigned int>; bool _TrivialValueTypes = false]’ /usr/include/c++/12/bits/stl_uninitialized.h:185:15: required from ‘_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = const unordered_map<__int128 unsigned, unsigned int>; _ForwardIterator = unordered_map<int128 unsigned, unsigned int>*]’ /usr/include/c++/12/bits/stl_uninitialized.h:372:37: required from ‘_ForwardIterator std::uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, allocator<_Tp>&) [with _InputIterator = const unordered_map<int128 unsigned, unsigned int>*; _ForwardIterator = unordered_map<int128 unsigned, unsigned int>; _Tp = unordered_map<int128 unsigned, unsigned int>]’ /usr/include/c++/12/bits/stl_uninitialized.h:397:2: required from ‘_ForwardIterator std::uninitialized_move_if_noexcept_a(_InputIterator, _InputIterator, _ForwardIterator, _Allocator&) [with _InputIterator = unordered_map<__int128 unsigned, unsigned int>; _ForwardIterator = unordered_map<int128 unsigned, unsigned int>*; _Allocator = allocator<unordered_map<int128 unsigned, unsigned int> >]’ /usr/include/c++/12/bits/vector.tcc:681:48: required from ‘void std::vector<_Tp, _Alloc>::_M_default_append(size_type) [with _Tp = std::unordered_map<int128 unsigned, unsigned int>; _Alloc = std::allocator<std::unordered_map<int128 unsigned, unsigned int> >; size_type = long unsigned int]’ /usr/include/c++/12/bits/stl_vector.h:1011:4: required from ‘void std::vector<_Tp, _Alloc>::resize(size_type) [with _Tp = std::unordered_map<int128 unsigned, unsigned int>; _Alloc = std::allocator<std::unordered_map<int128 unsigned, unsigned int> >; size_type = long unsigned int]’ /home/malfoy/devel/fulgor/tools/../include/meta_builder.hpp:180:26: required from ‘void fulgor::index::meta_builder::build(fulgor::index&) [with ColorClasses = fulgor::meta]’ /home/malfoy/devel/fulgor/tools/build.cpp:9:18: required from here /usr/include/c++/12/bits/hashtable.h:1461:45: error: use of deleted function ‘std::detail::_Hashtable_base<int128 unsigned, std::pair<const int128 unsigned, unsigned int>, std::detail::_Select1st, std::equal_to<__int128 unsigned>, std::hash<__int128 unsigned>, std::__detail::_Mod_range_hashing, std::detail::_Default_ranged_hash, std::detail::_Hashtable_traits<true, false, true> >::_Hashtable_base(const std::detail::_Hashtable_base<int128 unsigned, std::pair<const int128 unsigned, unsigned int>, std::detail::_Select1st, std::equal_to<int128 unsigned>, std::hash<__int128 unsigned>, std::detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::detail::_Hashtable_traits<true, false, true> >&)’ 1461 | _M_rehash_policy(ht._M_rehash_policy) | ^ /usr/include/c++/12/bits/hashtable_policy.h:1631:12: note: ‘std::detail::_Hashtable_base<int128 unsigned, std::pair<const int128 unsigned, unsigned int>, std::detail::_Select1st, std::equal_to<int128 unsigned>, std::hash<__int128 unsigned>, std::detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::detail::_Hashtable_traits<true, false, true> >::_Hashtable_base(const std::detail::_Hashtable_base<int128 unsigned, std::pair<const int128 unsigned, unsigned int>, std::detail::_Select1st, std::equal_to<__int128 unsigned>, std::hash<__int128 unsigned>, std::detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::detail::_Hashtable_traits<true, false, true> >&)’ is implicitly deleted because the default definition would be ill-formed: 1631 | struct _Hashtable_base | ^~~~~~~ /usr/include/c++/12/bits/hashtable_policy.h:1631:12: error: use of deleted function ‘std::detail::_Hash_code_base<int128 unsigned, std::pair<const int128 unsigned, unsigned int>, std::__detail::_Select1st, std::hash<int128 unsigned>, std::detail::_Mod_range_hashing, std::detail::_Default_ranged_hash, true>::_Hash_code_base(const std::detail::_Hash_code_base<int128 unsigned, std::pair<const int128 unsigned, unsigned int>, std::detail::_Select1st, std::hash<__int128 unsigned>, std::detail::_Mod_range_hashing, std::detail::_Default_ranged_hash, true>&)’ /usr/include/c++/12/bits/hashtable_policy.h:1239:12: note: ‘std::detail::_Hash_code_base<int128 unsigned, std::pair<const int128 unsigned, unsigned int>, std::detail::_Select1st, std::hash<__int128 unsigned>, std::detail::_Mod_range_hashing, std::detail::_Default_ranged_hash, true>::_Hash_code_base(const std::detail::_Hash_code_base<int128 unsigned, std::pair<const int128 unsigned, unsigned int>, std::detail::_Select1st, std::hash<__int128 unsigned>, std::detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, true>&)’ is implicitly deleted because the default definition would be ill-formed: 1239 | struct _Hash_code_base | ^~~~~~~ /usr/include/c++/12/bits/hashtable_policy.h:1239:12: error: use of deleted function ‘std::detail::_Hashtable_ebo_helper<1, std::hash<__int128 unsigned>, true>::_Hashtable_ebo_helper(const std::detail::_Hashtable_ebo_helper<1, std::hash<__int128 unsigned>, true>&)’ /usr/include/c++/12/bits/hashtable_policy.h:1175:12: note: ‘std::detail::_Hashtable_ebo_helper<1, std::hash<__int128 unsigned>, true>::_Hashtable_ebo_helper(const std::detail::_Hashtable_ebo_helper<1, std::hash<__int128 unsigned>, true>&)’ is implicitly deleted because the default definition would be ill-formed: 1175 | struct _Hashtable_ebo_helper<_Nm, _Tp, true> | ^~~~~~~~~ /usr/include/c++/12/bits/hashtable_policy.h:1175:12: error: use of deleted function ‘std::hash<__int128 unsigned>::hash(const std::hash<__int128 unsigned>&)’ /usr/include/c++/12/bits/functional_hash.h:102:12: note: ‘std::hash<int128 unsigned>::hash(const std::hash<__int128 unsigned>&)’ is implicitly deleted because the default definition would be ill-formed: 102 | struct hash : hash_enum<_Tp> | ^~~~ /usr/include/c++/12/bits/functional_hash.h:102:12: error: use of deleted function ‘constexpr std::__hash_enum<int128 unsigned, false>::hash_enum(const std::__hash_enum<int128 unsigned, false>&)’ /usr/include/c++/12/bits/functional_hash.h:79:12: note: ‘constexpr std::hash_enum<int128 unsigned, false>::hash_enum(const std::hash_enum<int128 unsigned, false>&)’ is implicitly declared as deleted because ‘std::hash_enum<int128 unsigned, false>’ declares a move constructor or move assignment operator 79 | struct hash_enum | ^~~ /usr/include/c++/12/bits/functional_hash.h:102:12: error: ‘std::hash_enum<_Tp, >::~hash_enum() [with _Tp = int128 unsigned; bool = false]’ is private within this context 102 | struct hash : hash_enum<_Tp> | ^~~~ /usr/include/c++/12/bits/functional_hash.h:84:7: note: declared private here 84 | ~hash_enum(); | ^ /usr/include/c++/12/bits/hashtable_policy.h:1175:12: error: use of deleted function ‘std::hash<int128 unsigned>::~hash()’ 1175 | struct _Hashtable_ebo_helper<_Nm, _Tp, true> | ^~~~~~~~~ /usr/include/c++/12/bits/hashtable_policy.h:1239:12: error: use of deleted function ‘std::detail::_Hashtable_ebo_helper<1, std::hash<__int128 unsigned>, true>::~_Hashtable_ebo_helper()’ 1239 | struct _Hash_code_base | ^~~~~~~ /usr/include/c++/12/bits/hashtable_policy.h:1631:12: error: use of deleted function ‘std::detail::_Hash_code_base<int128 unsigned, std::pair<const int128 unsigned, unsigned int>, std::detail::_Select1st, std::hash<__int128 unsigned>, std::__detail::_Mod_range_hashing, std::detail::_Default_ranged_hash, true>::~_Hash_code_base()’ 1631 | struct _Hashtable_base | ^~~~~~~ /usr/include/c++/12/bits/hashtable.h:1461:45: error: use of deleted function ‘std::detail::_Hashtable_base<int128 unsigned, std::pair<const int128 unsigned, unsigned int>, std::detail::_Select1st, std::equal_to<__int128 unsigned>, std::hash<__int128 unsigned>, std::detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::detail::_Hashtable_traits<true, false, true> >::~_Hashtable_base()’ 1461 | _M_rehash_policy(__ht._M_rehash_policy)

jermp commented 8 months ago

Hi @Malfoy, that seems very strange indeed. I confirm the warning regarding the strict aliasing rule, but I never saw compilation issues on gcc-11 and gcc-12.

I can successfully compile with all the following versions, both on Linux and Mac OS.

gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
gcc version 11.1.0 (Ubuntu 11.1.0-1ubuntu1~18.04.1) 
gcc version 12.3.0 (Ubuntu 12.3.0-1ubuntu1~22.04)
Apple clang version 13.0.0 (clang-1300.0.27.3)

Could you please better check or provide the OS name?

It looks like your machine has problems in hashing 128-bit integers. If so, the solution is to explicitly provide the hasher functor to work with __uint128. The problem here is that I cannot test if this approach works on your end because I cannot replicate your issue.

jermp commented 8 months ago

Hi @Malfoy, any update on this?

Malfoy commented 8 months ago

Sadly no we are not able to compile it (except on mac). I'm actually able to complete compilation with clang but the linking step fail

usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_api.a(ggcat.o): in function ggcat::GGCATInstance::query_graph(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long, unsigned long, bool, bool, unsigned long, unsigned long)': ggcat.cc:(.text+0x36b): undefined reference tostd::cxx11::basic_string<char, std::char_traits, std::allocator >::_M_create(unsigned long&, unsigned long)' /usr/bin/ld: ggcat.cc:(.text+0x3a9): undefined reference to `std::throw_logic_error(char const)' /usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_api.a(ggcat.o): in function ggcat::GGCATInstance::get_colormap_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)': ggcat.cc:(.text+0x4bb): undefined reference tostd::cxx11::basic_string<char, std::char_traits, std::allocator >::_M_create(unsigned long&, unsigned long)' /usr/bin/ld: ggcat.cc:(.text+0x4f6): undefined reference to `std::throw_logic_error(char const)' /usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_api.a(ggcat.o): in function ggcat::GGCATInstance::build_graph_internal_ffi(ggcat::Slice<ggcat::__InputStreamBlockData>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long, unsigned long, bool, unsigned long, ggcat::ExtraElaborationStep, bool, ggcat::Slice<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, unsigned long)': ggcat.cc:(.text+0x97b): undefined reference tostd::cxx11::basic_string<char, std::char_traits, std::allocator >::_M_create(unsigned long&, unsigned long)' /usr/bin/ld: ggcat.cc:(.text+0x9f7): undefined reference to `std::throw_logic_error(char const)' /usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_api.a(ggcat.o): in function ggcat::GGCATInstance::build_graph_from_files(ggcat::Slice<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long, unsigned long, bool, unsigned long, ggcat::ExtraElaborationStep, bool, ggcat::Slice<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, unsigned long)': ggcat.cc:(.text+0xe7d): undefined reference tostd::cxx11::basic_string<char, std::char_traits, std::allocator >::_M_create(unsigned long&, unsigned long)' /usr/bin/ld: ggcat.cc:(.text+0xf19): undefined reference to `std::throw_logic_error(char const)' /usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_api.a(ggcat.o): in function ggcat::GGCATInstance::dump_colors(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)': ggcat.cc:(.text+0x116b): undefined reference tostd::cxx11::basic_string<char, std::char_traits, std::allocator >::_M_create(unsigned long&, unsigned long)' /usr/bin/ld: ggcat.cc:(.text+0x1233): undefined reference to `std::throw_logic_error(char const)' /usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_api.a(ggcat.o): in function `void std::vector<InputStreamFFI, std::allocator >::_M_realloc_insert<InputStreamFFI const&>(__gnu_cxx::__normal_iterator<InputStreamFFI, std::vector<InputStreamFFI, std::allocator > >, InputStreamFFI const&)': ggcat.cc:(.text._ZNSt6vectorI14InputStreamFFISaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9gnu_cxx17normal_iteratorIPS0_S2EEDpOT[_ZNSt6vectorI14InputStreamFFISaIS0_EE17_M_realloc_insertIJRKS0_EEEvN9gnu_cxx17normal_iteratorIPS0_S2EEDpOT]+0x163): undefined reference to std::__throw_length_error(char const*)' /usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_api.a(ggcat.o): in functionvoid std::vector<rust::cxxbridge1::String, std::allocator >::_M_realloc_insert(gnu_cxx::__normal_iterator<rust::cxxbridge1::String*, std::vector<rust::cxxbridge1::String, std::allocator > >, rust::cxxbridge1::String&&)': ggcat.cc:(.text._ZNSt6vectorIN4rust10cxxbridge16StringESaIS2_EE17_M_realloc_insertIJS2_EEEvN9gnu_cxx17normal_iteratorIPS2_S4EEDpOT[_ZNSt6vectorIN4rust10cxxbridge16StringESaIS2_EE17_M_realloc_insertIJS2_EEEvN9gnu_cxx17normal_iteratorIPS2_S4EEDpOT]+0x1aa): undefined reference to `std::throw_length_error(char const)' /usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_api.a(ggcat.o): in function `void std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >::_M_realloc_insert<std::cxx11::basic_string<char, std::char_traits, std::allocator > >(gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >, std::cxx11::basic_string<char, std::char_traits, std::allocator >&&)': ggcat.cc:(.text._ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9gnu_cxx17normal_iteratorIPS5_S7EEDpOT[_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9gnu_cxx17normal_iteratorIPS5_S7EEDpOT]+0x25a): undefined reference to `std::throw_length_error(char const)' /usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_cpp_bindings.a(270357abc9656d3f-cxx.o): in function cxxbridge1$cxx_string$init': cxx.cc:(.text.cxxbridge1$cxx_string$init+0x89): undefined reference tostd::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_create(unsigned long&, unsigned long)' /usr/bin/ld: cxx.cc:(.text.cxxbridge1$cxx_string$init+0xb7): undefined reference to `std::__throw_logic_error(char const)' /usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_cpp_bindings.a(270357abc9656d3f-cxx.o): in function cxxbridge1$cxx_string$reserve_total': cxx.cc:(.text.cxxbridge1$cxx_string$reserve_total+0x9): undefined reference tostd::cxx11::basic_string<char, std::char_traits, std::allocator >::reserve(unsigned long)' /usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_cpp_bindings.a(270357abc9656d3f-cxx.o): in function cxxbridge1$cxx_string$push': cxx.cc:(.text.cxxbridge1$cxx_string$push+0x1c): undefined reference tostd::cxx11::basic_string<char, std::char_traits, std::allocator >::_M_append(char const, unsigned long)' /usr/bin/ld: cxx.cc:(.text.cxxbridge1$cxx_string$push+0x2d): undefined reference to `std::__throw_length_error(char const)' /usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_cpp_bindings.a(270357abc9656d3f-cxx.o): in function void rust::cxxbridge1::panic<std::out_of_range>(char const*)': cxx.cc:(.text.unlikely._ZN4rust10cxxbridge15panicISt12out_of_rangeEEvPKc[_ZN4rust10cxxbridge15panicISt12out_of_rangeEEvPKc]+0x1f): undefined reference tostd::out_of_range::out_of_range(char const)' /usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_cpp_bindings.a(270357abc9656d3f-cxx.o): in function rust::cxxbridge1::String::operator std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >() const': cxx.cc:(.text._ZNK4rust10cxxbridge16StringcvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv+0xa9): undefined reference tostd::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_create(unsigned long&, unsigned long)' /usr/bin/ld: cxx.cc:(.text._ZNK4rust10cxxbridge16StringcvNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv+0xd9): undefined reference to `std::throw_logic_error(char const)' /usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_cpp_bindings.a(270357abc9656d3f-cxx.o): in function rust::cxxbridge1::operator<<(std::ostream&, rust::cxxbridge1::String const&)': cxx.cc:(.text._ZN4rust10cxxbridge1lsERSoRKNS0_6StringE+0x2c): undefined reference tostd::ostream::write(char const, long)' /usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_cpp_bindings.a(270357abc9656d3f-cxx.o): in function rust::cxxbridge1::Str::operator std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >() const': cxx.cc:(.text._ZNK4rust10cxxbridge13StrcvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv+0xa9): undefined reference tostd::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_create(unsigned long&, unsigned long)' /usr/bin/ld: cxx.cc:(.text._ZNK4rust10cxxbridge13StrcvNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv+0xd9): undefined reference to `std::throw_logic_error(char const)' /usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_cpp_bindings.a(270357abc9656d3f-cxx.o): in function rust::cxxbridge1::operator<<(std::ostream&, rust::cxxbridge1::Str const&)': cxx.cc:(.text._ZN4rust10cxxbridge1lsERSoRKNS0_3StrE+0x2c): undefined reference tostd::ostream::write(char const, long)' /usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_cpp_bindings.a(270357abc9656d3f-cxx.o): in function cxxbridge1$std$vector$u8$push_back': cxx.cc:(.text.cxxbridge1$std$vector$u8$push_back+0x109): undefined reference tostd::__throw_length_error(char const)' /usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_cpp_bindings.a(270357abc9656d3f-cxx.o): in function cxxbridge1$std$vector$u16$push_back': cxx.cc:(.text.cxxbridge1$std$vector$u16$push_back+0x11b): undefined reference tostd::throw_length_error(char const*)' /usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_cpp_bindings.a(270357abc9656d3f-cxx.o): in function cxxbridge1$std$vector$u32$push_back': cxx.cc:(.text.cxxbridge1$std$vector$u32$push_back+0x11f): undefined reference tostd::throw_length_error(char const)' /usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_cpp_bindings.a(270357abc9656d3f-cxx.o): in function cxxbridge1$std$vector$u64$push_back': cxx.cc:(.text.cxxbridge1$std$vector$u64$push_back+0x11f): undefined reference tostd::__throw_length_error(char const)' /usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_cpp_bindings.a(270357abc9656d3f-cxx.o): in function cxxbridge1$std$vector$i8$push_back': cxx.cc:(.text.cxxbridge1$std$vector$i8$push_back+0x109): undefined reference tostd::throw_length_error(char const)' /usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_cpp_bindings.a(270357abc9656d3f-cxx.o):cxx.cc:(.text.cxxbridge1$std$vector$i16$push_back+0x11b): more undefined references to `std::__throw_length_error(char const)' follow /usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_cpp_bindings.a(270357abc9656d3f-cxx.o): in function void rust::cxxbridge1::panic<std::invalid_argument>(char const*)': cxx.cc:(.text.unlikely._ZN4rust10cxxbridge15panicISt16invalid_argumentEEvPKc[_ZN4rust10cxxbridge15panicISt16invalid_argumentEEvPKc]+0x1f): undefined reference tostd::invalid_argument::invalid_argument(char const*)' /usr/bin/ld: ../external/ggcat/crates/capi/ggcat-cpp-api/lib/libggcat_cpp_bindings.a(270357abc9656d3f-cxx.o): in function `_GLOBAL__sub_I_cxx.cc': cxx.cc:(.text.startup._GLOBALsub_I_cxx.cc+0x10): undefined reference to std::ios_base::Init::Init()' /usr/bin/ld: cxx.cc:(.text.startup._GLOBAL__sub_I_cxx.cc+0x17): undefined reference tostd::ios_base::Init::~Init()' /usr/bin/ld: /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x23 CMakeFiles/fulgor.dir/tools/fulgor.cpp.o: in function fulgor::GGCAT::build(fulgor::build_configuration const&)': fulgor.cpp:(.text._ZN6fulgor5GGCAT5buildERKNS_19build_configurationE[_ZN6fulgor5GGCAT5buildERKNS_19build_configurationE]+0x5e0): undefined reference toggcat::GGCATInstance::build_graph_from_files(ggcat::Slice<std::1::basic_string<char, std::__1::char_traits, std::1::allocator > >, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >, unsigned long, unsigned long, bool, unsigned long, ggcat::ExtraElaborationStep, bool, ggcat::Slice<std::1::basic_string<char, std::__1::char_traits, std::1::allocator > >, unsigned long)' /usr/bin/ld: CMakeFiles/fulgor.dir/tools/fulgor.cpp.o: in function fulgor::GGCAT::loop_through_unitigs(std::__1::function<void (ggcat::Slice<char>, ggcat::Slice<unsigned int>, bool)>, unsigned long) const': fulgor.cpp:(.text._ZNK6fulgor5GGCAT20loop_through_unitigsENSt3__18functionIFvN5ggcat5SliceIcEENS4_IjEEbEEEm[_ZNK6fulgor5GGCAT20loop_through_unitigsENSt3__18functionIFvN5ggcat5SliceIcEENS4_IjEEbEEEm]+0xa9): undefined reference toggcat::GGCATInstance::dump_unitigs_internal(std::1::basic_string<char, std::__1::char_traits, std::1::allocator >, unsigned long, unsigned long, bool, unsigned long, bool, unsigned long, unsigned long)' clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: [CMakeFiles/fulgor.dir/build.make:101: fulgor] Error 1 make[1]: [CMakeFiles/Makefile2:139: CMakeFiles/fulgor.dir/all] Error 2 make: *** [Makefile:91: all] Error 2

Malfoy commented 8 months ago

Do you think it would be possible to provide a release build ?

jermp commented 8 months ago

Mmmh that seems a GGCAT-related problem. Have you tried to first update your Rust version with rustup update ? Otherwise, I would suggest a fresh reclone with --recursive. As per my previous comment, I cannot replicate this issue as it works for me on several machines, both Linux and Mac (even with Apple Silicon).

CC: @rob-p, have you noticed some problems?

rob-p commented 8 months ago

Hi @jermp and @Malfoy,

Actually, I can reproduce this issue on at least one machine. The origin is

/usr/include/c++/11/bits/hashtable_policy.h:1217:23: error: static assertion failed: hash function must be invocable with an argument of key type
 1217 |         static_assert(__is_invocable<const _Hash&, const _Key&>{},
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/hashtable_policy.h:1217:23: note: ‘std::__is_invocable<const std::hash<__int128 unsigned>&, const __int128 unsigned&>{}’ evaluates to false
/usr/include/c++/11/bits/hashtable_policy.h:1219:25: error: no match for call to ‘(const std::hash<__int128 unsigned>) (const __int128 unsigned&)’
 1219 |         return _M_hash()(__k);
      |                ~~~~~~~~~^~~~~

details:

✦3 ❯ g++ --version
g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
✦3 ❯ uname -a
Linux machine 6.2.0-33-generic #33~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep  7 10:33:52 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
jermp commented 8 months ago

Ok, I've pushed a custom hasher for __uint128_t. This issue should be fixed as of https://github.com/jermp/fulgor/commit/75fb04a427cc44727255b8419798a5713958db08. Can you please check? Thanks! -Giulio

rob-p commented 8 months ago

Hi @jermp,

Thanks! I can confirm that on my machine where I could reproduce this issue, your commit fixes it!

--Rob

jermp commented 8 months ago

Thanks for confirming @rob-p! Let's also see what @Malfoy is getting before closing the issue...

Best, -Giulio

Malfoy commented 8 months ago

It works, thank you so much!