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 1710767 - python-wxpython4 FTBFS with Python 3.8
Summary: python-wxpython4 FTBFS with Python 3.8
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-wxpython4
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Scott Talbert
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON38
TreeView+ depends on / blocked
 
Reported: 2019-05-16 09:33 UTC by Lumír Balhar
Modified: 2019-05-18 19:02 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-18 19:02:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Full build log from COPR (45.73 KB, application/gzip)
2019-05-16 09:33 UTC, Lumír Balhar
no flags Details
root.log from COPR (25.68 KB, application/gzip)
2019-05-16 09:45 UTC, Lumír Balhar
no flags Details
config.log (40.46 KB, text/plain)
2019-05-16 11:11 UTC, Miro Hrončok
no flags Details
config.log (43.14 KB, text/plain)
2019-05-17 14:29 UTC, Miro Hrončok
no flags Details

Description Lumír Balhar 2019-05-16 09:33:30 UTC
Created attachment 1569452 [details]
Full build log from COPR

python-wxpython4-4.0.4-3.fc31 fails to build from source in Fedora rawhide with Python 3.8.

The error message is:
Checking for program 'python'            : /usr/bin/python3 
Checking for python version >= 2.7.0     : 3.8.0 
python-config                            : /usr/bin/python3-config 
Asking python-config for pyembed '--cflags --libs --ldflags' flags : yes 
Testing pyembed configuration                                      : Could not build a python embedded interpreter 
Testing pyembed configuration                                      : Could not build a python embedded interpreter 
BUILDSTDERR: The configuration failed
BUILDSTDERR: (complete log in /builddir/build/BUILD/python-wxpython4-4.0.4/python3/build/waf/3.8/gtk3/config.log)
Command '"/usr/bin/python3" /builddir/build/BUILD/python-wxpython4-4.0.4/python3/bin/waf-2.0.8 --wx_config=wx-config-3.0 --gtk3 --python="/usr/bin/python3" --out=build/waf/3.8/gtk3 configure build ' failed with exit code 1.
Finished command: build_py (0.972s)
BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.H67ljx (%build)

Comment 1 Miro Hrončok 2019-05-16 09:39:45 UTC
let me try dig the config.log

Comment 2 Lumír Balhar 2019-05-16 09:45:57 UTC
Created attachment 1569456 [details]
root.log from COPR

Comment 3 Miro Hrončok 2019-05-16 11:11:32 UTC
Created attachment 1569490 [details]
config.log

Comment 4 Miro Hrončok 2019-05-16 11:12:07 UTC
[1/2] Compiling build/waf/3.8/gtk3/.conf_check_1c6b03a74ebec564757f8a7c923132ce/test.cpp

['/usr/bin/g++', '-O2', '-g', '-fexceptions', '-fstack-protector-strong', '-grecord-gcc-switches', '-m64', '-mtune=generic', '-fasynchronous-unwind-tables', '-fstack-clash-protection', '-fcf-protection', '-fPIC', '-fwrapv', '-O2', '-g', '-fexceptions', '-fstack-protector-strong', '-grecord-gcc-switches', '-m64', '-mtune=generic', '-fasynchronous-unwind-tables', '-fstack-clash-protection', '-fcf-protection', '-fPIC', '-fwrapv', '-I/usr/include/python3.8', '-DPYTHONDIR="/usr/local/lib/python3.8/site-packages"', '-DPYTHONARCHDIR="/usr/local/lib64/python3.8/site-packages"', '-D_GNU_SOURCE', '-DDYNAMIC_ANNOTATIONS_ENABLED=1', '-DNDEBUG', '-D_GNU_SOURCE', '../test.cpp', '-c', '-o/builddir/build/BUILD/python-wxpython4-4.0.4/python3/build/waf/3.8/gtk3/.conf_check_1c6b03a74ebec564757f8a7c923132ce/testbuild/test.cpp.1.o']
[2/2] Linking build/waf/3.8/gtk3/.conf_check_1c6b03a74ebec564757f8a7c923132ce/testbuild/testprog

