[GH-ISSUE #2405] Build error against >=libxml2-2.12 - s3fs.cpp:3492:27: error: xmlReadMemory was not declared in this scope; did you mean xmlInitMemory? #1183

Closed
opened 2026-03-04 01:52:00 +03:00 by kerem · 10 comments
Owner

Originally created by @a17r on GitHub (Jan 31, 2024).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2405

Downstream report: https://bugs.gentoo.org/917522

Probably just a missing header - to quote libxml2 upstream changelog:

Several cyclic dependencies in public header files were fixed. As a result, certain headers won’t include other headers as before.

Additional Information

Version of s3fs being used (s3fs --version)

1.93

GNU/Linux Distribution, if applicable (cat /etc/os-release)

Gentoo

Originally created by @a17r on GitHub (Jan 31, 2024). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2405 Downstream report: https://bugs.gentoo.org/917522 Probably just a missing header - to quote libxml2 upstream changelog: > Several cyclic dependencies in public header files were fixed. As a result, certain headers won’t include other headers as before. ### Additional Information #### Version of s3fs being used (`s3fs --version`) 1.93 #### GNU/Linux Distribution, if applicable (`cat /etc/os-release`) Gentoo
kerem closed this issue 2026-03-04 01:52:00 +03:00
Author
Owner

@ggtakec commented on GitHub (Feb 4, 2024):

It appears that 2.12 is not yet officially supported by any distribution other than Gentoo. And I haven't been able to confirm it directly yet.

Is it possible for you to confirm the following?

  • Is the libxml2-dev package installed?
  • Would the compilation be successful if you add #include <libxml/parser.h> to src/s3fs_xml.h?

Thanks in advance for your assistance.

<!-- gh-comment-id:1925582814 --> @ggtakec commented on GitHub (Feb 4, 2024): It appears that 2.12 is not yet officially supported by any distribution other than Gentoo. And I haven't been able to confirm it directly yet. Is it possible for you to confirm the following? - Is the libxml2-dev package installed? - Would the compilation be successful if you add `#include <libxml/parser.h>` to `src/s3fs_xml.h`? Thanks in advance for your assistance.
Author
Owner

@gaul commented on GitHub (Feb 13, 2024):

I tested this on Fedora 40 with libxml2-devel-2.12.5-1.fc40.x86_64 but could not reproduce these symptoms.

<!-- gh-comment-id:1942799644 --> @gaul commented on GitHub (Feb 13, 2024): I tested this on Fedora 40 with libxml2-devel-2.12.5-1.fc40.x86_64 but could not reproduce these symptoms.
Author
Owner

@a17r commented on GitHub (Feb 14, 2024):

The downstream bug was filed with 2.12.0, the circular dependency was readded to upstream headers for 2.12.3, that's why you can't reproduce it:

gitlab.gnome.org/GNOME/libxml2/-@72007096e2

@ggtakec Gentoo is source-based so there are no separate -dev packages. Downstream build.log confirms successful libxml2 detection anyway. ;)

<!-- gh-comment-id:1943342661 --> @a17r commented on GitHub (Feb 14, 2024): The downstream bug was filed with `2.12.0`, the circular dependency was readded to upstream headers for `2.12.3`, that's why you can't reproduce it: https://gitlab.gnome.org/GNOME/libxml2/-/commit/72007096e2812f80c9bce2485d85e6d13bb7dbb5 @ggtakec Gentoo is source-based so there are no separate -dev packages. Downstream build.log confirms successful libxml2 detection anyway. ;)
Author
Owner

@a17r commented on GitHub (Feb 14, 2024):

  • Would the compilation be successful if you add #include <libxml/parser.h> to src/s3fs_xml.h?

Yes it fixes compilation. :)

<!-- gh-comment-id:1943356628 --> @a17r commented on GitHub (Feb 14, 2024): > * Would the compilation be successful if you add `#include <libxml/parser.h>` to `src/s3fs_xml.h`? Yes it fixes compilation. :)
Author
Owner

@gaul commented on GitHub (Feb 14, 2024):

Can you submit a pull request for this?

<!-- gh-comment-id:1943685615 --> @gaul commented on GitHub (Feb 14, 2024): Can you submit a pull request for this?
Author
Owner

@ggtakec commented on GitHub (Feb 19, 2024):

@a17r Thanks for your help.
To be clear, is this issue resolved in versions 2.12.3 and later?

@gaul
Even if I write to include libxml/parser.h directly in s3fs_xml.h, it will not cause any problems when using versions other than 2.12.0, but should I PR this and merge it?
It may seem like a special case, but by adding it you can avoid problems with specific versions. (Although it is a waste of description, I think it is okay to write it.)
If this should be added, I can create a PR for this.

<!-- gh-comment-id:1952267800 --> @ggtakec commented on GitHub (Feb 19, 2024): @a17r Thanks for your help. To be clear, is this issue resolved in versions 2.12.3 and later? @gaul Even if I write to include `libxml/parser.h` directly in `s3fs_xml.h`, it will not cause any problems when using versions other than `2.12.0`, but should I PR this and merge it? It may seem like a special case, but by adding it you can avoid problems with specific versions. (Although it is a waste of description, I think it is okay to write it.) If this should be added, I can create a PR for this.
Author
Owner

@a17r commented on GitHub (Feb 22, 2024):

@ggtakec thanks for making the PR. It is not so much that Gentoo needs it, rather that sources should include what they use, if in the future libxml2 will finally get rid of this then s3fs-fuse will no longer be affected.

<!-- gh-comment-id:1959052004 --> @a17r commented on GitHub (Feb 22, 2024): @ggtakec thanks for making the PR. It is not so much that Gentoo needs it, rather that sources should include what they use, if in the future libxml2 will finally get rid of this then s3fs-fuse will no longer be affected.
Author
Owner

@ggtakec commented on GitHub (Feb 23, 2024):

@a17r Excuse me, but let me confirm that I haven't misunderstood yet.
Does this mean that in the combination of Gentoo+libxml (2.12), there are still issues that are required in addition to the code merged by PR?

<!-- gh-comment-id:1960633665 --> @ggtakec commented on GitHub (Feb 23, 2024): @a17r Excuse me, but let me confirm that I haven't misunderstood yet. Does this mean that in the combination of Gentoo+libxml (2.12), there are still issues that are required in addition to the code merged by PR?
Author
Owner

@a17r commented on GitHub (Feb 23, 2024):

No, your PR perfectly solves the issue, I was just alluding to the commit message mentioning Gentoo, when it is not really distro specific (at the time of issuing the PR already >=2.12.4 was available).

>=libxml2-2.12.3 simply put back the header to mitigate the amount of broken revdeps, but this is not guaranteed to stay in the future, so it is good this was fixed.

<!-- gh-comment-id:1961251166 --> @a17r commented on GitHub (Feb 23, 2024): No, your PR perfectly solves the issue, I was just alluding to the commit message mentioning Gentoo, when it is not really distro specific (at the time of issuing the PR already >=2.12.4 was available). \>=libxml2-2.12.3 simply put back the header to mitigate the amount of broken revdeps, but this is not guaranteed to stay in the future, so it is good this was fixed.
Author
Owner

@ggtakec commented on GitHub (Feb 23, 2024):

@a17r Thank you for reply.
I'm glad that PR solved this problem.
This issue will be closed, but if you still have any problems, please reopen or create a new issue.

<!-- gh-comment-id:1961453020 --> @ggtakec commented on GitHub (Feb 23, 2024): @a17r Thank you for reply. I'm glad that PR solved this problem. This issue will be closed, but if you still have any problems, please reopen or create a new issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#1183
No description provided.