Bug 2383230 - onnxruntime: FTBFS with pybind11 3.0
Summary: onnxruntime: FTBFS with pybind11 3.0
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: onnxruntime
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Diego Herrera
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 2367888
TreeView+ depends on / blocked
 
Reported: 2025-07-24 12:42 UTC by Cristian Le
Modified: 2025-10-31 15:02 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:
fedora-admin-xmlrpc: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github microsoft onnxruntime issues 25681 0 None open [Build] Pybind11 3.0 support 2025-09-15 09:06:42 UTC

Description Cristian Le 2025-07-24 12:42:39 UTC
Dear package maintainer,

This is an automated bug created due to a FTBFS when rebuilding this package with pybind11 3.0.

The rebuild is being tracked in https://copr.fedorainfracloud.org/coprs/lecris/pybind11-3.0/package/onnxruntime.

If upstream supports both pybind11 3.x and 2.x with the same codebase, feel free to update the package ahead of the
pybind11 update and close this bug as desired. Otherwise please let us know about the incompatibility so that we can
coordinate a side-tag update together.

Let me know if you encounter any issues, or need any other help.

Comment 1 Cristian Le 2025-07-25 08:03:36 UTC
Took a while to find it, but at least one of them is
```
In file included from /builddir/build/BUILD/onnxruntime-1.20.1-build/onnxruntime-1.20.1/onnxruntime/python/onnxruntime_pybind.h:18,
                 from /builddir/build/BUILD/onnxruntime-1.20.1-build/onnxruntime-1.20.1/onnxruntime/python/onnxruntime_pybind_exceptions.h:6,
                 from /builddir/build/BUILD/onnxruntime-1.20.1-build/onnxruntime-1.20.1/onnxruntime/python/onnxruntime_pybind_state.cc:5:
In function ‘pybind11::detail::property_cpp_function_classic<onnxruntime::ModelMetadata, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::readonly<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > onnxruntime::ModelMetadata::*, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > onnxruntime::ModelMetadata::*, pybind11::handle const&)pybind11::cpp_function’,
    inlined from ‘pybind11::detail::property_cpp_function_classic<onnxruntime::ModelMetadata, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::read<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > onnxruntime::ModelMetadata::*, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > onnxruntime::ModelMetadata::*, pybind11::handle const&)pybind11::cpp_function’ at /usr/include/pybind11/pybind11.h:1779:32,
    inlined from ‘pybind11::class_<onnxruntime::ModelMetadata>::def_readwrite<onnxruntime::ModelMetadata, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char [14]>(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > onnxruntime::ModelMetadata::*, char const (&) [14])pybind11::class_<onnxruntime::ModelMetadata>&’ at /usr/include/pybind11/pybind11.h:2204:58,
    inlined from ‘onnxruntime::python::addObjectMethods(pybind11::module_&, std::function<void (onnxruntime::InferenceSession*, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::unordered_map<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::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::unordered_map<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::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > > > const&)>)’ at /builddir/build/BUILD/onnxruntime-1.20.1-build/onnxruntime-1.20.1/onnxruntime/python/onnxruntime_pybind_state.cc:1935:21:
/usr/include/pybind11/pybind11.h:1774:92: error: ‘SR.25857’ is used uninitialized [-Werror=uninitialized]
 1774 |         return cpp_function([pm](const T &c) -> const D & { return c.*pm; }, is_method(hdl));
```

Werror really gets in the way here, don't know if there are more relevant incompatibilities

Comment 2 Elliott Sales de Andrade 2025-09-22 00:15:42 UTC
Odd, because the spec is supposed to have turned off -Werror: https://src.fedoraproject.org/rpms/onnxruntime/c/0c214881a5ddf16b1b1fad9ba529fa4fd07e92a7

Comment 3 Cristian Le 2025-09-22 07:34:37 UTC
I never trust adding `-Wno-error` to C/CXX flags, it is always better to patch it out in the CMake source, but I don't see a reference of it in the latest HEAD.

Comment 4 Fedora Admin user for bugzilla script actions 2025-10-31 15:02:15 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.


Note You need to log in before you can comment on or make changes to this bug.