Bug 2103635

Summary: trellis: FTBFS in Fedora Rawhide: Outdated bundled pybind11 does not work with Python 3.11
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: trellisAssignee: Gabriel Somlo <somlo>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: lkundrak, mhroncok, somlo
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://koschei.fedoraproject.org/package/trellis
Whiteboard:
Fixed In Version: trellis-1.2.1-8.20220705git7a2e9ed.fc36 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-14 01:45:48 UTC Type: Bug
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: 2016048, 2045102    

Description Tomáš Hrnčiar 2022-07-04 10:02:20 UTC
Description of problem:
Package trellis fails to build from source in Fedora Rawhide.

Version-Release number of selected component (if applicable):
1.2.1-6.20220509git64b38df.fc37

Steps to Reproduce:
koji build --scratch f37 trellis-1.2.1-6.20220509git64b38df.fc37.src.rpm

Additional info:
This package is tracked by Koschei. See:
https://koschei.fedoraproject.org/package/trellis

Comment 1 Miro Hrončok 2022-07-04 10:07:19 UTC
[ 64%] Building CXX object CMakeFiles/pytrellis.dir/src/Util.cpp.o
/usr/bin/g++ -DINCLUDE_PYTHON=1 -Dpytrellis_EXPORTS -I/builddir/build/BUILD/prjtrellis-64b38dfda6f0bc556839b513820f943f64b23cc3/libtrellis/include -I/usr/include/python3.11 -I/builddir/build/BUILD/prjtrellis-64b38dfda6f0bc556839b513820f943f64b23cc3/libtrellis/3rdparty/pybind11/include -O2  -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wall -pedantic -Wextra -O3 -fPIC -g1 -fPIC -std=gnu++14 -MD -MT CMakeFiles/pytrellis.dir/src/Util.cpp.o -MF CMakeFiles/pytrellis.dir/src/Util.cpp.o.d -o CMakeFiles/pytrellis.dir/src/Util.cpp.o -c /builddir/build/BUILD/prjtrellis-64b38dfda6f0bc556839b513820f943f64b23cc3/libtrellis/src/Util.cpp
In file included from /builddir/build/BUILD/prjtrellis-64b38dfda6f0bc556839b513820f943f64b23cc3/libtrellis/3rdparty/pybind11/include/pybind11/detail/../cast.h:15,
                 from /builddir/build/BUILD/prjtrellis-64b38dfda6f0bc556839b513820f943f64b23cc3/libtrellis/3rdparty/pybind11/include/pybind11/detail/../attr.h:13,
                 from /builddir/build/BUILD/prjtrellis-64b38dfda6f0bc556839b513820f943f64b23cc3/libtrellis/3rdparty/pybind11/include/pybind11/detail/class.h:12,
                 from /builddir/build/BUILD/prjtrellis-64b38dfda6f0bc556839b513820f943f64b23cc3/libtrellis/3rdparty/pybind11/include/pybind11/pybind11.h:13,
                 from /builddir/build/BUILD/prjtrellis-64b38dfda6f0bc556839b513820f943f64b23cc3/libtrellis/src/PyTrellis.cpp:17:
/builddir/build/BUILD/prjtrellis-64b38dfda6f0bc556839b513820f943f64b23cc3/libtrellis/3rdparty/pybind11/include/pybind11/detail/../detail/type_caster_base.h: In function 'std::string pybind11::detail::error_string()':
/builddir/build/BUILD/prjtrellis-64b38dfda6f0bc556839b513820f943f64b23cc3/libtrellis/3rdparty/pybind11/include/pybind11/detail/../detail/type_caster_base.h:517:26: error: invalid use of incomplete type 'PyFrameObject' {aka 'struct _frame'}
  517 |             frame = frame->f_back;
      |                          ^~
In file included from /usr/include/python3.11/Python.h:42,
                 from /builddir/build/BUILD/prjtrellis-64b38dfda6f0bc556839b513820f943f64b23cc3/libtrellis/3rdparty/pybind11/include/pybind11/detail/../detail/common.h:211,
                 from /builddir/build/BUILD/prjtrellis-64b38dfda6f0bc556839b513820f943f64b23cc3/libtrellis/3rdparty/pybind11/include/pybind11/detail/../cast.h:13:
/usr/include/python3.11/pytypedefs.h:22:16: note: forward declaration of 'PyFrameObject' {aka 'struct _frame'}
   22 | typedef struct _frame PyFrameObject;
      |                ^~~~~~



The PyFrameObject structure members have been removed from the public C API of Python 3.11.

See https://docs.python.org/3.11/whatsnew/3.11.html and search for PyFrameObject.



For frame->f_back, use PyFrame_GetBack().

Comment 2 Gabriel Somlo 2022-07-04 21:57:24 UTC
upstream PR to unbundle pybind11: https://github.com/YosysHQ/prjtrellis/pull/191

Will submit for rebuild once I get some feedback on that.

Comment 3 Fedora Update System 2022-07-05 17:55:44 UTC
FEDORA-2022-8b29187310 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-8b29187310

Comment 4 Fedora Update System 2022-07-06 02:16:09 UTC
FEDORA-2022-8b29187310 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-8b29187310`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-8b29187310

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2022-07-14 01:45:48 UTC
FEDORA-2022-8b29187310 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.