Bug 279957 - sysutils/osinfo-db-tools: Fails to build with libxml2 2.13.1 and libxslt 1.1.41
Summary: sysutils/osinfo-db-tools: Fails to build with libxml2 2.13.1 and libxslt 1.1.41
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Roman Bogorodskiy
URL:
Keywords:
Depends on: 279798
Blocks: 279705 279741
  Show dependency treegraph
 
Reported: 2024-06-24 17:58 UTC by Daniel Engberg
Modified: 2024-07-12 16:18 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (novel)


Attachments
patch (1.29 KB, patch)
2024-06-29 18:10 UTC, Roman Bogorodskiy
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Roman Bogorodskiy freebsd_committer freebsd_triage 2024-06-24 18:56:34 UTC
I guess you're testing some private branch of yours, as libxml2 is older in the main branch. In that case I'd be interested to know how I can access this branch, otherwise it's a bit of an effort trying to reproduce that.

FWIW, probably a simple fix like that will work:

diff --git a/sysutils/osinfo-db-tools/files/patch-tools_osinfo-db-validate.c b/sysutils/osinfo-db-tools/files/patch-tools_osinfo-db-validate.c
new file mode 100644
index 000000000000..7132a837e075
--- /dev/null
+++ b/sysutils/osinfo-db-tools/files/patch-tools_osinfo-db-validate.c
@@ -0,0 +1,11 @@
+--- tools/osinfo-db-validate.c.orig    2024-06-24 18:48:37 UTC
++++ tools/osinfo-db-validate.c
+@@ -35,7 +35,7 @@ static void validate_structured_error_nop(void *userDa
+ }
+ 
+ static void validate_structured_error_nop(void *userData G_GNUC_UNUSED,
+-                                          xmlErrorPtr error G_GNUC_UNUSED)
++                                          const xmlErrorPtr error G_GNUC_UNUSED)
+ {
+     if (error->file)
+         g_printerr("%s:%d %s", error->file, error->line, error->message);
Comment 2 Daniel Engberg freebsd_committer freebsd_triage 2024-06-24 18:58:54 UTC
Patches are available in the PRs listed in "Blocks"
Comment 3 Roman Bogorodskiy freebsd_committer freebsd_triage 2024-06-29 18:10:52 UTC
Created attachment 251780 [details]
patch
Comment 4 Roman Bogorodskiy freebsd_committer freebsd_triage 2024-06-29 18:45:22 UTC
Upstream has a fix:

https://gitlab.com/libosinfo/osinfo-db-tools/-/commit/34378a4ac257f2f5fcf364786d1634a8c36b304f

It only supports the newer libxml2.

I've created a similar patch, but which supports both older and the newer libxml2.

I guess it would be easier for you if I commit the fix that works with both versions?
Comment 5 Daniel Engberg freebsd_committer freebsd_triage 2024-06-30 08:27:44 UTC
Looks good on my end too, thanks!
Comment 6 commit-hook freebsd_committer freebsd_triage 2024-07-12 16:18:00 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2b8253d764cc16cf584d86b4c27966717b212a9f

commit 2b8253d764cc16cf584d86b4c27966717b212a9f
Author:     Roman Bogorodskiy <novel@FreeBSD.org>
AuthorDate: 2024-06-29 18:04:23 +0000
Commit:     Roman Bogorodskiy <novel@FreeBSD.org>
CommitDate: 2024-07-12 16:12:12 +0000

    sysutils/osinfo-db: fix build with newer libxml2

    PR:             279957
    Reported by:    diizzy

 .../files/patch-tools_osinfo-db-validate.c (new)          | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
Comment 7 Roman Bogorodskiy freebsd_committer freebsd_triage 2024-07-12 16:18:11 UTC
Change committed, so the problem should be resolved now.