Skip to content

Fix GREP_HEADER on Windows #15619

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

Closed
wants to merge 1 commit into from
Closed

Conversation

petk
Copy link
Member

@petk petk commented Aug 28, 2024

I still need to retest this a bit if it covers all cases correctly. This check never actually worked properly as the filename needs to be appended to the file_get_contents path.

This fixes the libxml version check when the libxml/xmlversion.h is located elsewhere than libxml2 include directory.

Fixes #15536 (comment)

This fixes the libxml version check when the libxml/xmlversion.h is
located elsewhere than libxml2 include directory.
@Jan-E
Copy link
Contributor

Jan-E commented Aug 28, 2024

I originally applied only this: #15536 (comment)
Without the changes in both file_get_contents() statements I got the following output for the x86 build:

Checking for libxml/parser.h ... ../win32build\include
Checking for libxml/tree.h ... ../win32build\include
Checking for libxml/xmlversion.h ... ../win32build\include
Problem reading ../win32build\include

But with the complete patch it works as expected in my build environment:

Checking for library libxml2_a_dll.lib;libxml2_a.lib ... ..\win32build\lib\libxml2_a_dll.lib
Checking for library libiconv_a.lib;iconv_a.lib;libiconv.lib;iconv.lib ... ..\win32build\lib\libiconv_a.lib
Checking for libxml/parser.h ... ../win32build\include
Checking for libxml/tree.h ... ../win32build\include
Checking for libxml/xmlversion.h ... ../win32build\include
Enabling extension ext\libxml

Copy link
Member

@cmb69 cmb69 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, no time to thoroughly check this. Feel free to merge, or not.

@Jan-E
Copy link
Contributor

Jan-E commented Sep 24, 2024

Sorry, no time to thoroughly check this. Feel free to merge, or not.

@petk What is the status? Can this be merged?

@cmb69 cmb69 mentioned this pull request Oct 3, 2024
@cmb69
Copy link
Member

cmb69 commented Oct 3, 2024

Due to #16199, I had a closer look, and I think the patch is correct. I'm going to apply to PHP-8.4.

Note, though, that the php_usual_*_suspects are broken anyway for builds without --with-php-build=…, because

if (PHP_PHP_BUILD != "no") {

is always true (at least for regular builds; haven't checked phpize builds), due to php_build_option_handle() wich is called earlier. This is all a terrible mess.

Anyhow, thanks for the PR!

@cmb69 cmb69 closed this in e915ed7 Oct 3, 2024
@petk petk deleted the patch-windows-libxml-version branch October 3, 2024 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants