-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix GH-15534: Build failure for libxml2 2.9.0 - 2.9.3 #15536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6647b8f
Fix GH-15534: Build failure for libxml2 2.9.0 - 2.9.3
petk 56237da
Autotools: Bump minimum libxml2 version to 2.9.4
petk 55ca034
Remove redundant include file
petk ca8bd23
[skip ci] Simplify UPGRADING note
petk ffd8ab5
Check libxml2 version on Windows
cmb69 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@petk @cmb69 This change assumes that xmlversion.h is in include/libxml2/libxml/xmlversion.h which is most likely not the case. The most likely place for xmlversion.h is include/libxml. With LIBXML_VERSION 20914 I got the warning that I did not have the required libxml version.
Dropping the
\\libxml2
in the last argument of GREP_HEADER did the trick. Or dropping thelibxml/
in the first argument and putting the headers in include/libxml2.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. The GREP_HEADER function should be adjusted a bit, yes. Because the CHECK_HEADER_ADD_INCLUDE checks the include flags by appending them to the other flags, and this one works by a single file path only. It already checks the flags but only the empty PHP_EXTRA_INCLUDES variable (probably)...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CHECK_HEADER_ADD_INCLUDE is smart enough to first check in the main include directory. With the headers in include/libxml it will find the headers. In my case:
for the x64 build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PHP_PHP_BUILD + "\\include\\libxml2"
in CHECK_HEADER_ADD_INCLUDE has been there for ages. I can see it there in PHP 7.0. In PHP 5.6 it simply wasThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm testing something like this now:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From where did you get these libraries? I've checked a couple from windows.php.net, and even one from http://xmlsoft.org/sources/win32/64bit/, and there is always include/libxml2/libxml/*.h.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not have my build machine at hand, but I probably just used https://github.com/winlibs/libxml2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://windows.php.net/downloads/php-sdk/deps/archives/vc11/x64/libxml2-2.9.4-1-vc11-x64.zip
And updates after that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for digging this out. So we need to fix this for best compatibility with other builds. I'll have a look at @petk's PR (thanks for that!) soon (probably the weekend).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cmb69 Could you review the PR so that it can be merged?