-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lxml fails to build or install from pip #11505
Comments
Hi @skarczjh Thank you for bringing this issue to our attention. We will look into this issue closely and will update you after investigating. |
@skarczjh The issue is with lxml version |
thank you @skarczjh and @RaviAkshintala . |
see actions/runner-images#11505 Signed-off-by: AXM Software <[email protected]>
Hi @skarczjh , could you please confirm whether the issue is resolved updating lxml latest version |
@vidyasagarnimmagaddi yes it is resolved! |
@elmbeech, how did you do that? |
hi @elstak , in the workflow yml file i could set it like bleow. |
Thanks, @elmbeech . I tried with 4.9.0 instead of 4.9.4 but it didn't work. I could solve it forcing python 3.12 instead of the latest 3.13. |
Hi @elmbeech , Thanks for confirming, closing this issue. |
Description
For some reason, lxml is being built when installed from pip rather than pulling the whl. As it is trying to be built, it fails on both 22.04 and 24.04:
Platforms affected
Runner images affected
Image version and build link
Version: 20250126.1.0
Is it regression?
Yes, Version: 20250120.5.0 didn't have this behavior
Expected behavior
Building wheels for collected packages: lxml
Building wheel for lxml (pyproject.toml): started
Building wheel for lxml (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
× Building wheel for lxml (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [175 lines of output]
:67: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
Building lxml version 4.9.4.
Building without Cython.
Building against libxml2 2.9.14 and libxslt 1.1.39
running bdist_wheel
running build
running build_py
creating build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/builder.py -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/ElementInclude.py -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/cssselect.py -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/init.py -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/sax.py -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-cpython-313/lxml
creating build/lib.linux-x86_64-cpython-313/lxml/includes
copying src/lxml/includes/init.py -> build/lib.linux-x86_64-cpython-313/lxml/includes
creating build/lib.linux-x86_64-cpython-313/lxml/html
copying src/lxml/html/builder.py -> build/lib.linux-x86_64-cpython-313/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-cpython-313/lxml/html
copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-cpython-313/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-cpython-313/lxml/html
copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-cpython-313/lxml/html
copying src/lxml/html/defs.py -> build/lib.linux-x86_64-cpython-313/lxml/html
copying src/lxml/html/diff.py -> build/lib.linux-x86_64-cpython-313/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.linux-x86_64-cpython-313/lxml/html
copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-cpython-313/lxml/html
copying src/lxml/html/clean.py -> build/lib.linux-x86_64-cpython-313/lxml/html
copying src/lxml/html/init.py -> build/lib.linux-x86_64-cpython-313/lxml/html
copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-cpython-313/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-cpython-313/lxml/html
creating build/lib.linux-x86_64-cpython-313/lxml/isoschematron
copying src/lxml/isoschematron/init.py -> build/lib.linux-x86_64-cpython-313/lxml/isoschematron
copying src/lxml/etree.h -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/etree_api.h -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/lxml.etree.h -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/etree.pyx -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/objectify.pyx -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/xpath.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/relaxng.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/docloader.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/schematron.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/xsltext.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/dtd.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/xinclude.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/parser.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/xslt.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/readonlytree.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/public-api.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/objectpath.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/proxy.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/parsertarget.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/xmlerror.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/extensions.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/cleanup.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/classlookup.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/xmlid.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/iterparse.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/saxparser.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/serializer.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/apihelpers.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/nsclasses.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/xmlschema.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/debug.pxi -> build/lib.linux-x86_64-cpython-313/lxml
copying src/lxml/includes/xinclude.pxd -> build/lib.linux-x86_64-cpython-313/lxml/includes
copying src/lxml/includes/init.pxd -> build/lib.linux-x86_64-cpython-313/lxml/includes
copying src/lxml/includes/c14n.pxd -> build/lib.linux-x86_64-cpython-313/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-x86_64-cpython-313/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.linux-x86_64-cpython-313/lxml/includes
copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-x86_64-cpython-313/lxml/includes
copying src/lxml/includes/config.pxd -> build/lib.linux-x86_64-cpython-313/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.linux-x86_64-cpython-313/lxml/includes
copying src/lxml/includes/schematron.pxd -> build/lib.linux-x86_64-cpython-313/lxml/includes
copying src/lxml/includes/xpath.pxd -> build/lib.linux-x86_64-cpython-313/lxml/includes
copying src/lxml/includes/xslt.pxd -> build/lib.linux-x86_64-cpython-313/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-x86_64-cpython-313/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-x86_64-cpython-313/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-x86_64-cpython-313/lxml/includes
copying src/lxml/includes/relaxng.pxd -> build/lib.linux-x86_64-cpython-313/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-x86_64-cpython-313/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-cpython-313/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.linux-x86_64-cpython-313/lxml/includes
creating build/lib.linux-x86_64-cpython-313/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-cpython-313/lxml/isoschematron/resources/rng
creating build/lib.linux-x86_64-cpython-313/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-x86_64-cpython-313/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-x86_64-cpython-313/lxml/isoschematron/resources/xsl
creating build/lib.linux-x86_64-cpython-313/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-x86_64-cpython-313/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-x86_64-cpython-313/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-x86_64-cpython-313/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-x86_64-cpython-313/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-x86_64-cpython-313/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-x86_64-cpython-313/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build/temp.linux-x86_64-cpython-313/src/lxml
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -I/usr/include/libxml2 -Isrc -Isrc/lxml/includes -I/opt/hostedtoolcache/Python/3.13.1/x64/include/python3.13 -c src/lxml/etree.c -o build/temp.linux-x86_64-cpython-313/src/lxml/etree.o -w
src/lxml/etree.c: In function ‘__Pyx_init_assertions_enabled’:
src/lxml/etree.c:5988:105: error: invalid type argument of ‘->’ (have ‘int’)
5988 | __pyx_assertions_enabled_flag = ! _PyInterpreterState_GetConfig(__Pyx_PyThreadState_Current->interp)->optimization_level;
| ^~
src/lxml/etree.c: In function ‘__Pyx_PyIter_Next2’:
src/lxml/etree.c:265182:35: error: ‘_PyObject_NextNotImplemented’ undeclared (first use in this function); did you mean ‘PyObject_HashNotImplemented’?
265182 | if (unlikely(iternext == &_PyObject_NextNotImplemented))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/etree.c:1096:43: note: in definition of macro ‘unlikely’
1096 | #define unlikely(x) __builtin_expect(!!(x), 0)
| ^
src/lxml/etree.c:265182:35: note: each undeclared identifier is reported only once for each function it appears in
265182 | if (unlikely(iternext == &_PyObject_NextNotImplemented))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/lxml/etree.c:1096:43: note: in definition of macro ‘unlikely’
1096 | #define unlikely(x) __builtin_expect(!!(x), 0)
| ^
src/lxml/etree.c: In function ‘__Pyx_PyInt_As_int’:
src/lxml/etree.c:269066:27: error: too few arguments to function ‘_PyLong_AsByteArray’
269066 | int ret = _PyLong_AsByteArray((PyLongObject )v,
| ^~~~~~~~~~~~~~~~~~~
In file included from /opt/hostedtoolcache/Python/3.13.1/x64/include/python3.13/longobject.h:107,
from /opt/hostedtoolcache/Python/3.13.1/x64/include/python3.13/Python.h:81,
from src/lxml/etree.c:96:
/opt/hostedtoolcache/Python/3.13.1/x64/include/python3.13/cpython/longobject.h:111:17: note: declared here
111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject v,
| ^~~~~~~~~~~~~~~~~~~
src/lxml/etree.c: In function ‘__Pyx_PyInt_As_size_t’:
src/lxml/etree.c:269375:27: error: too few arguments to function ‘_PyLong_AsByteArray’
269375 | int ret = _PyLong_AsByteArray((PyLongObject )v,
| ^~~~~~~~~~~~~~~~~~~
/opt/hostedtoolcache/Python/3.13.1/x64/include/python3.13/cpython/longobject.h:111:17: note: declared here
111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject v,
| ^~~~~~~~~~~~~~~~~~~
src/lxml/etree.c: In function ‘__Pyx_PyInt_As_unsigned_int’:
src/lxml/etree.c:269571:27: error: too few arguments to function ‘_PyLong_AsByteArray’
269571 | int ret = _PyLong_AsByteArray((PyLongObject )v,
| ^~~~~~~~~~~~~~~~~~~
/opt/hostedtoolcache/Python/3.13.1/x64/include/python3.13/cpython/longobject.h:111:17: note: declared here
111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject v,
| ^~~~~~~~~~~~~~~~~~~
src/lxml/etree.c: In function ‘__Pyx_PyInt_As_signed__char’:
src/lxml/etree.c:269767:27: error: too few arguments to function ‘_PyLong_AsByteArray’
269767 | int ret = _PyLong_AsByteArray((PyLongObject )v,
| ^~~~~~~~~~~~~~~~~~~
/opt/hostedtoolcache/Python/3.13.1/x64/include/python3.13/cpython/longobject.h:111:17: note: declared here
111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject v,
| ^~~~~~~~~~~~~~~~~~~
src/lxml/etree.c: In function ‘__Pyx_PyInt_As_unsigned_short’:
src/lxml/etree.c:270001:27: error: too few arguments to function ‘_PyLong_AsByteArray’
270001 | int ret = _PyLong_AsByteArray((PyLongObject )v,
| ^~~~~~~~~~~~~~~~~~~
/opt/hostedtoolcache/Python/3.13.1/x64/include/python3.13/cpython/longobject.h:111:17: note: declared here
111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject v,
| ^~~~~~~~~~~~~~~~~~~
src/lxml/etree.c: In function ‘__Pyx_PyInt_As_xmlChar’:
src/lxml/etree.c:270235:27: error: too few arguments to function ‘_PyLong_AsByteArray’
270235 | int ret = _PyLong_AsByteArray((PyLongObject )v,
| ^~~~~~~~~~~~~~~~~~~
/opt/hostedtoolcache/Python/3.13.1/x64/include/python3.13/cpython/longobject.h:111:17: note: declared here
111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject v,
| ^~~~~~~~~~~~~~~~~~~
src/lxml/etree.c: In function ‘__Pyx_PyInt_As_long’:
src/lxml/etree.c:270438:27: error: too few arguments to function ‘_PyLong_AsByteArray’
270438 | int ret = _PyLong_AsByteArray((PyLongObject )v,
| ^~~~~~~~~~~~~~~~~~~
/opt/hostedtoolcache/Python/3.13.1/x64/include/python3.13/cpython/longobject.h:111:17: note: declared here
111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject v,
| ^~~~~~~~~~~~~~~~~~~
Compile failed: command '/usr/bin/gcc' failed with exit code 1
creating tmp
cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInitpn93mbpd.c -o tmp/xmlXPathInitpn93mbpd.o
cc tmp/xmlXPathInitpn93mbpd.o -lxml2 -o a.out
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
The text was updated successfully, but these errors were encountered: