This repository has been archived by the owner. It is now read-only.

php failed to build on 10.11 #1941

Closed
bfontaine opened this Issue Jul 28, 2015 · 28 comments

Comments

Projects
None yet
@bfontaine
Member

bfontaine commented Jul 28, 2015

From @yekz on July 28, 2015 8:10

brew install php56
Warning: You are using OS X 10.11.
We do not provide support for this pre-release version.
You may encounter build failures or other breakage.
==> Installing php56 from homebrew/homebrew-php
==> Downloading https://php.net/get/php-5.6.11.tar.bz2/from/this/mirror
Already downloaded: /Library/Caches/Homebrew/php56-5.6.11
==> ./configure --prefix=/usr/local/Cellar/php56/5.6.11_2 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc
==> make
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [sapi/cgi/php-cgi] Error 1
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libs/libphp5.bundle] Error 1

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
  https://github.com/homebrew/homebrew-php/issues

Warning: You are using OS X 10.11.
We do not provide support for this pre-release version.
You may encounter build failures or other breakage.

Copied from original issue: Homebrew/legacy-homebrew#42197

@bfontaine

This comment has been minimized.

Show comment
Hide comment
@bfontaine

bfontaine Jul 28, 2015

Member

From @yekz on July 28, 2015 8:50

php55:

brew install php55
Warning: You are using OS X 10.11.
We do not provide support for this pre-release version.
You may encounter build failures or other breakage.
==> Installing php55 from homebrew/homebrew-php
==> Downloading https://php.net/get/php-5.5.27.tar.bz2/from/this/mirror
==> Downloading from https://secure.php.net/distributions/php-5.5.27.tar.bz2
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/php55/5.5.27_2 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc
==> make
make: *** Waiting for unfinished jobs....
make: *** [sapi/fpm/php-fpm] Error 1
make: *** [sapi/cli/php] Error 1
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libs/libphp5.bundle] Error 1

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
https://github.com/homebrew/homebrew-php/issues

Warning: You are using OS X 10.11.
We do not provide support for this pre-release version.
You may encounter build failures or other breakage.

Member

bfontaine commented Jul 28, 2015

From @yekz on July 28, 2015 8:50

php55:

brew install php55
Warning: You are using OS X 10.11.
We do not provide support for this pre-release version.
You may encounter build failures or other breakage.
==> Installing php55 from homebrew/homebrew-php
==> Downloading https://php.net/get/php-5.5.27.tar.bz2/from/this/mirror
==> Downloading from https://secure.php.net/distributions/php-5.5.27.tar.bz2
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/php55/5.5.27_2 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc
==> make
make: *** Waiting for unfinished jobs....
make: *** [sapi/fpm/php-fpm] Error 1
make: *** [sapi/cli/php] Error 1
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libs/libphp5.bundle] Error 1

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
https://github.com/homebrew/homebrew-php/issues

Warning: You are using OS X 10.11.
We do not provide support for this pre-release version.
You may encounter build failures or other breakage.

@bfontaine bfontaine referenced this issue in Homebrew/legacy-homebrew Jul 28, 2015

Closed

php failed to build on 10.11 #42197

@bfontaine

This comment has been minimized.

Show comment
Hide comment
@bfontaine

bfontaine Jul 28, 2015

Member

Please post the output of brew gist-logs php56.

Member

bfontaine commented Jul 28, 2015

Please post the output of brew gist-logs php56.

@yekz

This comment has been minimized.

Show comment
Hide comment

yekz commented Jul 28, 2015

https://gist.github.com/2b52b39f6eecce498fb0

i can't open it in china😹

@christopherdwhite

This comment has been minimized.

Show comment
Hide comment
@christopherdwhite

christopherdwhite Jul 29, 2015

I'm also having this same problem on 10.11.

I tried brew gist-logs php56 but it's returning:

Error: HTTP 403 Forbidden (expected 201)

Any idea what I'm missing? Apologies, I'm still new to the deep-end.

