Bug 2069676 - boost with Python 3.11: SystemError: type Boost.Python.enum has the Py_TPFLAGS_HAVE_GC flag but has no traverse function
Summary: boost with Python 3.11: SystemError: type Boost.Python.enum has the Py_TPFLAG...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: boost
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Thomas Rodgers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2070428 (view as bug list)
Depends On:
Blocks: PYTHON3.11
TreeView+ depends on / blocked
 
Reported: 2022-03-29 12:53 UTC by Tomáš Hrnčiar
Modified: 2022-06-22 11:49 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-22 11:49:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github AcademySoftwareFoundation Imath issues 253 0 None open PyImath.PyImath{,Numpy}Test_Python3 tests fail with Python 3.11a06 2022-04-17 16:19:34 UTC

Description Tomáš Hrnčiar 2022-03-29 12:53:01 UTC
imath fails to build with Python 3.11.0a6.

+ /usr/bin/ctest --output-on-failure --force-new-ctest-process -j2
Test project /builddir/build/BUILD/Imath-3.1.4/redhat-linux-build
      Start  1: PyImath.PyImathTest_Python3
      Start  2: PyImath.PyImathNumpyTest_Python3
 1/38 Test  #2: PyImath.PyImathNumpyTest_Python3 ........***Failed    0.04 sec
Traceback (most recent call last):
  File "/builddir/build/BUILD/Imath-3.1.4/src/python/PyImathNumpyTest/pyImathNumpyTest.in", line 8, in <module>
    from imath import *
    ^^^^^^^^^^^^^^^^^^^
SystemError: type Boost.Python.enum has the Py_TPFLAGS_HAVE_GC flag but has no traverse function

      Start  3: Imath.half_c_only
 2/38 Test  #3: Imath.half_c_only .......................   Passed    0.00 sec
      Start  4: Imath.testToFloat
 3/38 Test  #4: Imath.testToFloat .......................   Passed    0.00 sec
      Start  5: Imath.testSize
 4/38 Test  #5: Imath.testSize ..........................   Passed    0.00 sec
      Start  6: Imath.testArithmetic
 5/38 Test  #6: Imath.testArithmetic ....................   Passed    0.00 sec
      Start  7: Imath.testNormalizedConversionError
 6/38 Test  #1: PyImath.PyImathTest_Python3 .............***Failed    0.13 sec
Traceback (most recent call last):
  File "/builddir/build/BUILD/Imath-3.1.4/src/python/PyImathTest/pyImathTest.in", line 8, in <module>
    from imath import *
    ^^^^^^^^^^^^^^^^^^^
SystemError: type Boost.Python.enum has the Py_TPFLAGS_HAVE_GC flag but has no traverse function

      Start  8: Imath.testDenormalizedConversionError
 7/38 Test  #8: Imath.testDenormalizedConversionError ...   Passed    0.39 sec
      Start  9: Imath.testRoundingError
 8/38 Test  #7: Imath.testNormalizedConversionError .....   Passed    0.47 sec
      Start 10: Imath.testBitPatterns
 9/38 Test #10: Imath.testBitPatterns ...................   Passed    0.00 sec
      Start 11: Imath.testClassification
10/38 Test #11: Imath.testClassification ................   Passed    0.00 sec
      Start 12: Imath.testLimits
11/38 Test #12: Imath.testLimits ........................   Passed    0.00 sec
      Start 13: Imath.testHalfLimits
12/38 Test #13: Imath.testHalfLimits ....................   Passed    0.00 sec
      Start 14: Imath.testFunction
13/38 Test #14: Imath.testFunction ......................   Passed    0.00 sec
      Start 15: Imath.testVec
14/38 Test #15: Imath.testVec ...........................   Passed    0.00 sec
      Start 16: Imath.testColor
15/38 Test #16: Imath.testColor .........................   Passed    0.00 sec
      Start 17: Imath.testShear
16/38 Test #17: Imath.testShear .........................   Passed    0.00 sec
      Start 18: Imath.testMatrix
17/38 Test #18: Imath.testMatrix ........................   Passed    0.00 sec
      Start 19: Imath.testMiscMatrixAlgo
18/38 Test  #9: Imath.testRoundingError .................   Passed    0.04 sec
      Start 20: Imath.testRoots
19/38 Test #20: Imath.testRoots .........................   Passed    0.00 sec
      Start 21: Imath.testFun
