Skip to content
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

Closed
3 of 15 tasks
skarczjh opened this issue Jan 29, 2025 · 9 comments
Closed
3 of 15 tasks

lxml fails to build or install from pip #11505

skarczjh opened this issue Jan 29, 2025 · 9 comments

Comments

@skarczjh
Copy link

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:

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]
      <string>: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:265[182](https://github.com/jkhy/jhdocs/actions/runs/13042005632/job/36385715589#step:8:183):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’
      270[235](https://github.com/jkhy/jhdocs/actions/runs/13042005632/job/36385715589#step:8:236) |                 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]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for lxml
Failed to build lxml
ERROR: Failed to build installable wheels for some pyproject.toml based projects (lxml)

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • macOS 15
  • macOS 15 Arm64
  • Windows Server 2019
  • Windows Server 2022
  • Windows Server 2025

Image version and build link

Version: 20250126.1.0

Is it regression?

Yes, Version: 20250120.5.0 didn't have this behavior

Expected behavior

2025-01-28T21:18:29.3236842Z Collecting lxml<5.0.0,>=4.9.0 (from mkdocs-drawio-file->-r requirements.txt (line 3))
2025-01-28T21:18:29.3280300Z   Downloading lxml-4.9.4-cp312-cp312-manylinux_2_28_x86_64.whl.metadata (3.7 kB)
``

### Actual 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]


### Repro steps

Build mkdocs via GitHub Actions with drawio plugin.
@RaviAkshintala
Copy link
Contributor

Hi @skarczjh Thank you for bringing this issue to our attention. We will look into this issue closely and will update you after investigating.

@RaviAkshintala
Copy link
Contributor

@skarczjh The issue is with lxml version 4.9.0. Please upgrade to the latest version, 5.3.0, as it will resolve the issue. Thanks.

@elmbeech
Copy link

elmbeech commented Feb 1, 2025

thank you @skarczjh and @RaviAkshintala .
you made my day!

axmsoftware added a commit to OpenLEADR/openleadr-python that referenced this issue Feb 3, 2025
@vidyasagarnimmagaddi
Copy link
Contributor

Hi @skarczjh , could you please confirm whether the issue is resolved updating lxml latest version 5.3.0 .thanks

@elmbeech
Copy link

elmbeech commented Feb 4, 2025

@vidyasagarnimmagaddi yes it is resolved!

@elstak
Copy link

elstak commented Feb 5, 2025

@elmbeech, how did you do that? mkdocs-drawio-file explicitly requires version 4.9.x version: Collecting lxml<5.0.0,>=4.9.0

@elmbeech
Copy link

elmbeech commented Feb 5, 2025

hi @elstak ,

in the workflow yml file i could set it like bleow.
so maybe you can try "lxml=4.9.0" because the error occurred with 4.9.4.
not sure if you find a workaround, or so to say, if it works with one of the 4 other possible versions.
you have to give a try.

Image

@elstak
Copy link

elstak commented Feb 6, 2025

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.

@vidyasagarnimmagaddi
Copy link
Contributor

Hi @elmbeech , Thanks for confirming, closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants