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

error freetype.h not found installing php53 #885

Closed
colinstuart opened this Issue Nov 28, 2013 · 58 comments

Comments

Projects
None yet
@colinstuart

colinstuart commented Nov 28, 2013

config info in: https://gist.github.com/colinstuart/7687091

I'm having an install failure for php53:

OS: OSX 10.8.5
Steps:
Installed Homebrew
Installed tapped successfully:
brew install git
brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php

Attempted php53 install:
brew install php53 --with-mysql

Installs dependencies without error: libpng, freetype, gettext, jpeg, unixodbc, homebrew/dupes/zlib

and fails on php53:

==> Installing php53
==> Downloading http://www.php.net/get/php-5.3.27.tar.bz2/from/this/mirror

################################################################## 100.0%

Warning: Backing up all known pear.conf and .pearrc files
Warning: If you have a pre-existing pear install outside
of homebrew-php, or you are using a non-standard
pear.conf location, installation may fail.
==> ./configure --prefix=/usr/local/Cellar/php53/5.3.27 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.3 --with-config-file-path=/usr/local/etc/php/5.3 --with-config-file-scan-dir=/usr/local/etc/php/5.3/conf.d --with-iconv-dir=/usr --enable-dba --with-ndbm=/usr --enable-exif --enable-soap --enable-wddx --enable-ftp --enable-sockets --enable-z
checking for floorf... yes
checking for jpeg_read_header in -ljpeg... yes
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=


configure: error: freetype.h not found.

@danpoltawski

This comment has been minimized.

Show comment
Hide comment
@danpoltawski

danpoltawski Nov 28, 2013

I'm experiencing the same.

danpoltawski commented Nov 28, 2013

I'm experiencing the same.

@danpoltawski

This comment has been minimized.

Show comment
Hide comment
@danpoltawski

danpoltawski Nov 28, 2013

Seems to be caused by 129ebdc in homebrew (free type 2.5.1). I reverted that and could build again.

danpoltawski commented Nov 28, 2013

Seems to be caused by 129ebdc in homebrew (free type 2.5.1). I reverted that and could build again.

@MacDino

This comment has been minimized.

Show comment
Hide comment
@MacDino

MacDino Nov 28, 2013

I'm experiencing the same. but i install php55, mac os 10.9. how to fix it?

MacDino commented Nov 28, 2013

I'm experiencing the same. but i install php55, mac os 10.9. how to fix it?

@cadina

This comment has been minimized.

Show comment
Hide comment
@cadina

cadina Nov 28, 2013

how to revert that? @danpoltawski

cadina commented Nov 28, 2013

how to revert that? @danpoltawski

@danpoltawski

This comment has been minimized.

Show comment
Hide comment
@danpoltawski

danpoltawski Nov 28, 2013

