Opened 8 weeks ago

Closed 7 weeks ago

Last modified 7 weeks ago

#69576 closed defect (fixed)

py312-lxml @4.9.3: error: incompatible function pointer types assigning to 'xmlStructuredErrorFunc'

Reported by: rrobtoo (Robert K.) Owned by: petrrr
Priority: Normal Milestone:
Component: ports Version: 2.9.1
Keywords: Cc: ddrum2000, BSDer, reneeotten (Renee Otten)
Port: py312-lxml

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Hi Team,
The py312-lxml compilation fails with the following error

:debug:main Starting logging for py312-lxml @4.9.3_0
:debug:sysinfo macOS 14.4 (darwin/23.4.0) arch arm
:debug:sysinfo MacPorts 2.9.1
:debug:sysinfo Xcode 15.3, CLT 15.3.0.0.1.1708646388
:debug:sysinfo SDK 14
:debug:sysinfo MACOSX_DEPLOYMENT_TARGET: 14.0
:info:build creating build/temp.macosx-14.0-arm64-cpython-312/src/lxml
:info:build /usr/bin/clang -fno-strict-overflow -fno-common -dynamic -DNDEBUG -g -O3 -Wall -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -DCYTHON_CLINE_IN_TRACEBACK=0 -I/opt/ports/include/libxml2 -Isrc -Isrc/lxml/includes -I/opt/ports/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c src/lxml/etree.c -o build/temp.macosx-14.0-arm64-cpython-312/src/lxml/etree.o -w -flat_namespace
:info:build src/lxml/etree.c:113152:38: error: incompatible function pointer types assigning to 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const struct _xmlError *)') from 'void (void *, xmlError *)' (aka 'void (void *, struct _xmlError *)') [-Wincompatible-function-pointer-types]
:info:build   __pyx_v_self->_c_ctxt->sax->serror = __pyx_f_4lxml_5etree__receiveParserError;
:info:build                                      ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build src/lxml/etree.c:117640:25: error: incompatible function pointer types assigning to 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const struct _xmlError *)') from 'void (void *, xmlError *)' (aka 'void (void *, struct _xmlError *)') [-Wincompatible-function-pointer-types]
:info:build     __pyx_v_sax->serror = __pyx_f_4lxml_5etree__receiveParserError;
:info:build                         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build src/lxml/etree.c:181724:28: error: incompatible function pointer types assigning to 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const struct _xmlError *)') from 'void (void *, xmlError *)' (aka 'void (void *, struct _xmlError *)') [-Wincompatible-function-pointer-types]
:info:build   __pyx_v_xpathCtxt->error = __pyx_f_4lxml_5etree__receiveXPathError;
:info:build                            ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build src/lxml/etree.c:218998:60: error: incompatible function pointer types passing 'void (void *, xmlError *)' (aka 'void (void *, struct _xmlError *)') to parameter of type 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const struct _xmlError *)') [-Wincompatible-function-pointer-types]
:info:build   xmlRelaxNGSetParserStructuredErrors(__pyx_v_parser_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log));
:info:build                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build /opt/ports/include/libxml2/libxml/relaxng.h:156:30: note: passing argument to parameter 'serror' here
:info:build                                          xmlStructuredErrorFunc serror,
:info:build                                                                 ^
:info:build src/lxml/etree.c:219416:60: error: incompatible function pointer types passing 'void (void *, xmlError *)' (aka 'void (void *, struct _xmlError *)') to parameter of type 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const struct _xmlError *)') [-Wincompatible-function-pointer-types]
:info:build     xmlRelaxNGSetValidStructuredErrors(__pyx_v_valid_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log));
:info:build                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build /opt/ports/include/libxml2/libxml/relaxng.h:185:31: note: passing argument to parameter 'serror' here
:info:build                                           xmlStructuredErrorFunc serror, void *ctx);
:info:build                                                                  ^
:info:build src/lxml/etree.c:220305:59: error: incompatible function pointer types passing 'void (void *, xmlError *)' (aka 'void (void *, struct _xmlError *)') to parameter of type 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const struct _xmlError *)') [-Wincompatible-function-pointer-types]
:info:build   xmlSchemaSetParserStructuredErrors(__pyx_v_parser_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log));
:info:build                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build /opt/ports/include/libxml2/libxml/xmlschemas.h:156:30: note: passing argument to parameter 'serror' here
:info:build                                          xmlStructuredErrorFunc serror,
:info:build                                                                 ^
:info:build src/lxml/etree.c:220848:59: error: incompatible function pointer types passing 'void (void *, xmlError *)' (aka 'void (void *, struct _xmlError *)') to parameter of type 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const struct _xmlError *)') [-Wincompatible-function-pointer-types]
:info:build     xmlSchemaSetValidStructuredErrors(__pyx_v_valid_ctxt, __pyx_f_4lxml_5etree__receiveError, ((void *)__pyx_v_self->__pyx_base._error_log));
:info:build                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build /opt/ports/include/libxml2/libxml/xmlschemas.h:185:30: note: passing argument to parameter 'serror' here
:info:build                                          xmlStructuredErrorFunc serror,
:info:build                                                                 ^

Change History (6)

comment:1 Changed 8 weeks ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Owner: set to petrrr
Status: newassigned
Summary: py312-lxml error: incompatible function pointer types assigning to 'xmlStructuredErrorFunc'py312-lxml @4.9.3: error: incompatible function pointer types assigning to 'xmlStructuredErrorFunc'

Here is the upstream bug report and their fix which is included in version 5.0.0 to which the port should be updated (or to 5.1.0).

comment:2 Changed 7 weeks ago by ddrum2000

Cc: ddrum2000 added

comment:3 Changed 7 weeks ago by ryandesign (Ryan Carsten Schmidt)

Cc: BSDer added

Has duplicate #69622.

comment:4 Changed 7 weeks ago by reneeotten (Renee Otten)

Resolution: fixed
Status: assignedclosed

In e825035b4dbd6acdbd2bf72f5b4024b1c649d38e/macports-ports (master):

py-lxml: update to 5.1.1

  • pin to 5.02 for PY27 and PY35

Closes: #69576

comment:5 Changed 7 weeks ago by jmroot (Joshua Root)

Cc: reneeotten added

The committed update is failing like this for py37 and later:

ERROR Missing dependencies:
	Cython>=3.0.9

py36 is also failing with a different missing dependency:

ModuleNotFoundError: No module named 'setuptools'
Last edited 7 weeks ago by jmroot (Joshua Root) (previous) (diff)

comment:6 in reply to:  5 Changed 7 weeks ago by barracuda156

Replying to jmroot:

Apparently it fails now almost on every system. For example: https://ports.macports.org/port/py311-lxml/details

Note: See TracTickets for help on using tickets.