Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

javian
Copy link

@javian javian commented Aug 27, 2018

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 .

@javian javian changed the title Fix #76403: MacOS compillation incorrectly linking to system libs Fix #76403: MacOS compilation incorrectly linking to system libs Aug 27, 2018
@php-pulls
Copy link

Comment on behalf of petk at php.net:

Labelling

@cmb69
Copy link
Contributor

cmb69 commented Aug 28, 2018

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.

@mizunashi-mana
Copy link
Contributor

Should we apply also same patch to

AC_DEFUN([PHP_ADD_INCLUDE],[
?

@kabel
Copy link
Contributor

kabel commented Nov 8, 2018

Yes, probably to include paths too, although compiling without it was fine on macOS. #3616 address this in a similar manner.

@SMillerDev
Copy link

@javian could you update this for 7.4? (acinclude.m4 moved to build/php.m4)

@kabel
Copy link
Contributor

kabel commented Jul 20, 2019

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

@GrahamCampbell
Copy link
Contributor

Ping.

@krakjoe
Copy link
Member

krakjoe commented May 10, 2021

This appears to have gone stale, also I believe mac builds should be better nowadays since it's part of CI.

@krakjoe krakjoe closed this May 10, 2021
@SMillerDev
Copy link

It still happens as of php 8.0 in Homebrew, see the patch they currently ship for this.
https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/php.rb#L63-L67
https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/php.rb#L435-L475

@nikic
Copy link
Member

nikic commented May 10, 2021

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).

@krakjoe
Copy link
Member

krakjoe commented May 10, 2021

I also looked deeper, and found pkg-config is probably still the better path.

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.

None yet

9 participants