I'm also having this same problem on 10.11.

I tried brew gist-logs php56 but it's returning:

Error: HTTP 403 Forbidden (expected 201)

Any idea what I'm missing? Apologies, I'm still new to the deep-end.

@rpendleton

This comment has been minimized.

Show comment
Hide comment
@rpendleton

rpendleton Jul 29, 2015

@christopherdwhite When is the last time you ran brew update?

@christopherdwhite When is the last time you ran brew update?

@christopherdwhite

This comment has been minimized.

Show comment
Hide comment
@christopherdwhite

christopherdwhite Jul 29, 2015

I ran brew cleanup, brew update and brew upgrade right before trying to install PHP.

I ran brew cleanup, brew update and brew upgrade right before trying to install PHP.

@rpendleton

This comment has been minimized.

Show comment
Hide comment
@rpendleton

rpendleton Jul 29, 2015

Oh, sorry. I didn't look closely enough and thought 403 was an error downloading PHP. You're likely running into GitHub rate limiting. In order to avoid this, setup an API key.

Oh, sorry. I didn't look closely enough and thought 403 was an error downloading PHP. You're likely running into GitHub rate limiting. In order to avoid this, setup an API key.

@christopherdwhite

This comment has been minimized.

Show comment
Hide comment
@christopherdwhite

christopherdwhite Jul 29, 2015

That did it, thanks Ryan! Here are my logs.

That did it, thanks Ryan! Here are my logs.

@bfanger

This comment has been minimized.

Show comment
Hide comment
@bfanger

bfanger Jul 31, 2015

Contributor

If the compile/linker error is:

Undefined symbols for architecture x86_64:
  "_PKCS5_PBKDF2_HMAC", referenced from:

Try replacing -lssl and -lcrypto with /usr/local/opt/openssl/lib/libssl.dylib and /usr/local/opt/openssl/lib/libcrypto.dylib in the Makefile.

http://stackoverflow.com/questions/31024288/how-to-compile-php-with-openssl-on-os-x-10-9/31734677

Contributor

bfanger commented Jul 31, 2015

If the compile/linker error is:

Undefined symbols for architecture x86_64:
  "_PKCS5_PBKDF2_HMAC", referenced from:

Try replacing -lssl and -lcrypto with /usr/local/opt/openssl/lib/libssl.dylib and /usr/local/opt/openssl/lib/libcrypto.dylib in the Makefile.

http://stackoverflow.com/questions/31024288/how-to-compile-php-with-openssl-on-os-x-10-9/31734677

@memuller

This comment has been minimized.

Show comment
Hide comment
@memuller

memuller Jul 31, 2015

Same issue here - I'm currently on OSX 10.11 Beta 2, with Xcode 7.
I thought it had something to do with OpenSSL, but reinstalling it or trying --with-homebrew-libressl had no effect.
Here are my logs:
https://gist.github.com/26fcb6ecc1ee5287c9e1

Same issue here - I'm currently on OSX 10.11 Beta 2, with Xcode 7.
I thought it had something to do with OpenSSL, but reinstalling it or trying --with-homebrew-libressl had no effect.
Here are my logs:
https://gist.github.com/26fcb6ecc1ee5287c9e1

@christopherdwhite

This comment has been minimized.

Show comment
Hide comment
@christopherdwhite

christopherdwhite Jul 31, 2015

@bfanger Can you point me to where I need to make that change?

@bfanger Can you point me to where I need to make that change?

@ablyler ablyler added the 10.11 label Aug 1, 2015

@alsantos123

This comment has been minimized.

Show comment
Hide comment
@alsantos123

This comment has been minimized.

Show comment
Hide comment
@alsantos123

alsantos123 Aug 1, 2015

File /usr/local/Library/Taps/homebrew/homebrew-php/Abstract/abstract-php.rb line 362, replace:
s.change_make_var! "EXTRA_LIBS", "\\1 -lstdc++"
to
s.change_make_var! "EXTRA_LIBS", "\\1 -lstdc++ /usr/local/opt/openssl/lib/libssl.dylib /usr/local/opt/openssl/lib/libcrypto.dylib"

