Bug 1897070 - javapackages-tools fails to build with Python 3.10: uses a python?.? glob in %files
Summary: javapackages-tools fails to build with Python 3.10: uses a python?.? glob in ...
Keywords:
Status: POST
Alias: None
Product: Fedora
Classification: Fedora
Component: javapackages-tools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mikolaj Izdebski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.10
TreeView+ depends on / blocked
 
Reported: 2020-11-12 08:50 UTC by Tomáš Hrnčiar
Modified: 2020-11-12 13:56 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-12 13:36:55 UTC
Type: Bug


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2020-11-12 08:50:53 UTC
javapackages-tools fails to build with Python 3.10.0a2.

ERROR: xmvn_config_test (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: xmvn_config_test
Traceback (most recent call last):
  File "/usr/lib64/python3.10/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/builddir/build/BUILD/javapackages-5.3.0/python/test/xmvn_config_test.py", line 4, in <module>
    import lxml.etree as ET
ImportError: /usr/lib64/python3.10/site-packages/lxml/etree.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send


======================================================================
ERROR: pom_test (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: pom_test
Traceback (most recent call last):
  File "/usr/lib64/python3.10/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/builddir/build/BUILD/javapackages-5.3.0/python/test/pom_test.py", line 5, in <module>
    from javapackages.maven.pom import POM, PomLoadingException
  File "/builddir/build/BUILD/javapackages-5.3.0/python/javapackages/maven/pom.py", line 35, in <module>
    import javapackages.maven.pomreader as POMReader
  File "/builddir/build/BUILD/javapackages-5.3.0/python/javapackages/maven/pomreader.py", line 34, in <module>
    from lxml.etree import ElementTree, XMLParser
ImportError: /usr/lib64/python3.10/site-packages/lxml/etree.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send


======================================================================
ERROR: metadata_test (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: metadata_test
Traceback (most recent call last):
  File "/usr/lib64/python3.10/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/builddir/build/BUILD/javapackages-5.3.0/python/test/metadata_test.py", line 4, in <module>
    from javapackages.metadata.metadata import Metadata, MetadataInvalidException, MetadataLoadingException
  File "/builddir/build/BUILD/javapackages-5.3.0/python/javapackages/metadata/metadata.py", line 40, in <module>
    from lxml import etree
ImportError: /usr/lib64/python3.10/site-packages/lxml/etree.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send


======================================================================
ERROR: artifact_test (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: artifact_test
Traceback (most recent call last):
  File "/usr/lib64/python3.10/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/builddir/build/BUILD/javapackages-5.3.0/python/test/artifact_test.py", line 3, in <module>
    from lxml.etree import fromstring, parse
ImportError: /usr/lib64/python3.10/site-packages/lxml/etree.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send
 
This seem to be related to https://github.com/cython/cython/issues/3876. 
It might be fixed with this patch https://github.com/cython/cython/pull/3877 that works for numpy. Upstream has decided to solve this differently, but until that happens, we are using this patch in our Copr (for other packages).

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01757095-javapackages-tools/

For all our attempts to build javapackages-tools with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/javapackages-tools/

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.10:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
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 2020-11-12 10:12:35 UTC
A rebuild should be enough to make this go away.

Comment 2 Miro Hrončok 2020-11-12 10:20:50 UTC
A rebuild fixes this, but a new error is:

    File not found: /builddir/build/BUILDROOT/javapackages-tools-5.3.0-13.fc34.x86_64/usr/lib/python?.?/site-packages/javapackages
    File not found: /builddir/build/BUILDROOT/javapackages-tools-5.3.0-13.fc34.x86_64/usr/lib/python?.?/site-packages/javapackages-*.egg-info

Comment 3 Miro Hrončok 2020-11-12 10:32:31 UTC
We have mass fixed all such globs in the Fedora spec files, but this glob is **not** in the spec file, it is in the "upstream" tarball:

$ cat javapackages-5.3.0/install
...
exec >files-python
(cd ./python && "${pyinterpreter}" setup.py install -O1 --skip-build --prefix "${prefix}" --root "${DEST}") >&2
echo "${prefix}/lib/python?.?/site-packages/javapackages"
echo "${prefix}/lib/python?.?/site-packages/javapackages-*.egg-info"

Comment 4 Mikolaj Izdebski 2020-11-12 11:18:48 UTC
Forwarded upstream: https://github.com/fedora-java/javapackages/issues/85

Comment 5 Mikolaj Izdebski 2020-11-12 13:36:55 UTC
The issue described in this bug report does not affect Fedora (as Python 3.10 is not even in Fedora yet) and it has been addressed upstream, so I'm closing the bug with resolution UPSTREAM as no change is required to Fedora javapackages-tools package at this point. Upstream change will be eventually included in Fedora package by updating to a future upstream release, or by backporting upstream patch.

Comment 6 Miro Hrončok 2020-11-12 13:56:59 UTC
We are already running test builds with Python 3.10 as a preparation for the actual change in Fedora. This is explained in the already approved https://fedoraproject.org/wiki/Changes/Python3.10 Fedora 35 change.

However, there is not much Python packages requiring this (possibly none), so I guess it is not very urgent.

We use bugzilla to see what problems are reported and what problems are not, please don't close this bug until it is fixed in Fedora. We need this fixed in dist git (no build is needed). Thanks.


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