Bug 2383230

Summary: onnxruntime: FTBFS with pybind11 3.0
Product: [Fedora] Fedora Reporter: Cristian Le <fedora>
Component: onnxruntimeAssignee: Diego Herrera <dherrera>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: a.alvarezayllon, dherrera, lx
Target Milestone: ---Flags: fedora-admin-xmlrpc: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2367888    

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.