20/38 Test #21: Imath.testFun ...........................   Passed    0.00 sec
      Start 22: Imath.testInvert
21/38 Test #22: Imath.testInvert ........................   Passed    0.00 sec
      Start 23: Imath.testInterval
22/38 Test #23: Imath.testInterval ......................   Passed    0.00 sec
      Start 24: Imath.testFrustum
23/38 Test #24: Imath.testFrustum .......................   Passed    0.01 sec
      Start 25: Imath.testRandom
24/38 Test #25: Imath.testRandom ........................   Passed    0.42 sec
      Start 26: Imath.testExtractEuler
25/38 Test #19: Imath.testMiscMatrixAlgo ................   Passed    0.54 sec
      Start 27: Imath.testExtractSHRT
26/38 Test #27: Imath.testExtractSHRT ...................   Passed    0.10 sec
      Start 28: Imath.testQuat
27/38 Test #28: Imath.testQuat ..........................   Passed    0.00 sec
      Start 29: Imath.testQuatSetRotation
28/38 Test #29: Imath.testQuatSetRotation ...............   Passed    0.42 sec
      Start 30: Imath.testQuatSlerp
29/38 Test #30: Imath.testQuatSlerp .....................   Passed    0.22 sec
      Start 31: Imath.testLineAlgo
30/38 Test #26: Imath.testExtractEuler ..................   Passed    0.85 sec
      Start 32: Imath.testBoxAlgo
31/38 Test #31: Imath.testLineAlgo ......................   Passed    0.01 sec
      Start 33: Imath.testBox
32/38 Test #33: Imath.testBox ...........................   Passed    0.00 sec
      Start 34: Imath.testProcrustes
33/38 Test #34: Imath.testProcrustes ....................   Passed    0.00 sec
      Start 35: Imath.testTinySVD
34/38 Test #35: Imath.testTinySVD .......................   Passed    0.00 sec
      Start 36: Imath.testJacobiEigenSolver
35/38 Test #36: Imath.testJacobiEigenSolver .............   Passed    0.49 sec
      Start 37: Imath.testFrustumTest
36/38 Test #37: Imath.testFrustumTest ...................   Passed    0.00 sec
      Start 38: Imath.testInterop
37/38 Test #38: Imath.testInterop .......................   Passed    0.00 sec
38/38 Test #32: Imath.testBoxAlgo .......................   Passed    1.02 sec

95% tests passed, 2 tests failed out of 38

Total Test time (real) =   2.87 sec

The following tests FAILED:
	  1 - PyImath.PyImathTest_Python3 (Failed)
	  2 - PyImath.PyImathNumpyTest_Python3 (Failed)
Errors while running CTest
error: Bad exit status from /var/tmp/rpm-tmp.7pQrMi (%check)

The PyType_Ready() function now raises an error if a type is defined with the Py_TPFLAGS_HAVE_GC flag set but has no traverse function (PyTypeObject.tp_traverse). (Contributed by Victor Stinner in bpo-44263.)

https://bugs.python.org/issue44263
https://docs.python.org/3.11/whatsnew/3.11.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/03845184-imath/

For all our attempts to build imath with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/imath/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.11:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/

Let us know here if you have any questions.

Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Miro Hrončok 2022-04-17 18:15:26 UTC
BTW isn't this a boost bug? Boost.Python.enum comes from boost.

CCing the boost maintainer and Victor.

Comment 2 Victor Stinner 2022-04-25 09:00:15 UTC
Ah right, it's a bug in the enum type of Boost Python. I proposed a fix upstream which explains the issue and the rationale for the change: https://github.com/boostorg/python/pull/385

Comment 3 Miro Hrončok 2022-04-26 11:30:14 UTC
Will try with https://src.fedoraproject.org/rpms/boost/pull-request/13

Comment 4 Miro Hrončok 2022-04-26 12:57:29 UTC
https://src.fedoraproject.org/rpms/boost/pull-request/13 fixes this, assigning to boost.

Comment 5 Miro Hrončok 2022-04-26 12:57:45 UTC
*** Bug 2070428 has been marked as a duplicate of this bug. ***

Comment 6 Miro Hrončok 2022-06-22 11:49:14 UTC
Closing this in bulk as it built with Python 3.11. If this needs to remain open for a followup, feel free to reopen, I won't close in bulk again.


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