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 1716522 - pythonqt fails to build with Python 3.8
Summary: pythonqt fails to build with Python 3.8
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: pythonqt
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Igor Raits
QA Contact: Fedora Extras Quality Assurance
URL: https://copr.fedorainfracloud.org/cop...
Whiteboard:
Depends On:
Blocks: PYTHON38
TreeView+ depends on / blocked
 
Reported: 2019-06-03 14:40 UTC by Miro Hrončok
Modified: 2019-08-06 11:25 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-06 11:25:56 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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

Comment 1 Charalampos Stratakis 2019-06-11 13:03:12 UTC
pythonqt uses the qmake build system which I am not very familiar with, however the issue seems to be deriving from that file [0]

[0] This is due to https://sourceforge.net/p/pythonqt/code/HEAD/tree/trunk/build/python.prf

This line:   unix:LIBS += $$system(python$${PYTHON_VERSION}-config --ldflags) will need to be changed to   unix:LIBS += $$system(python$${PYTHON_VERSION}-config --libs --embed) for 3.8

The default python version is changing dynamically according to the SPEC: https://src.fedoraproject.org/rpms/pythonqt/blob/master/f/pythonqt.spec#_47

A conditional ideally should be added there so if the python version is 3.8 or higher then the embed option is added, however I didn't find a good way to do that in the code (unless just hacking the SPEC to apply a patch conditionally).


Igor any ideas?

Comment 2 Victor Stinner 2019-07-08 09:23:16 UTC
build/python.prf should be modified to use the new --embed flag:
https://docs.python.org/dev/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build

  unix:LIBS += $$system(python$${PYTHON_VERSION}-config --ldflags)
  unix:QMAKE_CXXFLAGS += $$system(python$${PYTHON_VERSION}-config --includes)

I tried to use bash syntax to run a second if the first one fails:

  unix:LIBS += $$system(python$${PYTHON_VERSION}-config --ldflags --embed || python$${PYTHON_VERSION}-config --ldflags)
  unix:QMAKE_CXXFLAGS += $$system(python$${PYTHON_VERSION}-config --includes --embed || python$${PYTHON_VERSION}-config --includes)

Problem: qmake syntax doesn't accept "||", it has a different meaning.

A bash script could be added to use shell syntax, and build/python.prf would run this script using $$(system).

Comment 3 Miro Hrončok 2019-07-30 14:15:08 UTC
Igor?

Comment 4 Igor Raits 2019-08-06 11:25:56 UTC
Retired.


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