I reverted the change, but now I get different built errors with ldap :(

danpoltawski commented Nov 28, 2013

I reverted the change, but now I get different built errors with ldap :(

@cadina

This comment has been minimized.

Show comment
Hide comment
@cadina

cadina Nov 28, 2013

Fixed this way:

$ brew uninstall freetype
$ git checkout -b /usr/local/Library/Formula/freetype.rb 6314fdbab7c9d3b6b84b4a9472e16c8f5255742a
$ git install freetype
$ git reinstall php55

cadina commented Nov 28, 2013

Fixed this way:

$ brew uninstall freetype
$ git checkout -b /usr/local/Library/Formula/freetype.rb 6314fdbab7c9d3b6b84b4a9472e16c8f5255742a
$ git install freetype
$ git reinstall php55
@MacDino

This comment has been minimized.

Show comment
Hide comment
@MacDino

MacDino Nov 28, 2013

fatal: '/usr/local/Library/Formula/freetype.rb' is not a valid branch name.

MacDino commented Nov 28, 2013

fatal: '/usr/local/Library/Formula/freetype.rb' is not a valid branch name.

@cadina

This comment has been minimized.

Show comment
Hide comment
@cadina

cadina Nov 28, 2013

try:

cd /usr/local/Library/Formula
git checkout 6314fdbab7c9d3b6b84b4a9472e16c8f5255742a freetype.rb

@MacDino

cadina commented Nov 28, 2013

try:

cd /usr/local/Library/Formula
git checkout 6314fdbab7c9d3b6b84b4a9472e16c8f5255742a freetype.rb

@MacDino

@MacDino

This comment has been minimized.

Show comment
Hide comment
@MacDino

MacDino Nov 28, 2013

@cadina well done.thank you very much.
but fixed this way

$ brew uninstall freetype
$ cd /usr/local/Library/Formula
$ git checkout 6314fdbab7c9d3b6b84b4a9472e16c8f5255742a freetype.rb
$ brew install freetype
$ brew install php55

MacDino commented Nov 28, 2013

@cadina well done.thank you very much.
but fixed this way

$ brew uninstall freetype
$ cd /usr/local/Library/Formula
$ git checkout 6314fdbab7c9d3b6b84b4a9472e16c8f5255742a freetype.rb
$ brew install freetype
$ brew install php55

@colinstuart

This comment has been minimized.

Show comment
Hide comment
@colinstuart

colinstuart Nov 28, 2013

I'm trying to install php53. Sadly, this solution swaps the error for another:
Warning: inreplace in 'Makefile' failed
Expected replacement of 'EXEEXT = .dSYM' with 'EXEEXT = '

==> Installing php53
==> Downloading http://www.php.net/get/php-5.3.27.tar.bz2/from/this/mirror
Already downloaded: /Library/Caches/Homebrew/php53-5.3.27
Warning: Backing up all known pear.conf and .pearrc files
Warning: If you have a pre-existing pear install outside
of homebrew-php, or you are using a non-standard
pear.conf location, installation may fail.
==> ./configure --prefix=/usr/local/Cellar/php53/5.3.27 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.3 --with-config-file-path=/usr/local/etc/php/5.3 --with-config-file-scan-dir=/usr/local/etc/php/5.3/conf.d --with-ico
Warning: inreplace in 'Makefile' failed
Expected replacement of 'EXEEXT = .dSYM' with 'EXEEXT = '

colinstuart commented Nov 28, 2013

I'm trying to install php53. Sadly, this solution swaps the error for another:
Warning: inreplace in 'Makefile' failed
Expected replacement of 'EXEEXT = .dSYM' with 'EXEEXT = '

==> Installing php53
==> Downloading http://www.php.net/get/php-5.3.27.tar.bz2/from/this/mirror
Already downloaded: /Library/Caches/Homebrew/php53-5.3.27
Warning: Backing up all known pear.conf and .pearrc files
Warning: If you have a pre-existing pear install outside
of homebrew-php, or you are using a non-standard
pear.conf location, installation may fail.
==> ./configure --prefix=/usr/local/Cellar/php53/5.3.27 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.3 --with-config-file-path=/usr/local/etc/php/5.3 --with-config-file-scan-dir=/usr/local/etc/php/5.3/conf.d --with-ico
Warning: inreplace in 'Makefile' failed
Expected replacement of 'EXEEXT = .dSYM' with 'EXEEXT = '

@lucasmichot

This comment has been minimized.

Show comment
Hide comment
@lucasmichot

lucasmichot Nov 28, 2013

Contributor

@cadina good analysis, latest version of freetype formula is responsible for that.This issue needs to be reported upstream. Anyone ?

I would suggest not to checkout branch in your repo.

cd /usr/local
git checkout master
brew update && brew upgrade
brew rm freetype
brew install https://raw.github.com/mxcl/homebrew/6314fdbab7c9d3b6b84b4a9472e16c8f5255742a/Library/Formula/freetype.rb
brew pin freetype
brew install php53
Contributor

lucasmichot commented Nov 28, 2013

@cadina good analysis, latest version of freetype formula is responsible for that.This issue needs to be reported upstream. Anyone ?

I would suggest not to checkout branch in your repo.

cd /usr/local
git checkout master
brew update && brew upgrade
brew rm freetype
brew install https://raw.github.com/mxcl/homebrew/6314fdbab7c9d3b6b84b4a9472e16c8f5255742a/Library/Formula/freetype.rb
brew pin freetype
brew install php53
@steinmb

This comment has been minimized.

Show comment
Hide comment
@steinmb

steinmb Nov 28, 2013

Also see this. @MacDino tip seems work as a workaround.

steinmb commented Nov 28, 2013

Also see this. @MacDino tip seems work as a workaround.

@keithcrooks

This comment has been minimized.

Show comment
Hide comment
@keithcrooks

keithcrooks Nov 28, 2013

This is also happening when try to install php54 and php55. I tried doing as @semalead suggested above but it still kept trying to install freetype 2.5.1 even though I had pinned 2.5.0.1. This obviously meant I kept getting the same error.

I managed to get around this by manually deleting the freetype symlink to 2.5.1 and replacing it with a symlink to 2.5.0.1.

It seems to have successfully installed php55 now using these methods.

Thanks

keithcrooks commented Nov 28, 2013

This is also happening when try to install php54 and php55. I tried doing as @semalead suggested above but it still kept trying to install freetype 2.5.1 even though I had pinned 2.5.0.1. This obviously meant I kept getting the same error.

I managed to get around this by manually deleting the freetype symlink to 2.5.1 and replacing it with a symlink to 2.5.0.1.

It seems to have successfully installed php55 now using these methods.

Thanks

@elseym

This comment has been minimized.

Show comment
Hide comment
@elseym

elseym Nov 28, 2013

this worked for me:

brew rm freetype
brew install https://raw.github.com/mxcl/homebrew/6314fdbab7c9d3b6b84b4a9472e16c8f5255742a/Library/Formula/freetype.rb
brew unlink freetype
brew install freetype # (to satisfy php dependencies)
brew switch freetype 2.5.0.1
brew install php55 # (or php54 or ...)

elseym commented Nov 28, 2013

this worked for me:

brew rm freetype
brew install https://raw.github.com/mxcl/homebrew/6314fdbab7c9d3b6b84b4a9472e16c8f5255742a/Library/Formula/freetype.rb
brew unlink freetype
brew install freetype # (to satisfy php dependencies)
brew switch freetype 2.5.0.1
brew install php55 # (or php54 or ...)
@ruudk

This comment has been minimized.

Show comment
Hide comment
@ruudk

ruudk Nov 28, 2013

Contributor

Awesome this worked for me. Spend an whole hour trying everything just to figure out it was the updated freetype dep :(

Contributor

ruudk commented Nov 28, 2013

Awesome this worked for me. Spend an whole hour trying everything just to figure out it was the updated freetype dep :(

@OzzyCzech

This comment has been minimized.

Show comment
Hide comment
@OzzyCzech

OzzyCzech Nov 28, 2013

Thanks a lot @elseym! It's finally (after 3 hours of experiments) working

OzzyCzech commented Nov 28, 2013

Thanks a lot @elseym! It's finally (after 3 hours of experiments) working

This was referenced Nov 29, 2013

@breeswish

This comment has been minimized.

Show comment
Hide comment
@breeswish

breeswish Nov 29, 2013

Thanks @elseym :) Works for me

breeswish commented Nov 29, 2013

Thanks @elseym :) Works for me

@elseym

This comment has been minimized.

Show comment
Hide comment
@elseym

elseym Nov 29, 2013

glad i could help. but actually i think this might be a bug in brew's dependency management, since, instead of the expected, more recent version, the old one is linked and used, albeit specifically required otherwise by the depending package...
so it should not suffice just to have the newer version installed but to also have it linked, or should it?

elseym commented Nov 29, 2013

glad i could help. but actually i think this might be a bug in brew's dependency management, since, instead of the expected, more recent version, the old one is linked and used, albeit specifically required otherwise by the depending package...
so it should not suffice just to have the newer version installed but to also have it linked, or should it?

@lucasmichot

This comment has been minimized.

Show comment
Hide comment
@lucasmichot

lucasmichot Nov 29, 2013

Contributor

Fixed by #890.

brew update && brew upgrade
brew unpin freetype && brew unlink freetype && brew rm freetype
brew install php53 # (or php54/php55)
Contributor

lucasmichot commented Nov 29, 2013

Fixed by #890.

brew update && brew upgrade
brew unpin freetype && brew unlink freetype && brew rm freetype
brew install php53 # (or php54/php55)
@elseym

This comment has been minimized.

Show comment
Hide comment
@elseym

elseym Nov 29, 2013

thanks! :)

elseym commented Nov 29, 2013

thanks! :)

@pelachile

This comment has been minimized.

Show comment
Hide comment
@pelachile

pelachile Nov 30, 2013

Tried everything suggested here, but still get the freetype error.

https://gist.github.com/pelachile/7723010

Just did a fresh install of Lion last night.

I don't have the native PHP working, nor do I use the native Apache. I use VMs.

pelachile commented Nov 30, 2013

Tried everything suggested here, but still get the freetype error.

https://gist.github.com/pelachile/7723010

Just did a fresh install of Lion last night.

I don't have the native PHP working, nor do I use the native Apache. I use VMs.

@lucasmichot

This comment has been minimized.

Show comment
Hide comment
@lucasmichot

lucasmichot Nov 30, 2013

Contributor

@pelachile you should not have any issue with php5x formulae, as they've been updated in PR #890 and freetype formula has not changed since Homebrew/legacy-homebrew@129ebdc.
If you've tried one of the solution above, make sure you've switched back to your master branch.

Try the following :

cd /usr/local
git checkout master
brew unpin freetype
brew unlink freetype
brew rm freetype
brew update
brew upgrade
brew reinstall php53 # (or php54 / php55)

Can you output a more detailed gist of your error : brew install -v php53 as required at https://github.com/josegonzalez/homebrew-php#filing-bug-reports

Contributor

lucasmichot commented Nov 30, 2013

@pelachile you should not have any issue with php5x formulae, as they've been updated in PR #890 and freetype formula has not changed since Homebrew/legacy-homebrew@129ebdc.
If you've tried one of the solution above, make sure you've switched back to your master branch.

Try the following :

cd /usr/local
git checkout master
brew unpin freetype
brew unlink freetype
brew rm freetype
brew update
brew upgrade
brew reinstall php53 # (or php54 / php55)

Can you output a more detailed gist of your error : brew install -v php53 as required at https://github.com/josegonzalez/homebrew-php#filing-bug-reports

@hug963

This comment has been minimized.

Show comment
Hide comment
@hug963

hug963 Dec 1, 2013

Hi,

I had the same problem installing php54.

I'm still using OSX 10.6, and I think the confusion comes from the fact that the freetype package is keg only for my version as it is installed with X11. Therefore freetype.h cannot be found in /usr/ and /usr/include. It must be fetched from /usr/X11/

the followng command solved the issue for me in 10.6 with X11 installed

$ sudo ln -s /usr/X11/include/freetype2/ /usr/include/freetype2

hug963 commented Dec 1, 2013

Hi,

I had the same problem installing php54.

I'm still using OSX 10.6, and I think the confusion comes from the fact that the freetype package is keg only for my version as it is installed with X11. Therefore freetype.h cannot be found in /usr/ and /usr/include. It must be fetched from /usr/X11/

the followng command solved the issue for me in 10.6 with X11 installed

$ sudo ln -s /usr/X11/include/freetype2/ /usr/include/freetype2
@nomasprime

This comment has been minimized.

Show comment
Hide comment
@nomasprime

nomasprime Dec 2, 2013

@lucasmichot I have your patch, thanks. But I'm still getting error.

https://gist.github.com/habitullence/7750597

nomasprime commented Dec 2, 2013

@lucasmichot I have your patch, thanks. But I'm still getting error.

https://gist.github.com/habitullence/7750597

@miogalang

This comment has been minimized.

Show comment
Hide comment
@miogalang

miogalang Dec 3, 2013

@lucasmichot Same as @habitullence still getting the error

https://gist.github.com/miogalang/7765272

miogalang commented Dec 3, 2013

@lucasmichot Same as @habitullence still getting the error

https://gist.github.com/miogalang/7765272

@lucasmichot

This comment has been minimized.

Show comment
Hide comment
@lucasmichot

lucasmichot Dec 3, 2013

Contributor

@miogalang
can you make separate gists with the output of:

  • brew doctor
  • brew info freetype
Contributor

lucasmichot commented Dec 3, 2013

@miogalang
can you make separate gists with the output of:

  • brew doctor
  • brew info freetype
@nomasprime

This comment has been minimized.

Show comment
Hide comment
@nomasprime

nomasprime Dec 3, 2013

Thanks @lucasmichot. I'll open issue and send you link @miogalang :)

nomasprime commented Dec 3, 2013

Thanks @lucasmichot. I'll open issue and send you link @miogalang :)

@nomasprime

This comment has been minimized.

Show comment
Hide comment
@nomasprime

nomasprime commented Dec 3, 2013

@miogalang already had one open mattheath/puppet-php#46

@miogalang

This comment has been minimized.

Show comment
Hide comment
@miogalang

miogalang Dec 3, 2013

@habitullence Thanks. Cheers! and thanks for your help @lucasmichot

miogalang commented Dec 3, 2013

@habitullence Thanks. Cheers! and thanks for your help @lucasmichot

@lucasmichot lucasmichot closed this Dec 3, 2013

@halles

This comment has been minimized.

Show comment
Hide comment
@halles

halles Dec 5, 2013

I'm still getting this issue on OSX 10.7.4.

Removed brew completely and reinstalled in regular way.

When installing, dependencias installed normally, freetype installed version was 2.5.1.

This is the output i get when trying brew install php55 --with-fpm

bash-3.2$ brew install php55 --with-fpm
==> Downloading http://www.php.net/get/php-5.5.6.tar.bz2/from/this/mirror
Already downloaded: /Library/Caches/Homebrew/php55-5.5.6
==> Patching
patching file configure
Hunk #1 succeeded at 39041 (offset 764 lines).
Warning: Backing up all known pear.conf and .pearrc files
Warning: If you have a pre-existing pear install outside
of homebrew-php, or you are using a non-standard
pear.conf location, installation may fail.
==> ./configure --prefix=/usr/local/Cellar/php55/5.5.6 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.5 --with-config-file-path=/usr/local/etc/php/5.5 --with-confi
If configure fails try --with-vpx-dir=


checking for jpeg_read_header in -ljpeg... yes
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=
configure: error: freetype.h not found.

READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting
If reporting this issue please do so at (not mxcl/homebrew):
https://github.com/josegonzalez/homebrew-php/issues

halles commented Dec 5, 2013

I'm still getting this issue on OSX 10.7.4.

Removed brew completely and reinstalled in regular way.

When installing, dependencias installed normally, freetype installed version was 2.5.1.

This is the output i get when trying brew install php55 --with-fpm

bash-3.2$ brew install php55 --with-fpm
==> Downloading http://www.php.net/get/php-5.5.6.tar.bz2/from/this/mirror
Already downloaded: /Library/Caches/Homebrew/php55-5.5.6
==> Patching
patching file configure
Hunk #1 succeeded at 39041 (offset 764 lines).
Warning: Backing up all known pear.conf and .pearrc files
Warning: If you have a pre-existing pear install outside
of homebrew-php, or you are using a non-standard
pear.conf location, installation may fail.
==> ./configure --prefix=/usr/local/Cellar/php55/5.5.6 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.5 --with-config-file-path=/usr/local/etc/php/5.5 --with-confi
If configure fails try --with-vpx-dir=


checking for jpeg_read_header in -ljpeg... yes
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=
configure: error: freetype.h not found.

READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting
If reporting this issue please do so at (not mxcl/homebrew):
https://github.com/josegonzalez/homebrew-php/issues

@miogalang

This comment has been minimized.

Show comment
Hide comment
@miogalang

miogalang Dec 5, 2013

@halles What I did was compile without gd and that seemed to solve it.

There seems to be a problem with it and the new freetype. https://bugs.php.net/bug.php?id=66198

miogalang commented Dec 5, 2013

@halles What I did was compile without gd and that seemed to solve it.

There seems to be a problem with it and the new freetype. https://bugs.php.net/bug.php?id=66198

@halles

This comment has been minimized.

Show comment
Hide comment
@halles

halles Dec 6, 2013

@miogalang how did you exclude gd? I tried using --without-gd but it's unavailable.

halles commented Dec 6, 2013

@miogalang how did you exclude gd? I tried using --without-gd but it's unavailable.

@miogalang

This comment has been minimized.

Show comment
Hide comment
@miogalang

miogalang Dec 7, 2013

@halles I had to comment out line 179 in /Library/Formula/abstract-php.rb. (--with-gd)
before I compiled.

You can also try using an older version of freetype. That didn't work for me though but has worked for some. look the comment above at #885 (comment) as to how to do that.

miogalang commented Dec 7, 2013

@halles I had to comment out line 179 in /Library/Formula/abstract-php.rb. (--with-gd)
before I compiled.

You can also try using an older version of freetype. That didn't work for me though but has worked for some. look the comment above at #885 (comment) as to how to do that.

@pellacis

This comment has been minimized.

Show comment
Hide comment
@pellacis

pellacis Dec 7, 2013

@halles & @miogalang Have you tried linking freetype (brew link freetype) before brewing php?

pellacis commented Dec 7, 2013

@halles & @miogalang Have you tried linking freetype (brew link freetype) before brewing php?

@miogalang

This comment has been minimized.

Show comment
Hide comment
@miogalang

miogalang Dec 8, 2013

@pellacis yup. I have. I have tried versions 2.5.1 2.5.0.1 and 2.4.11 of
freetype.
On Dec 8, 2013 2:14 AM, "pellacis" notifications@github.com wrote:

@halles https://github.com/halles & @miogalanghttps://github.com/miogalangHave you tried linking freetype (brew link freetype) before brewing php?


Reply to this email directly or view it on GitHubhttps://github.com//issues/885#issuecomment-30061041
.

miogalang commented Dec 8, 2013

@pellacis yup. I have. I have tried versions 2.5.1 2.5.0.1 and 2.4.11 of
freetype.
On Dec 8, 2013 2:14 AM, "pellacis" notifications@github.com wrote:

@halles https://github.com/halles & @miogalanghttps://github.com/miogalangHave you tried linking freetype (brew link freetype) before brewing php?


Reply to this email directly or view it on GitHubhttps://github.com//issues/885#issuecomment-30061041
.

@nomasprime

This comment has been minimized.

Show comment
Hide comment
@nomasprime

nomasprime Dec 8, 2013

@halles @miogalang Should work with freetype 2.4. Have you tried removing, installing, and checking the version before installing php?

