php54 failed to build on 10.7.5 #335

Closed
codazdata opened this Issue Oct 23, 2012 · 19 comments

Comments

Projects
None yet
9 participants
brew install php54
==> Downloading http://www.php.net/get/php-5.4.7.tar.bz2/from/this/mirror
Already downloaded: /Library/Caches/Homebrew/php54-5.4.7
==> ./configure --prefix=/usr/local/Cellar/php54/5.4.7 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.4 --with-config-file-path=/usr/local/etc/php/5.4 --with-confi
If configure fails try --with-vpx-dir=<DIR>
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=<DIR>
checking for FT_New_Face in -lfreetype... yes
configure: error: GD build test failed. Please check the config.log for details.
Error: uncaught throw `Failed executing: ./configure --prefix=/usr/local/Cellar/php54/5.4.7 --disable-debug --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.4 --with-config-file-path=/usr/local/etc/php/5.4 --with-config-file-scan-dir=/usr/local/etc/php/5.4/conf.d --with-iconv-dir=/usr --enable-dba --with-ndbm=/usr --enable-exif --enable-soap --enable-wddx --enable-ftp --enable-sockets --enable-zip --enable-pcntl --enable-shmop --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-mbstring --enable-mbregex --enable-zend-signals --enable-dtrace --enable-bcmath --enable-calendar --with-zlib=/usr/local/Cellar/zlib/1.2.7 --with-ldap --with-ldap-sasl=/usr --with-xmlrpc --with-kerberos=/usr --with-xsl=/usr --with-curl=/usr/local/Cellar/curl/7.28.0 --with-gd --enable-gd-native-ttf --with-freetype-dir=/usr/local/Cellar/freetype/2.4.10 --with-mcrypt=/usr/local/Cellar/mcrypt/2.5.8 --with-jpeg-dir=/usr/local/Cellar/jpeg/8d --with-png-dir=/usr/local/Cellar/libpng/1.5.13 --with-gettext=/usr/local/Cellar/getPlease report this bug:    https://github.com/mxcl/homebrew/wiki/troubleshooting/usr/local/Library/Formula/php54.rb:115:in `throw'/usr/local/Library/Formula/php54.rb:115:in `install'
/usr/local/Library/Homebrew/build.rb:133:in `install'
/usr/local/Library/Homebrew/formula.rb:225:in `brew'/usr/local/Library/Homebrew/formula.rb:595:in `stage'
/usr/local/Library/Homebrew/extend/fileutils.rb:21:in `mktemp'
/usr/local/Library/Homebrew/formula.rb:591:in `stage'
/usr/local/Library/Homebrew/formula.rb:220:in `brew'
/usr/local/Library/Homebrew/build.rb:114:in `install'
/usr/local/Library/Homebrew/build.rb:42:in `main'
/usr/local/Library/Homebrew/build.rb:12
/usr/local/Library/Formula/php54.rb:351

01.configure log + brew doctor

https://gist.github.com/3939934

Contributor

bastnic commented Oct 24, 2012

Try removing some associate formulas and then compile them again

brew rm freetype jpeg libpng gd
brew install freetype jpeg libpng gd

Thank you! It fixed that issue but i am getting a new error

03.make log

https://gist.github.com/3949075

Contributor

bastnic commented Oct 25, 2012

I can't help you with that, i'm using it in fpm mode.

Contributor

bastnic commented Oct 25, 2012

I've got some problem also with 5.4.7 before. I updated to 5.4.8 and it passes like a charm for me (see josegonzalez#340)

Unfortunately, I updated the formula to get php 5.4.8 but i still have the same error.
Tried to remove all the deps and build them again but no change!
Thanks anyway!

Contributor

bastnic commented Oct 26, 2012

Sorry, no idea. Maybe, try to ditch PHP as a module and use it in FPM mode, with --with-fpm

Member

josegonzalez commented Nov 14, 2012

@robello Can you try rebuilding once more, and if it fails, include all the items I ask for in the readme? Also, ensure you've gone through my checklist as well - also included in the readme.

The instructions worked to restore my brew environment so that install php54 would work. Do you think these problems are related to upgrading a legacy brew installation into the new brew tap based system?

Member

josegonzalez commented Nov 16, 2012

@shanewholloway what instructions? In my readme?

The instructions in this issue — #335 — although I had to list them on separate lines since I didn't have all of them installed.

  > brew rm freetype
  > brew rm jpeg
  > brew rm libpng
  > brew rm gd
Member

josegonzalez commented Nov 16, 2012

Weird. Well, @robello has a different issue, so this is staying open for now.

Member

ablyler commented Aug 7, 2013

@robello: is this still an issue for you?

Sorry I can't tell you, I had to use OS x for a project and at that time i was still having this issue (opted to setup a vagrant box to finish the project) otherwise i am linux user.

Member

ablyler commented Aug 8, 2013

No worries, lets close this for now and re-open it if someone is able to reproduce it. Thanks for the bug report regardless. :-)

@ablyler ablyler closed this Aug 8, 2013

I'm having this issue, though I am trying to build php52.

configure: error: GD build test failed. Please check the config.log for details.
==> Formula
Tap: homebrew/php
Path: /usr/local/Library/Taps/homebrew-php/Formula/php52.rb
==> Configuration
HOMEBREW_VERSION: 0.9.5
HEAD: 358f9ca3d14dd854404c407a4e925f843d2e3c08
CPU: quad-core 64-bit sandybridge
OS X: 10.9.2-x86_64
Xcode: 5.1.1
CLT: 5.1.0.0.1.1396320587
X11: N/A
==> ENV
HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
MAKEFLAGS: -j4
CMAKE_PREFIX_PATH: /usr/local/opt/gettext:/usr/local/opt/zlib:/usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_PATH: /usr/local/opt/libpng/lib/pkgconfig:/usr/local/opt/freetype/lib/pkgconfig:/usr/local/opt/zlib/lib/pkgconfig
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.9
ACLOCAL_PATH: /usr/local/opt/gettext/share/aclocal:/usr/local/share/aclocal
PATH: /usr/local/Library/ENV/4.3:/usr/local/opt/libpng/bin:/usr/local/opt/freetype/bin:/usr/local/opt/gettext/bin:/usr/local/opt/jpeg/bin:/usr/local/opt/unixodbc/bin:/usr/bin:/bin:/usr/sbin:/sbin

Error: php52 5.2.17 did not build
Contributor

lucasmichot commented Apr 30, 2014

@SamJBarney php52 is not supported anymore.

travist commented Jul 23, 2014

This worked the best for me.

brew deps php55 | xargs brew rm

If it tells you that any library isn't installed, then install them with

brew install LIBRARYNAME

Then run the first command again until it shows that it removed everything. Once it does, then install php again...

brew install php55

The solution provided by travist was really helpful. Tx a lot

@lucasmichot lucasmichot locked and limited conversation to collaborators Apr 17, 2017

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