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
Fix #76403: MacOS compilation incorrectly linking to system libs #3472
Conversation
Comment on behalf of petk at php.net: Labelling |
This appears to be critical for recent macOS versions. Could any of the macOS devs check this out? Also, the fix should be applied at least to PHP-7.3, and maybe PHP-7.2 and -7.1. |
Should we apply also same patch to Line 489 in 1ad0825
|
Yes, probably to include paths too, although compiling without it was fine on macOS. #3616 address this in a similar manner. |
Update handling of headers - https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes - php/php-src#3472
@javian could you update this for 7.4? (acinclude.m4 moved to build/php.m4) |
I've updated my patch at https://github.com/kabel/php-src/commit/0e000cc9ab94008f5554514ef5014ef892c3279b and implemented it for homebrew in a test php@7.4 at https://github.com/kabel/homebrew-core/blob/c085933df00ea1ec4a8e5e72fc6bdf030f5b1b22/Formula/php%407.4.rb |
Ping. |
This appears to have gone stale, also I believe mac builds should be better nowadays since it's part of CI. |
It still happens as of php 8.0 in Homebrew, see the patch they currently ship for this. |
I believe that after the pkg-config migration in 7.4, this is mostly not necessary anymore, but does still affect some leftover extensions that manually check specific paths and add them to the include line. What we should be doing in that case is fix the extension config.m4 to not try adding the system include path in the first place, e.g. what we do for gmp in https://github.com/php/php-src/blob/master/ext/gmp/config.m4 (gmp does not support pkg-config). But I don't know which extensions specifically are affected by this (and possibly I misunderstood the problem). |
I also looked deeper, and found pkg-config is probably still the better path. |
This was originally submitted by @kabel ❤️ but as there's been no progress on the bug tracker and MacOS Mojave is going to break the MacOS builds even more than they are now I wanted to see if it could get some attention on here. The issue is further explained in the bug report https://bugs.php.net/bug.php?id=76403 .