Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1716487

Summary: pyotherside fails to build with Python 3.8
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: pyothersideAssignee: Martin Kolman <mkolman>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, mkolman
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://copr.fedorainfracloud.org/coprs/g/python/python3.8/package/pyotherside/
Whiteboard:
Fixed In Version: pyotherside-1.5.8-1.fc31 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-19 16:09:07 UTC 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: 1686977    

Description Miro Hrončok 2019-06-03 14:37:32 UTC
See https://copr.fedorainfracloud.org/coprs/g/python/python3.8/package/pyotherside/ for actual logs. This report is automated and not very verbose, but feel free to ping me for help.

Comment 1 Martin Kolman 2019-06-04 13:32:28 UTC
This is weird, I've checked the Python 3.8 C API changes[0] and while some symbols apparently have been deprecated, the "undefined reference" ones are not on the list as far as I can tell.

So for the time being I've opened an issue upstream:
https://github.com/thp/pyotherside/issues/102

[0] https://docs.python.org/3.8/whatsnew/3.8.html#changes-in-the-c-api

Comment 2 Miro Hrončok 2019-06-04 13:41:21 UTC
I bet this is https://docs.python.org/3.8/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build

Does pyotherside use python3-config? Add the --embed flag.

Comment 3 Martin Kolman 2019-06-07 13:31:48 UTC
(In reply to Miro Hrončok from comment #2)
> I bet this is
> https://docs.python.org/3.8/whatsnew/3.8.html#debug-build-uses-the-same-abi-
> as-release-build
> 
> Does pyotherside use python3-config? Add the --embed flag.

Upstream has already fixed[0] the issue in response to the issue I've reported and released PyOtherSide 1.5.5 with the fix.

Unfortunately I have not yet been able to test the new version as attempts to use the Python 3.8 mock config die with the following error:


=============================================================================================================================================================================================
 Package                                     Architecture                           Version                                                  Repository                                 Size
=============================================================================================================================================================================================
Reinstalling:
 gdb-minimal                                 x86_64                                 8.3.50.20190601-15.fc31                                  python3.8                                 3.3 M

Transaction Summary
=============================================================================================================================================================================================

Total download size: 3.3 M
Installed size: 12 M
Downloading Packages:
[MIRROR] gdb-minimal-8.3.50.20190601-15.fc31.x86_64.rpm: Interrupted by header callback: Server reports Content-Length: 4 but expected size is: 3450276
[FAILED] gdb-minimal-8.3.50.20190601-15.fc31.x86_64.rpm: No more mirrors to try - All mirrors were already tried without success

Error: Error downloading packages:
  Cannot download 00921770-gdb/gdb-minimal-8.3.50.20190601-15.fc31.x86_64.rpm: All mirrors were tried
ERROR: Exception(pyotherside-1.5.5-1.fc31.src.rpm) Config(fedora-rawhide-x86_64-python3.8) 10 minutes 41 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-rawhide-x86_64-python3.8/result
ERROR: Command failed:
 # /usr/bin/dnf --installroot /var/lib/mock/fedora-rawhide-x86_64-python3.8/root/ -y --releasever 31 --setopt=deltarpm=False --disableplugin=local --disableplugin=spacewalk update


The mock config is direct copy-paste from the Python 3.8 COPR info page. Any pointers what to try to get past this ? Or maybe this is just some mirror syncing issue that will go away by itself eventually ?

In any case, 1.5.5 builds just fine on the regular Rawhide target in koji. :)


[0] https://github.com/thp/pyotherside/commit/a2955b1c537c2b3387845b63c35ce9a8bd9774b6

Comment 4 Miro Hrončok 2019-06-07 14:07:01 UTC
I use:

mock -r ~/.config/mock/fedora-rawhide-x86_64-python3.8.cfg --scrub=dnf-cache

Comment 5 Miro Hrončok 2019-06-07 14:35:36 UTC
That fix was not enough.

The build no longer links to libpython, resulting in undefined references to Python API like Py_InitializeEx.
Code that embeds Python (rather than building an extension module) needs to pass `--embed` to any `python3-config --libs` invocation to build with Python 3.8.
More information: 
https://docs.python.org/3.8/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build

Comment 6 Charalampos Stratakis 2019-06-10 14:27:04 UTC
That was fixed with 1.5.7 for Python 3.8 but the fallback to previous versions is wrong and now it fails with Python 3.7: https://github.com/thp/pyotherside/issues/102#issuecomment-500436221