This don't remove -lssl and -lcrypto witch @christopherdwhite told, I see that the final Makefile was:

./Makefile:120:EXTRA_LIBS=-lcrypto -lssl -lcrypto -lz -lexslt -lresolv -ledit -lncurses -lldap -llber -liconv -liconv -lintl -lpng -lz -ljpeg -lcrypto -lssl -lcrypto -lcurl -lbz2 -lz -lcrypto -lssl -lcrypto -lm -lxml2 -lz -licucore -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lcurl -lxml2 -lz -licucore -lm -lfreetype -lodbc -lodbc -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lxslt -lstdc++ /usr/local/opt/openssl/lib/libssl.dylib /usr/local/opt/openssl/lib/libcrypto.dylib

but works for me.

File /usr/local/Library/Taps/homebrew/homebrew-php/Abstract/abstract-php.rb line 362, replace:
s.change_make_var! "EXTRA_LIBS", "\\1 -lstdc++"
to
s.change_make_var! "EXTRA_LIBS", "\\1 -lstdc++ /usr/local/opt/openssl/lib/libssl.dylib /usr/local/opt/openssl/lib/libcrypto.dylib"

This don't remove -lssl and -lcrypto witch @christopherdwhite told, I see that the final Makefile was:

./Makefile:120:EXTRA_LIBS=-lcrypto -lssl -lcrypto -lz -lexslt -lresolv -ledit -lncurses -lldap -llber -liconv -liconv -lintl -lpng -lz -ljpeg -lcrypto -lssl -lcrypto -lcurl -lbz2 -lz -lcrypto -lssl -lcrypto -lm -lxml2 -lz -licucore -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lcurl -lxml2 -lz -licucore -lm -lfreetype -lodbc -lodbc -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lxslt -lstdc++ /usr/local/opt/openssl/lib/libssl.dylib /usr/local/opt/openssl/lib/libcrypto.dylib

but works for me.

@christopherdwhite

This comment has been minimized.

Show comment
Hide comment
@christopherdwhite

christopherdwhite Aug 3, 2015

Hmm, didn't work for me. New logs.

Hmm, didn't work for me. New logs.

@memuller

This comment has been minimized.

Show comment
Hide comment
@memuller

memuller Aug 3, 2015

@alsantos123 's change worked for me; it install without issue now. Thanks!
Sorry to hear it didn't work for you, @christopherdwhite . I'll keep messing around.

memuller commented Aug 3, 2015

@alsantos123 's change worked for me; it install without issue now. Thanks!
Sorry to hear it didn't work for you, @christopherdwhite . I'll keep messing around.

@christopherdwhite

This comment has been minimized.

Show comment
Hide comment
@christopherdwhite

christopherdwhite Aug 3, 2015

You guys are just making the change to abstract-php.rb and then just running brew install php56 right? No intermediate steps?

You guys are just making the change to abstract-php.rb and then just running brew install php56 right? No intermediate steps?

@alsantos123

This comment has been minimized.

Show comment
Hide comment
@alsantos123

alsantos123 Aug 4, 2015

Yes @christopherdwhite.
Are you using Xcode beta? Version 7? My version it's beta 3.

Yes @christopherdwhite.
Are you using Xcode beta? Version 7? My version it's beta 3.

@christopherdwhite

This comment has been minimized.

Show comment
Hide comment
@christopherdwhite

christopherdwhite Aug 5, 2015

That did it, thanks @alsantos123! I was running either beta 1 or beta 2, when I updated to beta 4 PHP built with no problems.

That did it, thanks @alsantos123! I was running either beta 1 or beta 2, when I updated to beta 4 PHP built with no problems.

@jonnybarnes

This comment has been minimized.

Show comment
Hide comment
@jonnybarnes

jonnybarnes Aug 9, 2015

Contributor

I have this error on OS X 10.11 Public Beta but was running XCode 7 beta 4. Just downloading beta 5 now and will report later if it works.

Contributor

jonnybarnes commented Aug 9, 2015

I have this error on OS X 10.11 Public Beta but was running XCode 7 beta 4. Just downloading beta 5 now and will report later if it works.

@jonnybarnes

This comment has been minimized.

Show comment
Hide comment
@jonnybarnes

jonnybarnes Aug 9, 2015

Contributor

Updating to XCode 7 beta 5 and making the relevant edit to abtract-php.rb worked for me.

Contributor

jonnybarnes commented Aug 9, 2015

Updating to XCode 7 beta 5 and making the relevant edit to abtract-php.rb worked for me.

@Hast

This comment has been minimized.

Show comment
Hide comment
@Hast

Hast Aug 12, 2015

@jonnybarnes which changes to abstract-php.rb have you done?

Hast commented Aug 12, 2015

@jonnybarnes which changes to abstract-php.rb have you done?

@nesl247

This comment has been minimized.

Show comment
Hide comment
@nesl247

nesl247 Aug 12, 2015

The changes by @alsantos123 fixed it for me.

nesl247 commented Aug 12, 2015

The changes by @alsantos123 fixed it for me.

@Hast

This comment has been minimized.

Show comment
Hide comment
@Hast

Hast Aug 12, 2015

Doesn't work for me.
I have downloaded and run XCode 7 Beta 5. But maybe there are more actions I must perform in order to install command line tools from the beta xcode instead of old ones?

Hast commented Aug 12, 2015

Doesn't work for me.
I have downloaded and run XCode 7 Beta 5. But maybe there are more actions I must perform in order to install command line tools from the beta xcode instead of old ones?

@Hast

This comment has been minimized.

Show comment
Hide comment
@Hast

Hast Aug 12, 2015

brew link libxml2 --force worked for me instead.
See: #1931

Hast commented Aug 12, 2015

brew link libxml2 --force worked for me instead.
See: #1931

@einfallstoll

This comment has been minimized.

Show comment
Hide comment
@einfallstoll

einfallstoll Aug 17, 2015

Install it, if you haven't done so

brew install libxml2
brew link libxml2 –force

Install it, if you haven't done so

brew install libxml2
brew link libxml2 –force
@Gamec

This comment has been minimized.

Show comment
Hide comment
@Gamec

Gamec Aug 31, 2015

@einfallstoll It helped, thanks for that!

Gamec commented Aug 31, 2015

@einfallstoll It helped, thanks for that!

jenslind pushed a commit to oddhill/puppet-php that referenced this issue Sep 5, 2015

jenslind pushed a commit to oddhill/puppet-php that referenced this issue Sep 5, 2015

@seeruk

This comment has been minimized.

Show comment
Hide comment
@seeruk

seeruk Sep 10, 2015

Currently having a newer issue popping up preventing me from upgrading on 10.11 GM: https://gist.github.com/anonymous/f9232112297a754718bc

seeruk commented Sep 10, 2015

Currently having a newer issue popping up preventing me from upgrading on 10.11 GM: https://gist.github.com/anonymous/f9232112297a754718bc

@jeffgeorge

This comment has been minimized.

Show comment
Hide comment
@jeffgeorge

jeffgeorge Sep 10, 2015

@seeruk That appears to be the issue presently tracked in #2033. It's unable to find libz even if it's already explicitly installed and linked via brew.

@seeruk That appears to be the issue presently tracked in #2033. It's unable to find libz even if it's already explicitly installed and linked via brew.

ablyler added a commit that referenced this issue Sep 11, 2015

@ablyler ablyler closed this Sep 11, 2015

@jenslind jenslind referenced this issue in boxen/puppet-php Oct 5, 2015

Open

Fails to configure on 10.11 #78

gblair added a commit to castiron/puppet-php that referenced this issue Oct 30, 2015

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.