Bug 1710131 - python-lxml fails to build with Python 3.8
Summary: python-lxml fails to build with Python 3.8
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-lxml
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON38
TreeView+ depends on / blocked
 
Reported: 2019-05-15 00:02 UTC by Tomas Orsava
Modified: 2019-05-15 10:55 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-15 10:55:04 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Full log from Copr (45.69 KB, text/plain)
2019-05-15 00:02 UTC, Tomas Orsava
no flags Details

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/


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