nomasprime commented Dec 8, 2013

@halles @miogalang Should work with freetype 2.4. Have you tried removing, installing, and checking the version before installing php?

@vazgen

This comment has been minimized.

Show comment
Hide comment
@vazgen

vazgen Dec 8, 2013

The same problem, spend few hours and was not able to fix

vazgen commented Dec 8, 2013

The same problem, spend few hours and was not able to fix

@lucasmichot

This comment has been minimized.

Show comment
Hide comment
@lucasmichot

lucasmichot Dec 8, 2013

Contributor

OK everyone, seems some of you are still experiencing difficulties with freetype.

So let's start from the beginning: after freetype upgrade (Homebrew/legacy-homebrew@129ebdc) freetype.h file is not in the same folder anymore (moved from include/freetype2/freetype/freetype.h to include/freetype2/freetype.h).

Problem:
PHP configure file (any version 3/4/5) expects freetype.h to be located at include/freetype2/freetype/freetype.h.

Solution :
I've been patching all php formulae (#890) so that configure file will search for freetype.h in include/freetype2/freetype.h.
This patch only work with latest freetype and php5x formulae.

I've just (re-re-re-re-)tested locally, I can build all formulae.

Still experiencing issue ?
Using Boxen (http://boxen.github.com) ? Please report bug upstream. We do not support Boxen distro.

First of all, don't change your current branch ! TO ensure you are on master:

cd /usr/local/Library/Taps/josegonzalez-php
git checkout master
cd ~

If you've been using one of the previous solution in the comments above, reverse results. Remove symlinks, etc...

Completely freetype formula, old version, pinned version, etc...

brew unlink freetype
brew unpin freetype
brew rm freetype

Update and install you php formula (53/54/55) :

brew update
brew install php5x

freetype formula will automatically be downloaded and installed, you d'ont have to do anything (linking, or pinning)
Then php5x will be installed with needed patch.

If you are still experiencing any issue, depending on the php version you want to install, open separate issue per version (when I say separate, I don't mean duplicate).

Important note
We cannot give support if no detailed info is provided as asked in https://github.com/josegonzalez/homebrew-php#filing-bug-reports, such issues will not be taken in consideration.

Contributor

lucasmichot commented Dec 8, 2013

OK everyone, seems some of you are still experiencing difficulties with freetype.

So let's start from the beginning: after freetype upgrade (Homebrew/legacy-homebrew@129ebdc) freetype.h file is not in the same folder anymore (moved from include/freetype2/freetype/freetype.h to include/freetype2/freetype.h).

Problem:
PHP configure file (any version 3/4/5) expects freetype.h to be located at include/freetype2/freetype/freetype.h.

Solution :
I've been patching all php formulae (#890) so that configure file will search for freetype.h in include/freetype2/freetype.h.
This patch only work with latest freetype and php5x formulae.

I've just (re-re-re-re-)tested locally, I can build all formulae.

Still experiencing issue ?
Using Boxen (http://boxen.github.com) ? Please report bug upstream. We do not support Boxen distro.

First of all, don't change your current branch ! TO ensure you are on master:

cd /usr/local/Library/Taps/josegonzalez-php
git checkout master
cd ~

If you've been using one of the previous solution in the comments above, reverse results. Remove symlinks, etc...

Completely freetype formula, old version, pinned version, etc...

brew unlink freetype
brew unpin freetype
brew rm freetype

Update and install you php formula (53/54/55) :

brew update
brew install php5x

freetype formula will automatically be downloaded and installed, you d'ont have to do anything (linking, or pinning)
Then php5x will be installed with needed patch.

If you are still experiencing any issue, depending on the php version you want to install, open separate issue per version (when I say separate, I don't mean duplicate).

Important note
We cannot give support if no detailed info is provided as asked in https://github.com/josegonzalez/homebrew-php#filing-bug-reports, such issues will not be taken in consideration.

@miogalang

This comment has been minimized.

Show comment
Hide comment
@miogalang

miogalang Dec 9, 2013

@lucasmichot
see https://bugs.php.net/bug.php?id=66198

It seems to me that the GD is not compiling and has not been updated with the solution you showed above.

My guess as to what is happening. Please correct me if anything is wrong.

  1. using freetype 2.5.1
    PHP is looking for the freetype config file in include/freetype2/freetype.h and FINDS IT.
    but gd is looking for it in include/freetype2/freetype/freetype.h and FAILS.
  2. using freetype 2.4.11.
    PHP is looking for config file in include/freetype2/freetype.h and FAILS
    but gd is looking for it in include/freetype2/freetype/freetype.h and FINDS IT.

I tried compiling without the --with-gd option and it compiled fine.

miogalang commented Dec 9, 2013

@lucasmichot
see https://bugs.php.net/bug.php?id=66198

It seems to me that the GD is not compiling and has not been updated with the solution you showed above.

My guess as to what is happening. Please correct me if anything is wrong.

  1. using freetype 2.5.1
    PHP is looking for the freetype config file in include/freetype2/freetype.h and FINDS IT.
    but gd is looking for it in include/freetype2/freetype/freetype.h and FAILS.
  2. using freetype 2.4.11.
    PHP is looking for config file in include/freetype2/freetype.h and FAILS
    but gd is looking for it in include/freetype2/freetype/freetype.h and FINDS IT.

I tried compiling without the --with-gd option and it compiled fine.

@halles

This comment has been minimized.

Show comment
Hide comment
@halles

halles Dec 9, 2013

@pellacis @habitullence yes. I tried using 2.5.1, 2.5.0, 2.4.x and now 2.5.1. Tried faking the path of the files by linking them, copying them, etc. No luck at all.

And now i tried updating and reinstalling as @lucasmichot said, and still nothing. I get the exact same error output.

You can see this here (tried twice): https://gist.github.com/halles/7879375

I'm using OSX 10.7.4 (Lion), which uses a special bottle for freetype (as output says). When freetype installs, it says that Before Mountain Lion, the OS ships with freetype thus it might be the source of the problem. More details about this are on the link i pasted in the last paragraph.

halles commented Dec 9, 2013

@pellacis @habitullence yes. I tried using 2.5.1, 2.5.0, 2.4.x and now 2.5.1. Tried faking the path of the files by linking them, copying them, etc. No luck at all.

And now i tried updating and reinstalling as @lucasmichot said, and still nothing. I get the exact same error output.

You can see this here (tried twice): https://gist.github.com/halles/7879375

I'm using OSX 10.7.4 (Lion), which uses a special bottle for freetype (as output says). When freetype installs, it says that Before Mountain Lion, the OS ships with freetype thus it might be the source of the problem. More details about this are on the link i pasted in the last paragraph.

@romaricdrigon

This comment has been minimized.

Show comment
Hide comment
@romaricdrigon

romaricdrigon Dec 12, 2013

Hi,

I'm through the same issue. I uninstalled everyrthing (php54 and extensions, freetype, gd), and have had no luck in fixing it.
Any insights?

romaricdrigon commented Dec 12, 2013

Hi,

I'm through the same issue. I uninstalled everyrthing (php54 and extensions, freetype, gd), and have had no luck in fixing it.
Any insights?

@romaricdrigon

This comment has been minimized.

Show comment
Hide comment
@romaricdrigon

romaricdrigon Dec 12, 2013

At some point (precisely: right now, after 4 hours of attempts), it worked.
I've no idea why, maybe there was some kind of cache?

romaricdrigon commented Dec 12, 2013

At some point (precisely: right now, after 4 hours of attempts), it worked.
I've no idea why, maybe there was some kind of cache?

@halles

This comment has been minimized.

Show comment
Hide comment
@halles

halles Dec 12, 2013

Did you brew update / upgrade in between?
On Dec 12, 2013 1:54 PM, "Romaric Drigon" notifications@github.com wrote:

At some point (precisely: right now, after 4 hours of attempts), it worked.
I've no idea why, maybe there was some kind of cache?


Reply to this email directly or view it on GitHubhttps://github.com//issues/885#issuecomment-30440021
.

halles commented Dec 12, 2013

Did you brew update / upgrade in between?
On Dec 12, 2013 1:54 PM, "Romaric Drigon" notifications@github.com wrote:

At some point (precisely: right now, after 4 hours of attempts), it worked.
I've no idea why, maybe there was some kind of cache?


Reply to this email directly or view it on GitHubhttps://github.com//issues/885#issuecomment-30440021
.

@romaricdrigon

This comment has been minimized.

Show comment
Hide comment
@romaricdrigon

romaricdrigon Dec 12, 2013

Yes, but I already updated / upgraded before, with no effect.
The only explanation I see is that just before it worked, I was messing with freetype formula (to install older versions...).

romaricdrigon commented Dec 12, 2013

Yes, but I already updated / upgraded before, with no effect.
The only explanation I see is that just before it worked, I was messing with freetype formula (to install older versions...).

@webster

This comment has been minimized.

Show comment
Hide comment
@webster

webster Dec 13, 2013

On 10.9, going for php55, lucasmichot's method worked perfectly when I was experiencing the same. Thanks!

brew unlink freetype
brew unpin freetype
brew rm freetype
brew update
brew install php55
/usr/local/Cellar/php55/5.5.6: 492 files, 38M, built in 2.6 minutes

webster commented Dec 13, 2013

On 10.9, going for php55, lucasmichot's method worked perfectly when I was experiencing the same. Thanks!

brew unlink freetype
brew unpin freetype
brew rm freetype
brew update
brew install php55
/usr/local/Cellar/php55/5.5.6: 492 files, 38M, built in 2.6 minutes
@miogalang

This comment has been minimized.

Show comment
Hide comment
@miogalang

miogalang Dec 13, 2013

The GD bug on php has been fixed. So just do the normal compile as @lucasmichot said and you will be fine.

https://bugs.php.net/bug.php?id=64405

miogalang commented Dec 13, 2013

The GD bug on php has been fixed. So just do the normal compile as @lucasmichot said and you will be fine.

https://bugs.php.net/bug.php?id=64405

@partounian

This comment has been minimized.

Show comment
Hide comment
@partounian

partounian Mar 18, 2016

10.11.3 Still getting this issue.
Running brew install php53 --with-fpm --without-apache --with-homebrew-curl --with-homebrew-openssl --without-snmp
Have tried everything above, however when running unpin freetype, terminal states it is not pinned.

EDIT: running brew install php53 by itself seems to have worked.
------------------ | ------------------

**OS X Version:** | 10.11.3
**Homebrew Version:** | 0.9.5
**PHP Version in use:** | stock-apple (?)
**Xcode Version:** | 7.2.0.0.1.144782692 (?)
**Output of gcc -v:** | Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.3.0
Thread model: posix
**Output of php -v:** | PHP 5.5.30 (cli) (built: Oct 23 2015 17:21:45)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
**Output of brew doctor within a gist** | Your system is ready to brew.

partounian commented Mar 18, 2016

10.11.3 Still getting this issue.
Running brew install php53 --with-fpm --without-apache --with-homebrew-curl --with-homebrew-openssl --without-snmp
Have tried everything above, however when running unpin freetype, terminal states it is not pinned.

EDIT: running brew install php53 by itself seems to have worked.
------------------ | ------------------

**OS X Version:** | 10.11.3
**Homebrew Version:** | 0.9.5
**PHP Version in use:** | stock-apple (?)
**Xcode Version:** | 7.2.0.0.1.144782692 (?)
**Output of gcc -v:** | Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.3.0
Thread model: posix
**Output of php -v:** | PHP 5.5.30 (cli) (built: Oct 23 2015 17:21:45)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
**Output of brew doctor within a gist** | Your system is ready to brew.
@pmartens

This comment has been minimized.

Show comment
Hide comment
@pmartens

pmartens Mar 22, 2016

Same issue here!!

Parameter Value
OS X Version: 10.11.3
Homebrew Version: 0.9.5
PHP Version in use: 5.5.30
Xcode Version:
Output of gcc -v: Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1

Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.3.0
Thread model: posix
Output of php -v: | PHP 5.5.30 (cli) (built: Oct 23 2015 17:21:45)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
Output of brew doctor within a gist | Your system is ready to brew.

pmartens commented Mar 22, 2016

Same issue here!!

Parameter Value
OS X Version: 10.11.3
Homebrew Version: 0.9.5
PHP Version in use: 5.5.30
Xcode Version:
Output of gcc -v: Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1

Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin15.3.0
Thread model: posix
Output of php -v: | PHP 5.5.30 (cli) (built: Oct 23 2015 17:21:45)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
Output of brew doctor within a gist | Your system is ready to brew.

@josegonzalez

This comment has been minimized.

Show comment
Hide comment
@josegonzalez

josegonzalez Mar 22, 2016

Contributor

Please don't comment on a two year old bug that was closed two years ago.

Contributor

josegonzalez commented Mar 22, 2016

Please don't comment on a two year old bug that was closed two years ago.

@partounian

This comment has been minimized.

Show comment
Hide comment
@partounian

partounian Mar 23, 2016

If the issue is still present, it's better to just brush it off because it's old?

partounian commented Mar 23, 2016

If the issue is still present, it's better to just brush it off because it's old?

@josegonzalez

This comment has been minimized.

Show comment
Hide comment
@josegonzalez

josegonzalez Mar 23, 2016

Contributor

No, open a new issue because people are likely not experiencing the same issue you are (unless you're running a 2 year old copy).

Contributor

josegonzalez commented Mar 23, 2016

No, open a new issue because people are likely not experiencing the same issue you are (unless you're running a 2 year old copy).

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