['/usr/bin/g++', '-fPIC', '-fPIC', 'test.cpp.1.o', '-o/builddir/build/BUILD/python-wxpython4-4.0.4/python3/build/waf/3.8/gtk3/.conf_check_1c6b03a74ebec564757f8a7c923132ce/testbuild/testprog', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-L/usr/lib64', '-lcrypt', '-lpthread', '-ldl', '-lutil', '-lm', '-lm', '-lcrypt', '-lpthread', '-ldl', '-lutil', '-lm', '-lm']
err: /usr/bin/ld: test.cpp.1.o: in function `main':
/builddir/build/BUILD/python-wxpython4-4.0.4/python3/build/waf/3.8/gtk3/.conf_check_1c6b03a74ebec564757f8a7c923132ce/testbuild/../test.cpp:14: undefined reference to `Py_Initialize'
/usr/bin/ld: /builddir/build/BUILD/python-wxpython4-4.0.4/python3/build/waf/3.8/gtk3/.conf_check_1c6b03a74ebec564757f8a7c923132ce/testbuild/../test.cpp:15: undefined reference to `Py_Finalize'
collect2: error: ld returned 1 exit status

Comment 5 Miro Hrončok 2019-05-16 11:14:38 UTC
I also see this in the log:

LIBPL = '/usr/lib64/python3.8/config--x86_64-linux-gnu'

This should probably be:

/usr/lib64/python3.8/config-3.8-x86_64-linux-gnu

Comment 6 Scott Talbert 2019-05-17 03:03:54 UTC
@Miro - it looks like that LIBPL is coming from python itself:

<mock-chroot> sh-5.0# python3 -c "from distutils.sysconfig import get_config_var; print(get_config_var('LIBPL'))"
/usr/lib64/python3.8/config--x86_64-linux-gnu

Looking at strace of that, it appears to be looking at /usr/lib64/python3.8/_sysconfigdata__linux_x86_64-linux-gnu.py.

<mock-chroot> sh-5.0# grep LIBPL /usr/lib64/python3.8/_sysconfigdata__linux_x86_64-linux-gnu.py
 'LIBPL': '/usr/lib64/python3.8/config--x86_64-linux-gnu',

Comment 7 Miro Hrončok 2019-05-17 09:47:50 UTC
Victor, this might be relevant to the "m" removal. Could you please look at this with very high priority? Thanks.

Comment 8 Miro Hrončok 2019-05-17 09:59:22 UTC
Just for the record:

Those are the actual files:

/usr/lib64/python3.7/config-3.7m-x86_64-linux-gnu
/usr/lib64/python3.8/config-3.8-x86_64-linux-gnu

This is a result of python3 -c "from distutils.sysconfig import get_config_var; print(get_config_var('LIBPL'))":

/usr/lib64/python3.7/config-3.7m-x86_64-linux-gnu
/usr/lib64/python3.8/config--x86_64-linux-gnu

Comment 9 Miro Hrončok 2019-05-17 10:21:05 UTC
Unpatched upstream at v3.8.0a4:

  $ ./configure && make -j
  $ grep LIBPL build/lib.linux-x86_64-3.8/_sysconfigdata__linux_x86_64-linux-gnu.py
   'LIBPL': '/usr/local/lib/python3.8/config-3.8-x86_64-linux-gnu',


With our patches at fedora-3.8.0a4, i'm unable to run ./configure && make -j - apparently, our patch doesn't work without setting all the other things we set during the build :(

Comment 10 Miro Hrončok 2019-05-17 10:33:00 UTC
[cpython ((fedora-3.8.0a4))]$ ./configure --enable-shared && make -j
[cpython ((fedora-3.8.0a4))]$ grep LIBPL build/lib.linux-x86_64-3.8/_sysconfigdata__linux_x86_64-linux-gnu.py
 'LIBPL': '/usr/local/lib64/python3.8/config--x86_64-linux-gnu',

Comment 11 Miro Hrončok 2019-05-17 11:34:59 UTC
I've talked to Victor on IRC and we found the cause of he problem.

Fix in https://src.fedoraproject.org/rpms/python38/pull-request/20 - needs a review.

Comment 12 Miro Hrončok 2019-05-17 14:09:30 UTC
<mock-chroot> sh-5.0# python3 -c "from distutils.sysconfig import get_config_var; print(get_config_var('LIBPL'))"
/usr/lib64/python3.8/config-3.8-x86_64-linux-gnu
<mock-chroot> sh-5.0# file /usr/lib64/python3.8/config-3.8-x86_64-linux-gnu
/usr/lib64/python3.8/config-3.8-x86_64-linux-gnu: directory

Comment 13 Scott Talbert 2019-05-17 14:14:27 UTC
Okay, I'll have another look tonight.

Comment 14 Miro Hrončok 2019-05-17 14:27:19 UTC
Note that a new copr build of wxpytho4 failed again, so I'm running it in mock locally to get the new config.log.

Comment 15 Miro Hrončok 2019-05-17 14:29:27 UTC
Created attachment 1570152 [details]
config.log

Comment 16 Scott Talbert 2019-05-17 14:49:13 UTC
I didn't test this with the latest python3.8 build, but with the previous version, it appears that 'python3-config --ldflags' isn't including the python libraries in the output.

Comment 17 Miro Hrončok 2019-05-17 15:04:57 UTC
That is a deliberate change, see https://docs.python.org/dev/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build

$ python3.8-config --ldflags
 -L/usr/lib64  -lcrypt -lpthread -ldl  -lutil -lm -lm 

$ python3.7-config --ldflags
 -L/usr/lib64 -lpython3.7m -lcrypt -lpthread -ldl  -lutil -lm  -Xlinker -export-dynamic

Comment 18 Scott Talbert 2019-05-18 01:00:05 UTC
This might be blocked by https://bugs.python.org/issue36721.  It seems that WAF wants to test building an embedded application, so it needs those flags.  I don't think wxPython needs that, so I'm trying to see if I can work around it in wxPython.

Comment 19 Scott Talbert 2019-05-18 19:02:24 UTC
Fixed, built fine locally using copr mock config.


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