Skip to content

Fix build issue with libxml2 2.14+.#16

Merged
cfis merged 1 commit intoxml4r:masterfrom
sugi:fix-build-issue-with-libxml2-2.14
Feb 7, 2026
Merged

Fix build issue with libxml2 2.14+.#16
cfis merged 1 commit intoxml4r:masterfrom
sugi:fix-build-issue-with-libxml2-2.14

Conversation

@sugi
Copy link
Contributor

@sugi sugi commented Feb 7, 2026

Hello,

I found a build issue with libxml2 2.14 above.

Summary

extconf.rb uses xmlXPtrNewRange as a probe function to detect the presence of libxml2. This function was removed in libxml2 2.14.0 (March 2025) as part of the XPointer range/point extension cleanup, causing the library detection to fail and the gem build to abort with:

checking for xmlXPtrNewRange() in -lxml2... no
checking for xmlXPtrNewRange() in -llibxml2... no
checking for xmlXPtrNewRange() in -lxml2... no
*** extconf failure: Cannot find libxml2.

This affects all systems with libxml2 >= 2.14.0, including Debian forky (testing, which ships libxml2 2.15.x).

Fix

Replace the probe function with xmlXPtrNewContext, which remains in libxml2's XPointer API. The function is not used in the gem's C source code itself — it is only referenced in extconf.rb for library detection.

References

@cfis
Copy link
Member

cfis commented Feb 7, 2026

Thanks!

@cfis cfis merged commit 14b1968 into xml4r:master Feb 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants