I'm encountering this while installing lxml 5.0.0 on macOS. My versions: ``` $ sw_vers ProductName: macOS ProductVersion: 13.6.2 BuildVersion: 22G320 $ poetry run python --version Python 3.9.16 $ clang --version Homebrew clang version 17.0.6 Target: arm64-apple-darwin22.6.0 Thread model: posix InstalledDir: /opt/homebrew/opt/llvm/bin ``` And then the build failure, output from pip running within poetry (since I'm using poetry primarily): ``` $ poetry run pip wheel --no-cache-dir --use-pep517 "lxml (==5.0.0)" Looking in indexes: https://binrepo.mycompany.com/artifactory/api/pypi/pypi-remote/simple/, https://binrepo.mycompany.com/artifactory/api/pypi/tgt-python/simple/ Collecting lxml==5.0.0 Downloading https://binrepo.mycompany.com/artifactory/api/pypi/pypi-remote/packages/packages/80/2c/076fafd979728858829fb9ce2e13fa6367b6be9acc4da0cff6367aa6a1ce/lxml-5.0.0.zip (4.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.1/4.1 MB 5.6 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: lxml Building wheel for lxml (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for lxml (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [161 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 5.0.0. Building without Cython. Building against libxml2 2.9.4 and libxslt 1.1.29 running bdist_wheel running build running build_py creating build creating build/lib.macosx-12.6-arm64-cpython-39 creating build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/_elementpath.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/sax.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/pyclasslookup.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/__init__.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/builder.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/doctestcompare.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/usedoctest.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/cssselect.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/ElementInclude.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml creating build/lib.macosx-12.6-arm64-cpython-39/lxml/includes copying src/lxml/includes/__init__.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml/includes creating build/lib.macosx-12.6-arm64-cpython-39/lxml/html copying src/lxml/html/soupparser.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml/html copying src/lxml/html/defs.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml/html copying src/lxml/html/_setmixin.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml/html copying src/lxml/html/clean.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml/html copying src/lxml/html/_diffcommand.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml/html copying src/lxml/html/html5parser.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml/html copying src/lxml/html/__init__.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml/html copying src/lxml/html/formfill.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml/html copying src/lxml/html/builder.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml/html copying src/lxml/html/ElementSoup.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml/html copying src/lxml/html/_html5builder.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml/html copying src/lxml/html/usedoctest.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml/html copying src/lxml/html/diff.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml/html creating build/lib.macosx-12.6-arm64-cpython-39/lxml/isoschematron copying src/lxml/isoschematron/__init__.py -> build/lib.macosx-12.6-arm64-cpython-39/lxml/isoschematron copying src/lxml/etree.h -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/etree_api.h -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/lxml.etree.h -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/lxml.etree_api.h -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/objectify.pyx -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/etree.pyx -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/public-api.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/xmlid.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/cleanup.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/xslt.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/xpath.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/debug.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/serializer.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/classlookup.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/saxparser.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/objectpath.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/relaxng.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/xinclude.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/iterparse.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/parser.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/dtd.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/apihelpers.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/xmlerror.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/readonlytree.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/extensions.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/xmlschema.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/schematron.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/docloader.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/nsclasses.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/parsertarget.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/xsltext.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/proxy.pxi -> build/lib.macosx-12.6-arm64-cpython-39/lxml copying src/lxml/includes/xmlerror.pxd -> build/lib.macosx-12.6-arm64-cpython-39/lxml/includes copying src/lxml/includes/c14n.pxd -> build/lib.macosx-12.6-arm64-cpython-39/lxml/includes copying src/lxml/includes/xmlschema.pxd -> build/lib.macosx-12.6-arm64-cpython-39/lxml/includes copying src/lxml/includes/__init__.pxd -> build/lib.macosx-12.6-arm64-cpython-39/lxml/includes copying src/lxml/includes/schematron.pxd -> build/lib.macosx-12.6-arm64-cpython-39/lxml/includes copying src/lxml/includes/tree.pxd -> build/lib.macosx-12.6-arm64-cpython-39/lxml/includes copying src/lxml/includes/uri.pxd -> build/lib.macosx-12.6-arm64-cpython-39/lxml/includes copying src/lxml/includes/etreepublic.pxd -> build/lib.macosx-12.6-arm64-cpython-39/lxml/includes copying src/lxml/includes/xpath.pxd -> build/lib.macosx-12.6-arm64-cpython-39/lxml/includes copying src/lxml/includes/htmlparser.pxd -> build/lib.macosx-12.6-arm64-cpython-39/lxml/includes copying src/lxml/includes/xslt.pxd -> build/lib.macosx-12.6-arm64-cpython-39/lxml/includes copying src/lxml/includes/config.pxd -> build/lib.macosx-12.6-arm64-cpython-39/lxml/includes copying src/lxml/includes/xmlparser.pxd -> build/lib.macosx-12.6-arm64-cpython-39/lxml/includes copying src/lxml/includes/xinclude.pxd -> build/lib.macosx-12.6-arm64-cpython-39/lxml/includes copying src/lxml/includes/dtdvalid.pxd -> build/lib.macosx-12.6-arm64-cpython-39/lxml/includes copying src/lxml/includes/relaxng.pxd -> build/lib.macosx-12.6-arm64-cpython-39/lxml/includes copying src/lxml/includes/lxml-version.h -> build/lib.macosx-12.6-arm64-cpython-39/lxml/includes copying src/lxml/includes/etree_defs.h -> build/lib.macosx-12.6-arm64-cpython-39/lxml/includes creating build/lib.macosx-12.6-arm64-cpython-39/lxml/isoschematron/resources creating build/lib.macosx-12.6-arm64-cpython-39/lxml/isoschematron/resources/rng copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.macosx-12.6-arm64-cpython-39/lxml/isoschematron/resources/rng creating build/lib.macosx-12.6-arm64-cpython-39/lxml/isoschematron/resources/xsl copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.macosx-12.6-arm64-cpython-39/lxml/isoschematron/resources/xsl copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.macosx-12.6-arm64-cpython-39/lxml/isoschematron/resources/xsl creating build/lib.macosx-12.6-arm64-cpython-39/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.macosx-12.6-arm64-cpython-39/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.macosx-12.6-arm64-cpython-39/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.macosx-12.6-arm64-cpython-39/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.macosx-12.6-arm64-cpython-39/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.macosx-12.6-arm64-cpython-39/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.macosx-12.6-arm64-cpython-39/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 running build_ext building 'lxml.etree' extension creating build/temp.macosx-12.6-arm64-cpython-39 creating build/temp.macosx-12.6-arm64-cpython-39/src creating build/temp.macosx-12.6-arm64-cpython-39/src/lxml clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -DCYTHON_CLINE_IN_TRACEBACK=0 -Isrc -Isrc/lxml/includes -I/Users/Z003XC4/Library/Caches/pypoetry/virtualenvs/madlibs-reviews-tagging-XRAF4xcm-py3.9/include -I/Users/Z003XC4/.pyenv/versions/3.9.16/include/python3.9 -c src/lxml/etree.c -o build/temp.macosx-12.6-arm64-cpython-39/src/lxml/etree.o -w -flat_namespace src/lxml/etree.c:130044:38: error: incompatible function pointer types assigning to 'xmlStructuredErrorFunc' (aka 'void (*)(void *, struct _xmlError *)') from 'void (void *, const xmlError *)' (aka 'void (void *, const struct _xmlError *)') [-Wincompatible-function-pointer-types] 130044 | __pyx_v_self->_c_ctxt->sax->serror = __pyx_f_4lxml_5etree__receiveParserError; | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/etree.c:134596:25: error: incompatible function pointer types assigning to 'xmlStructuredErrorFunc' (aka 'void (*)(void *, struct _xmlError *)') from 'void (void *, const xmlError *)' (aka 'void (void *, const struct _xmlError *)') [-Wincompatible-function-pointer-types] 134596 | __pyx_v_sax->serror = __pyx_f_4lxml_5etree__receiveParserError; | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/etree.c:203559:28: error: incompatible function pointer types assigning to 'xmlStructuredErrorFunc' (aka 'void (*)(void *, struct _xmlError *)') from 'void (void *, const xmlError *)' (aka 'void (void *, const struct _xmlError *)') [-Wincompatible-function-pointer-types] 203559 | __pyx_v_xpathCtxt->error = __pyx_f_4lxml_5etree__receiveXPathError; | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/lxml/etree.c:242906:60: error: incompatible function pointer types passing 'void (void *, const xmlError *)' (aka 'void (void *, const struct _xmlError *)') to parameter of type 'xmlStructuredErrorFunc' (aka 'void (*)(void *, struct _xmlError *)') [-Wincompatible-function-pointer-types] 242906 | xmlRelaxNGSetParserStructuredErrors(__pyx_v_parser_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml/relaxng.h:154:30: note: passing argument to parameter 'serror' here 154 | xmlStructuredErrorFunc serror, | ^ src/lxml/etree.c:243352:60: error: incompatible function pointer types passing 'void (void *, const xmlError *)' (aka 'void (void *, const struct _xmlError *)') to parameter of type 'xmlStructuredErrorFunc' (aka 'void (*)(void *, struct _xmlError *)') [-Wincompatible-function-pointer-types] 243352 | xmlRelaxNGSetValidStructuredErrors(__pyx_v_valid_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml/relaxng.h:183:31: note: passing argument to parameter 'serror' here 183 | xmlStructuredErrorFunc serror, void *ctx); | ^ src/lxml/etree.c:244349:59: error: incompatible function pointer types passing 'void (void *, const xmlError *)' (aka 'void (void *, const struct _xmlError *)') to parameter of type 'xmlStructuredErrorFunc' (aka 'void (*)(void *, struct _xmlError *)') [-Wincompatible-function-pointer-types] 244349 | xmlSchemaSetParserStructuredErrors(__pyx_v_parser_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml/xmlschemas.h:153:30: note: passing argument to parameter 'serror' here 153 | xmlStructuredErrorFunc serror, | ^ src/lxml/etree.c:244922:59: error: incompatible function pointer types passing 'void (void *, const xmlError *)' (aka 'void (void *, const struct _xmlError *)') to parameter of type 'xmlStructuredErrorFunc' (aka 'void (*)(void *, struct _xmlError *)') [-Wincompatible-function-pointer-types] 244922 | xmlSchemaSetValidStructuredErrors(__pyx_v_valid_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml/xmlschemas.h:182:30: note: passing argument to parameter 'serror' here 182 | xmlStructuredErrorFunc serror, | ^ src/lxml/etree.c:245681:66: error: incompatible function pointer types passing 'void (void *, const xmlError *)' (aka 'void (void *, const struct _xmlError *)') to parameter of type 'xmlStructuredErrorFunc' (aka 'void (*)(void *, struct _xmlError *)') [-Wincompatible-function-pointer-types] 245681 | xmlSchemaSetValidStructuredErrors(__pyx_v_self->_valid_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_error_log)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml/xmlschemas.h:182:30: note: passing argument to parameter 'serror' here 182 | xmlStructuredErrorFunc serror, | ^ src/lxml/etree.c:246911:63: error: incompatible function pointer types passing 'void (void *, const xmlError *)' (aka 'void (void *, const struct _xmlError *)') to parameter of type 'xmlStructuredErrorFunc' (aka 'void (*)(void *, struct _xmlError *)') [-Wincompatible-function-pointer-types] 246911 | xmlSchematronSetValidStructuredErrors(__pyx_v_valid_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libxml/schematron.h:105:31: note: passing argument to parameter 'serror' here 105 | xmlStructuredErrorFunc serror, | ^ 9 errors generated. Compile failed: command '/opt/homebrew/opt/llvm/bin/clang' failed with exit code 1 creating var creating var/folders creating var/folders/pg creating var/folders/pg/6lxh4v9x1jvfvfnyfl1bpd900000gq creating var/folders/pg/6lxh4v9x1jvfvfnyfl1bpd900000gq/T cc -I/usr/include/libxml2 -c /var/folders/pg/6lxh4v9x1jvfvfnyfl1bpd900000gq/T/xmlXPathInitiam68qzp.c -o var/folders/pg/6lxh4v9x1jvfvfnyfl1bpd900000gq/T/xmlXPathInitiam68qzp.o cc var/folders/pg/6lxh4v9x1jvfvfnyfl1bpd900000gq/T/xmlXPathInitiam68qzp.o -lxml2 -o a.out error: command '/opt/homebrew/opt/llvm/bin/clang' 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 one or more wheels ``` I anticipate that limiting lxml to '>=4,<5' in Poetry's version spec will suffice for my particular use case.