Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] build of v1.20.1 fails on Ubuntu 24.04.1 #23323

Open
ognjentodic opened this issue Jan 10, 2025 · 0 comments
Open

[Build] build of v1.20.1 fails on Ubuntu 24.04.1 #23323

ognjentodic opened this issue Jan 10, 2025 · 0 comments
Labels
build build issues; typically submitted using template

Comments

@ognjentodic
Copy link

Describe the issue

I am getting an error when building onnxruntime v1.20.1 on ubuntu 24.04.1.

Urgency

No response

Target platform

linux-x86_64

Build script

BUILD_TYPE=Release

build_arguments="--config ${BUILD_TYPE} \
          --parallel \
          --compile_no_warning_as_error \
          --allow_running_as_root \
          --skip_tests \
          --cmake_extra_defines _GLIBCXX_USE_CXX11_ABI=0 \
          --cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=OFF \
          --cmake_extra_defines onnxruntime_BUILD_BENCHMARKS=OFF \
          --cmake_extra_defines=onnxruntime_DISABLE_ABSEIL=ON \
          --cmake_extra_defines=CMAKE_CXX_STANDARD=17 \
          --cmake_extra_defines CMAKE_INSTALL_LIBDIR=${INSTALL_LIBDIR} \
          --cmake_extra_defines CMAKE_INSTALL_INCLUDEDIR=${INSTALL_INCLUDEDIR} \
          --build_shared_lib \
          --enable_reduced_operator_type_support --disable_ml_ops \
          --include_ops_by_config ${CWD}/ort-ops.config
          "
./build.sh $build_arguments

Error / output

Relevant log excerpt:

....
[ 85%] Building CXX object CMakeFiles/onnxruntime_session.dir/project/_build-linux-x86_64/Release/onnxruntimeRepo-prefix/src/onnxruntimeRepo/onnxruntime/core/session/lora_adapters.cc.o
In file included from /project/_build-linux-x86_64/Release/onnxruntimeRepo-prefix/src/onnxruntimeRepo/onnxruntime/core/session/inference_session.cc:4:
In file included from /project/_build-linux-x86_64/Release/onnxruntimeRepo-prefix/src/onnxruntimeRepo/onnxruntime/core/graph/onnx_protobuf.h:22:
In file included from /project/_build-linux-x86_64/Release/onnxruntimeRepo-prefix/src/onnxruntimeRepo/build/Linux/Release/_deps/onnx-src/onnx/defs/schema.h:9:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/functional:63:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/unordered_map:41:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unordered_map.h:33:
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/hashtable.h:890:11: error: no viable conversion from returned value of type 'const std::basic_string_view<char>' to function return type '__conditional_t<__and_<__is_nothrow_invocable<hash<basic_string<char>> &, const key_type &>, __not_<__is_nothrow_invocable<hash<basic_string<char>> &, const basic_string_view<char, char_traits<char>> &>>>::value, key_type, const basic_string_view<char, char_traits<char>> &>' (aka 'std::basic_string<char>')
  890 |         { return std::forward<_Kt>(__k); }
      |                  ^~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/hashtable.h:905:6: note: in instantiation of function template specialization 'std::_Hashtable<std::basic_string<char>, std::basic_string<char>, std::allocator<std::basic_string<char>>, std::__detail::_Identity, std::equal_to<std::basic_string<char>>, std::hash<std::basic_string<char>>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, true, true>>::_S_forward_key<const std::basic_string_view<char> &>' requested here
  905 |             _S_forward_key(_ExtractKey{}(std::forward<_Arg>(__arg))),
      |             ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/hashtable.h:916:11: note: in instantiation of function template specialization 'std::_Hashtable<std::basic_string<char>, std::basic_string<char>, std::allocator<std::basic_string<char>>, std::__detail::_Identity, std::equal_to<std::basic_string<char>>, std::hash<std::basic_string<char>>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, true, true>>::_M_insert_unique_aux<const std::basic_string_view<char> &, std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::basic_string<char>, true>>>>' requested here
  916 |           return _M_insert_unique_aux(
      |                  ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/hashtable_policy.h:994:8: note: in instantiation of function template specialization 'std::_Hashtable<std::basic_string<char>, std::basic_string<char>, std::allocator<std::basic_string<char>>, std::__detail::_Identity, std::equal_to<std::basic_string<char>>, std::hash<std::basic_string<char>>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, true, true>>::_M_insert<const std::basic_string_view<char> &, std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::basic_string<char>, true>>>>' requested here
  994 |           __h._M_insert(*__first, __node_gen, __uks);
      |               ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/hashtable_policy.h:976:11: note: in instantiation of function template specialization 'std::__detail::_Insert_base<std::basic_string<char>, std::basic_string<char>, std::allocator<std::basic_string<char>>, std::__detail::_Identity, std::equal_to<std::basic_string<char>>, std::hash<std::basic_string<char>>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, true, true>>::_M_insert_range<__gnu_cxx::__normal_iterator<const std::basic_string_view<char> *, std::vector<std::basic_string_view<char>>>, std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::basic_string<char>, true>>>>' requested here
  976 |           return _M_insert_range(__first, __last, __node_gen, __unique_keys{});
      |                  ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/unordered_set.h:477:9: note: in instantiation of function template specialization 'std::__detail::_Insert_base<std::basic_string<char>, std::basic_string<char>, std::allocator<std::basic_string<char>>, std::__detail::_Identity, std::equal_to<std::basic_string<char>>, std::hash<std::basic_string<char>>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, true, true>>::insert<__gnu_cxx::__normal_iterator<const std::basic_string_view<char> *, std::vector<std::basic_string_view<char>>>>' requested here
  477 |         { _M_h.insert(__first, __last); }
      |                ^
/project/_build-linux-x86_64/Release/onnxruntimeRepo-prefix/src/onnxruntimeRepo/onnxruntime/core/session/inference_session.cc:467:39: note: in instantiation of function template specialization 'std::unordered_set<std::basic_string<char>>::insert<__gnu_cxx::__normal_iterator<const std::basic_string_view<char> *, std::vector<std::basic_string_view<char>>>>' requested here
  467 |       disabled_rules_and_transformers.insert(disabled_list.cbegin(), disabled_list.cend());
      |                                       ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:547:7: note: candidate constructor not viable: no known conversion from 'const std::basic_string_view<char>' to 'const basic_string<char> &' for 1st argument
  547 |       basic_string(const basic_string& __str)
      |       ^            ~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:641:7: note: candidate constructor template not viable: no known conversion from 'const std::basic_string_view<char>' to 'const char *' for 1st argument
  641 |       basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
      |       ^            ~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:677:7: note: candidate constructor not viable: no known conversion from 'const std::basic_string_view<char>' to 'basic_string<char> &&' for 1st argument
  677 |       basic_string(basic_string&& __str) noexcept
      |       ^            ~~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:706:7: note: candidate constructor not viable: no known conversion from 'const std::basic_string_view<char>' to 'initializer_list<char>' for 1st argument
  706 |       basic_string(initializer_list<_CharT> __l, const _Alloc& __a = _Alloc())
      |       ^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:535:7: note: explicit constructor is not a candidate
  535 |       basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
      |       ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/basic_string.h:795:2: note: explicit constructor is not a candidate
  795 |         basic_string(const _Tp& __t, const _Alloc& __a = _Alloc())
      |         ^
1 error generated.
gmake[5]: *** [CMakeFiles/onnxruntime_session.dir/build.make:174: CMakeFiles/onnxruntime_session.dir/project/_build-linux-x86_64/Release/onnxruntimeRepo-prefix/src/onnxruntimeRepo/onnxruntime/core/session/inference_session.cc.o] Error 1
gmake[5]: *** Waiting for unfinished jobs....

Visual Studio Version

No response

GCC / Compiler Version

clang-17 --version Ubuntu clang version 17.0.6 (9ubuntu1)

@ognjentodic ognjentodic added the build build issues; typically submitted using template label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build issues; typically submitted using template
Projects
None yet
Development

No branches or pull requests

1 participant