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 1710131

Summary: python-lxml fails to build with Python 3.8
Product: [Fedora] Fedora Reporter: Tomas Orsava <torsava>
Component: python-lxmlAssignee: Miro Hrončok <mhroncok>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: igor.raits, jpopelka, me, mhroncok, mizdebsk, mplch
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-15 10:55:04 UTC Type: Bug
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    
Attachments:
Description Flags
Full log from Copr none

Description Tomas Orsava 2019-05-15 00:02:28 UTC
Created attachment 1568724 [details]
Full log from Copr

python-lxml-4.2.5-2.fc31 fails to build with Python 3.8.0a4 due to a gcc failure:



...
BUILDSTDERR: /usr/include/python3.8/code.h:105:28: note: declared here
BUILDSTDERR:   105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
BUILDSTDERR:       |                            ^~~~~~~~~~
BUILDSTDERR: src/lxml/builder.c: In function ‘__Pyx_CreateCodeObjectForTraceback’:
BUILDSTDERR: src/lxml/builder.c:323:11: error: too few arguments to function ‘PyCode_New’
BUILDSTDERR:   323 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
BUILDSTDERR:       |           ^~~~~~~~~~
BUILDSTDERR: src/lxml/builder.c:8777:15: note: in expansion of macro ‘__Pyx_PyCode_New’
BUILDSTDERR:  8777 |     py_code = __Pyx_PyCode_New(
BUILDSTDERR:       |               ^~~~~~~~~~~~~~~~
BUILDSTDERR: In file included from /usr/include/python3.8/compile.h:5,
BUILDSTDERR:                  from /usr/include/python3.8/Python.h:137,
BUILDSTDERR:                  from src/lxml/builder.c:31:
BUILDSTDERR: /usr/include/python3.8/code.h:105:28: note: declared here
BUILDSTDERR:   105 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
BUILDSTDERR:       |                            ^~~~~~~~~~
Compile failed: command 'gcc' failed with exit status 1
creating tmp
cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInitqvbpvx9h.c -o tmp/xmlXPathInitqvbpvx9h.o
BUILDSTDERR: /tmp/xmlXPathInitqvbpvx9h.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
BUILDSTDERR:     2 | main (int argc, char **argv) {
BUILDSTDERR:       | ^~~~
cc tmp/xmlXPathInitqvbpvx9h.o -L/usr/lib64 -lxml2 -o a.out
BUILDSTDERR: /usr/lib64/python3.8/site-packages/Cython/Compiler/Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /builddir/build/BUILD/lxml-4.2.5/src/lxml/etree.pyx
BUILDSTDERR:   tree = Parsing.p_module(s, pxd, full_module_name)
BUILDSTDERR: warning: src/lxml/xmlerror.pxi:653:22: local variable 'args' referenced before assignment
BUILDSTDERR: warning: src/lxml/xmlerror.pxi:654:69: local variable 'args' referenced before assignment
BUILDSTDERR: warning: src/lxml/xmlerror.pxi:655:20: local variable 'args' referenced before assignment
BUILDSTDERR: warning: src/lxml/xmlerror.pxi:660:22: local variable 'args' referenced before assignment
BUILDSTDERR: warning: src/lxml/xmlerror.pxi:661:73: local variable 'args' referenced before assignment
BUILDSTDERR: warning: src/lxml/xmlerror.pxi:662:20: local variable 'args' referenced before assignment
BUILDSTDERR: warning: src/lxml/xmlerror.pxi:667:22: local variable 'args' referenced before assignment
BUILDSTDERR: warning: src/lxml/xmlerror.pxi:668:73: local variable 'args' referenced before assignment
BUILDSTDERR: warning: src/lxml/xmlerror.pxi:669:20: local variable 'args' referenced before assignment
BUILDSTDERR: /usr/lib64/python3.8/site-packages/Cython/Compiler/Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /builddir/build/BUILD/lxml-4.2.5/src/lxml/objectify.pyx
BUILDSTDERR:   tree = Parsing.p_module(s, pxd, full_module_name)
BUILDSTDERR: error: command 'gcc' failed with exit status 1
BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.qTvtBu (%build)
BUILDSTDERR:     Bad exit status from /var/tmp/rpm-tmp.qTvtBu (%build)

Comment 1 Miro Hrončok 2019-05-15 08:31:05 UTC
Note that this fails with Cython patched by Marcel's WIP patch from [1].
All other packages work so far. I'm trying to explicitly remove the C files to force regen but the error looks like the Cython fix was not applied (or is not complete) :(

CCing Marcel.

[1] https://copr.fedorainfracloud.org/coprs/dormouse/playground/package/Cython/