https://pdr2.bofh.network/data/140-diizzy/libxml2-libxslt-run2/logs/errors/tclxml-3.3_8.log
Hi - thanks for the report. I don't have libxml2 2.13.1 and libxslt 1.1.41, but I think I have a patch. Can you please try this? --- docObj.c.orig 2024-06-25 06:16:01 UTC +++ docObj.c @@ -1854,7 +1854,7 @@ TclXML_libxml2_ErrorHandler (ctx, error) void TclXML_libxml2_ErrorHandler (ctx, error) void *ctx; /* ignore - depends on context */ - xmlErrorPtr error; + const xmlErrorPtr error; { ThreadSpecificData *tsdPtr = Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); Tcl_Obj *objPtr;
Created attachment 251767 [details] Patch for tclxml Sources: https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-tcltk/tclxml/files/tclxml-3.2-fix-implicit-declarations.patch https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-tcltk/tclxml/files/tclxml-3.3.1-funcPointer.patch With PR 279705 and 279741 applied Poudriere testport OK 13.2-RELEASE (amd64) Poudriere testport OK 14.0-RELEASE (amd64) Without PRs applied Poudriere testport OK 13.2-RELEASE (amd64) Poudriere testport OK 14.0-RELEASE (amd64)
Two things: 1) I think the patch to should include this second chunk too: --- include/tclxml-libxml2/tclxml-libxml2Decls.h.orig 2013-03-30 17:17:07 UTC +++ include/tclxml-libxml2/tclxml-libxml2Decls.h @@ -55,7 +55,7 @@ EXTERN void TclXML_libxml2_ErrorHandler _ANSI_ARGS_(( TclXML_libxml2_DocumentHandling keep)); /* 10 */ EXTERN void TclXML_libxml2_ErrorHandler _ANSI_ARGS_((void * ctx, - xmlErrorPtr error)); + const xmlError *error)); /* 11 */ EXTERN void TclXML_libxml2_ResetError _ANSI_ARGS_(( Tcl_Interp * interp)); @@ -93,7 +93,7 @@ typedef struct Tclxml_libxml2Stubs { int (*tclXML_libxml2_GetTclDocFromNode) _ANSI_ARGS_((Tcl_Interp * interp, xmlNodePtr nodePtr, TclXML_libxml2_Document ** tDocPtrPtr)); /* 7 */ void (*tclXML_libxml2_DestroyDocument) _ANSI_ARGS_((TclXML_libxml2_Document * tDocPtr)); /* 8 */ void (*tclXML_libxml2_DocKeep) _ANSI_ARGS_((Tcl_Obj * objPtr, TclXML_libxml2_DocumentHandling keep)); /* 9 */ - void (*tclXML_libxml2_ErrorHandler) _ANSI_ARGS_((void * ctx, xmlErrorPtr error)); /* 10 */ + void (*tclXML_libxml2_ErrorHandler) _ANSI_ARGS_((void * ctx, const xmlError * error)); /* 10 */ void (*tclXML_libxml2_ResetError) _ANSI_ARGS_((Tcl_Interp * interp)); /* 11 */ Tcl_Obj * (*tclXML_libxml2_GetErrorObj) _ANSI_ARGS_((Tcl_Interp * interp)); /* 12 */ void (*tclXML_libxml2_SetErrorNodeFunc) _ANSI_ARGS_((Tcl_Interp * interp, TclXML_ErrorNodeHandlerProc * proc)); /* 13 */ 2) These patches cannot be applied to the current libxml2 2.11.8, as the signature of that function is not backwards compatible. docObj.c:124:60: error: incompatible function pointer types passing 'void (void *, const xmlError *)' (aka 'void (void *, const struct _xmlError *)') to parameter of type 'xmlStructured ErrorFunc' (aka 'void (*)(void *, struct _xmlError *)') [-Wincompatible-function-pointer-types] xmlSetStructuredErrorFunc((void *) tsdPtr->errorInfoPtr, TclXML_libxml2_ErrorHandler); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/libxml2/libxml/xmlerror.h:873:29: note: passing argument to parameter 'handler' here xmlStructuredErrorFunc handler); Are you planning to commit everything at once? An alternative would be to conditionally change the signatures under LIBXML_VERSION_NUMBER >= 21200
The preferable solution is to have as much as possible ready in tree supporting both versions as there will be exp-run requests.
Created attachment 251802 [details] Fix tclxml build with libxml2 2.11 and 2.13
Can you please check the attached patch with libxml2 2.13.1?
Works fine on my end at least :) https://pdr2.bofh.network/data/140-diizzy/2024-06-30_13h48m35s/logs/tclxml-3.3_8.log https://pdr2.bofh.network/data/132-diizzy/2024-06-30_13h49m17s/logs/tclxml-3.3_8.log
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=af36765e17ba36d0e86e95d4476b67f894209468 commit af36765e17ba36d0e86e95d4476b67f894209468 Author: Pietro Cerutti <gahr@FreeBSD.org> AuthorDate: 2024-07-01 06:39:47 +0000 Commit: Pietro Cerutti <gahr@FreeBSD.org> CommitDate: 2024-07-01 06:49:49 +0000 devel/tclxml: fix build with libxml2 >= 2.12 Version 2.12 of libxml2 introduced a backwards incompatible change in the signature of some functions, notably the second argument to xmlStructuredErrorFunc has gained a const qualifier, changing from `xmlError *error` to `const xmlError *error`. To make the signatures compatible with both pre- and post-2.12, I have introduced a check on LIBXML_VERSION. PR: 279968 Reported by: dizzy devel/tclxml/Makefile | 2 +- devel/tclxml/files/patch-Makefile.in | 13 ++++++++- devel/tclxml/files/patch-configure | 19 ++++++++++--- devel/tclxml/files/patch-docObj.c (new) | 19 +++++++++++++ ...lude_tclxml-libxml2_tclxml-libxml2Decls.h (new) | 31 ++++++++++++++++++++++ devel/tclxml/files/patch-tclxml.c (new) | 11 ++++++++ 6 files changed, 90 insertions(+), 5 deletions(-)