Closed
Description
Describe the issue
Hash insert_or_assign() build failure, with GCC 14.2.1, on Linux.
Urgency
No response
Target platform
Linux
Build script
Gentoo ebuild derived from https://github.com/stefantalpalaru/gentoo-overlay/tree/master/sci-libs/onnxruntime
Error / output
Full build log: https://gist.github.com/stefantalpalaru/b274c2b4a8813d393e3b7ed881cfee3d
Snippet:
FAILED: CMakeFiles/onnxruntime_framework.dir/var/tmp/portage/sci-libs/onnxruntime-1.21.0/work/onnxruntime-1.21.0/onnxruntime/core/framework/resource_accountant.cc.o
/usr/bin/x86_64-pc-linux-gnu-g++ -DCPUINFO_SUPPORTED_PLATFORM=1 -DDISABLE_ABSEIL -DDISABLE_CONTRIB_OPS -DDISABLE_CUSPARSE_DEPRECATED -DDISABLE_ML_OPS -DEIGEN_MPL2_ONLY -DEIGEN_USE_THREADS -DENABLE_CUDA_NHWC_OPS -DENABLE_DLPACK -DONLY_C_LOCALE=0 -DONNX_ML=1 -DONNX_NAMESPACE=onnx -DONNX_USE_LITE_PROTO=1 -DORT_ENABLE_STREAM -DPLATFORM_POSIX -DPROTOBUF_USE_DLLS -DUSE_CUDA=1 -DUSE_MPI=1 -D_GNU_SOURCE -D__ONNX_DISABLE_STATIC_REGISTRATION -I/var/tmp/portage/sci-libs/onnxruntime-1.21.0/work/onnxruntime-1.21.0/include/onnxruntime -I/var/tmp/portage/sci-libs/onnxruntime-1.21.0/work/onnxruntime-1.21.0/include/onnxruntime/core/session -I/var/tmp/portage/sci-libs/onnxruntime-1.21.0/work/onnxruntime-1.21.0/cmake -I/var/tmp/portage/sci-libs/onnxruntime-1.21.0/work/onnxruntime-1.21.0/onnxruntime -I/var/tmp/portage/sci-libs/onnxruntime-1.21.0/work/SafeInt-3.0.28a -I/var/tmp/portage/sci-libs/onnxruntime-1.21.0/work/date-3.0.1/include -I/var/tmp/portage/sci-libs/onnxruntime-1.21.0/work/flatbuffers-23.5.26/include -I/usr/include/eigen3 -O3 -march=native -pipe -Wno-dangling-reference -Wno-c++20-compat -ffunction-sections -fdata-sections -mavx -DCPUINFO_SUPPORTED -std=gnu++17 -fPIC -Wall -Wextra -Wno-deprecated-copy -Wno-nonnull-compare -Wno-interference-size -Wno-strict-aliasing -MD -MT CMakeFiles/onnxruntime_framework.dir/var/tmp/portage/sci-libs/onnxruntime-1.21.0/work/onnxruntime-1.21.0/onnxruntime/core/framework/resource_accountant.cc.o -MF CMakeFiles/onnxruntime_framework.dir/var/tmp/portage/sci-libs/onnxruntime-1.21.0/work/onnxruntime-1.21.0/onnxruntime/core/framework/resource_accountant.cc.o.d -o CMakeFiles/onnxruntime_framework.dir/var/tmp/portage/sci-libs/onnxruntime-1.21.0/work/onnxruntime-1.21.0/onnxruntime/core/framework/resource_accountant.cc.o -c /var/tmp/portage/sci-libs/onnxruntime-1.21.0/work/onnxruntime-1.21.0/onnxruntime/core/framework/resource_accountant.cc
/var/tmp/portage/sci-libs/onnxruntime-1.21.0/work/onnxruntime-1.21.0/onnxruntime/core/framework/resource_accountant.cc: In function ‘onnxruntime::common::Status onnxruntime::LoadNodeAllocationStats(const std::filesystem::__cxx11::path&, const std::filesystem::__cxx11::path&, InlinedHashMap<std::__cxx11::basic_string<char>, NodeAllocationStats>&)’:
/var/tmp/portage/sci-libs/onnxruntime-1.21.0/work/onnxruntime-1.21.0/onnxruntime/core/framework/resource_accountant.cc:150:32: error: no matching function for call to ‘onnxruntime::InlinedHashMap<std::__cxx11::basic_string<char>, onnxruntime::NodeAllocationStats>::insert_or_assign(std::remove_reference<std::__cxx11::basic_string<char>&>::type, <brace-enclosed initializer list>)’
150 | node_stats.insert_or_assign(std::move(node_name), {input_sizes, initializers_sizes,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
151 | total_dynamic_sizes, total_temp_allocations});
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/unordered_map:41,
from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/functional:63,
from /var/tmp/portage/sci-libs/onnxruntime-1.21.0/work/onnxruntime-1.21.0/include/onnxruntime/core/common/common.h:24,
from /var/tmp/portage/sci-libs/onnxruntime-1.21.0/work/onnxruntime-1.21.0/include/onnxruntime/core/framework/resource_accountant.h:13,
from /var/tmp/portage/sci-libs/onnxruntime-1.21.0/work/onnxruntime-1.21.0/onnxruntime/core/framework/resource_accountant.cc:4:
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/unordered_map.h:662:9: note: candidate: ‘template<class _Obj> std::pair<typename std::_Hashtable<_Key, std::pair<const _Key, _Val>, _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::__is_nothrow_invocable<const _Hash&, const _Key&> > >::value, false, true> >::iterator, bool> std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::insert_or_assign(const key_type&, _Obj&&) [with _Key = std::__cxx11::basic_string<char>; _Tp = onnxruntime::NodeAllocationStats; _Hash = std::hash<std::__cxx11::basic_string<char> >; _Pred = std::equal_to<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, onnxruntime::NodeAllocationStats> >]’
662 | insert_or_assign(const key_type& __k, _Obj&& __obj)
| ^~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/unordered_map.h:662:9: note: template argument deduction/substitution failed:
/var/tmp/portage/sci-libs/onnxruntime-1.21.0/work/onnxruntime-1.21.0/onnxruntime/core/framework/resource_accountant.cc:150:32: note: couldn’t deduce template parameter ‘_Obj’
150 | node_stats.insert_or_assign(std::move(node_name), {input_sizes, initializers_sizes,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
151 | total_dynamic_sizes, total_temp_allocations});
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/unordered_map.h:674:9: note: candidate: ‘template<class _Obj> std::pair<typename std::_Hashtable<_Key, std::pair<const _Key, _Val>, _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::__is_nothrow_invocable<const _Hash&, const _Key&> > >::value, false, true> >::iterator, bool> std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::insert_or_assign(key_type&&, _Obj&&) [with _Key = std::__cxx11::basic_string<char>; _Tp = onnxruntime::NodeAllocationStats; _Hash = std::hash<std::__cxx11::basic_string<char> >; _Pred = std::equal_to<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, onnxruntime::NodeAllocationStats> >]’
674 | insert_or_assign(key_type&& __k, _Obj&& __obj)
| ^~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/unordered_map.h:674:9: note: template argument deduction/substitution failed:
/var/tmp/portage/sci-libs/onnxruntime-1.21.0/work/onnxruntime-1.21.0/onnxruntime/core/framework/resource_accountant.cc:150:32: note: couldn’t deduce template parameter ‘_Obj’
150 | node_stats.insert_or_assign(std::move(node_name), {input_sizes, initializers_sizes,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
151 | total_dynamic_sizes, total_temp_allocations});
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/unordered_map.h:711:9: note: candidate: ‘template<class _Obj> std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::iterator std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::insert_or_assign(const_iterator, const key_type&, _Obj&&) [with _Key = std::__cxx11::basic_string<char>; _Tp = onnxruntime::NodeAllocationStats; _Hash = std::hash<std::__cxx11::basic_string<char> >; _Pred = std::equal_to<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, onnxruntime::NodeAllocationStats> >]’
711 | insert_or_assign(const_iterator __hint, const key_type& __k,
| ^~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/unordered_map.h:711:9: note: candidate expects 3 arguments, 2 provided
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/unordered_map.h:723:9: note: candidate: ‘template<class _Obj> std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::iterator std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::insert_or_assign(const_iterator, key_type&&, _Obj&&) [with _Key = std::__cxx11::basic_string<char>; _Tp = onnxruntime::NodeAllocationStats; _Hash = std::hash<std::__cxx11::basic_string<char> >; _Pred = std::equal_to<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, onnxruntime::NodeAllocationStats> >]’
723 | insert_or_assign(const_iterator __hint, key_type&& __k, _Obj&& __obj)
| ^~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/unordered_map.h:723:9: note: candidate expects 3 arguments, 2 provided
Visual Studio Version
No response
GCC / Compiler Version
14.2.1