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

Error while configuring PHP 5.4.17 #46

Closed
nomasprime opened this Issue Dec 3, 2013 · 23 comments

Comments

Projects
None yet
7 participants
@nomasprime
Contributor

nomasprime commented Dec 3, 2013

I've pretty much had to rebuild my boxen after upgrading to Mavericks. Everything seems to be working apart from PHP. I get the following output in debug mode:

If configure fails try --with-vpx-dir=<DIR>
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=<DIR>
Configure exit code: pid 41132 exit 1

DESTROYING PHP 5.4.17
Error: Could not set 'present' on ensure: uncaught throw #<RuntimeError: Error occured while configuring PHP 5.4.17> at 120:/opt/boxen/repo/shared/php/manifests/version.pp
Error: Could not set 'present' on ensure: uncaught throw #<RuntimeError: Error occured while configuring PHP 5.4.17> at 120:/opt/boxen/repo/shared/php/manifests/version.pp
Wrapped exception:
uncaught throw #<RuntimeError: Error occured while configuring PHP 5.4.17>
Error: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/Php_version[5.4.17]/ensure: change from absent to present failed: Could not set 'present' on ensure: uncaught throw #<RuntimeError: Error occured while configuring PHP 5.4.17> at 120:/opt/boxen/repo/shared/php/manifests/version.pp
Notice: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/Exec[pear-5.4.17-temp_dir]: Dependency Php_version[5.4.17] has failures: true
Warning: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/Exec[pear-5.4.17-temp_dir]: Skipping because of failed dependencies
Notice: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/Exec[pear-5.4.17-cache_dir]: Dependency Php_version[5.4.17] has failures: true
Warning: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/Exec[pear-5.4.17-cache_dir]: Skipping because of failed dependencies
Notice: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/Exec[pear-5.4.17-download_dir]: Dependency Php_version[5.4.17] has failures: true
Warning: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/Exec[pear-5.4.17-download_dir]: Skipping because of failed dependencies
Notice: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/File[/opt/boxen/phpenv/versions/5.4.17]: Dependency Php_version[5.4.17] has failures: true
Warning: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/File[/opt/boxen/phpenv/versions/5.4.17]: Skipping because of failed dependencies
Notice: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/File[/opt/boxen/phpenv/versions/5.4.17/modules]: Dependency Php_version[5.4.17] has failures: true
Warning: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/File[/opt/boxen/phpenv/versions/5.4.17/modules]: Skipping because of failed dependencies
Notice: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/Exec[phpenv-rehash-post-install-5.4.17]: Dependency Php_version[5.4.17] has failures: true
Warning: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/Exec[phpenv-rehash-post-install-5.4.17]: Skipping because of failed dependencies
Notice: /Stage[main]/Php::5_4/File[/opt/boxen/phpenv/versions/5.4]: Dependency Php_version[5.4.17] has failures: true
Warning: /Stage[main]/Php::5_4/File[/opt/boxen/phpenv/versions/5.4]: Skipping because of failed dependencies
Notice: /Stage[main]/Php::Global/File[/opt/boxen/phpenv/version]: Dependency Php_version[5.4.17] has failures: true
Warning: /Stage[main]/Php::Global/File[/opt/boxen/phpenv/version]: Skipping because of failed dependencies
Debug: Finishing transaction 70324389646640
Debug: Storing state
Debug: Stored state in 0.99 seconds

Outside of boxen I get:

If configure fails try --with-vpx-dir=<DIR>
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=<DIR>
configure: error: freetype.h not found.
@miogalang

This comment has been minimized.

Show comment
Hide comment
@miogalang

miogalang Dec 3, 2013

+1 same issue for me.

miogalang commented Dec 3, 2013

+1 same issue for me.

@nomasprime

This comment has been minimized.

Show comment
Hide comment
@nomasprime

nomasprime Dec 3, 2013

Contributor

I'm thinking this is related to https://bugs.php.net/bug.php?id=66198

Contributor

nomasprime commented Dec 3, 2013

I'm thinking this is related to https://bugs.php.net/bug.php?id=66198

@nomasprime

This comment has been minimized.

Show comment
Hide comment
@nomasprime

nomasprime Dec 3, 2013

Contributor

Yep, compiles fine without gd.

Contributor

nomasprime commented Dec 3, 2013

Yep, compiles fine without gd.

@miogalang

This comment has been minimized.

Show comment
Hide comment
@miogalang

miogalang Dec 3, 2013

@habitullence sorry for the noob question but how do i compile it without gd?

miogalang commented Dec 3, 2013

@habitullence sorry for the noob question but how do i compile it without gd?

@nomasprime

This comment has been minimized.

Show comment
Hide comment
@nomasprime

nomasprime Dec 3, 2013

Contributor

@miogalang I'll fix up my fork and then you can use that in your Puppetfile. Will submit pull request here so you can switch back later down the road when changes are merged in. Give me 10 mins to validate my changes...

Contributor

nomasprime commented Dec 3, 2013

@miogalang I'll fix up my fork and then you can use that in your Puppetfile. Will submit pull request here so you can switch back later down the road when changes are merged in. Give me 10 mins to validate my changes...

@miogalang

This comment has been minimized.

Show comment
Hide comment
@miogalang

miogalang Dec 3, 2013

@habitullence Thanks a lot! you are awesome!!

miogalang commented Dec 3, 2013

@habitullence Thanks a lot! you are awesome!!

@nomasprime

This comment has been minimized.

Show comment
Hide comment
@nomasprime

nomasprime Dec 3, 2013

Contributor

@miogalang no, you're awesome ;) Best I can do for now is drop GD, use my fork for now https://github.com/habitullence/puppet-php

Contributor

nomasprime commented Dec 3, 2013

@miogalang no, you're awesome ;) Best I can do for now is drop GD, use my fork for now https://github.com/habitullence/puppet-php

@miogalang

This comment has been minimized.

Show comment
Hide comment
@miogalang

miogalang Dec 3, 2013

@habitullence thanks!

miogalang commented Dec 3, 2013

@habitullence thanks!

@nomasprime

This comment has been minimized.

Show comment
Hide comment
@nomasprime

nomasprime Dec 3, 2013

Contributor

@miogalang np. I realised just now, a better temp fix could be to stick with officical boxen module, go to /opt/boxen/homebrew/Library/Forumla, git checkout 0e450f2 freetype.rb, and re-run boxen. I'll leave my changes but probably revert them in future.

Contributor

nomasprime commented Dec 3, 2013

@miogalang np. I realised just now, a better temp fix could be to stick with officical boxen module, go to /opt/boxen/homebrew/Library/Forumla, git checkout 0e450f2 freetype.rb, and re-run boxen. I'll leave my changes but probably revert them in future.

@miogalang

This comment has been minimized.

Show comment
Hide comment
@miogalang

miogalang Dec 4, 2013

For people who want the solution of using an older version of freetype instead of skipping gd. This is what I used.

brew rm freetype
brew install https://raw.github.com/mxcl/homebrew/0e450f2c2be7450934a3fdcc6537e3fa90c118aa/Library/Formula/freetype.rb
brew unlink ferrotype
brew install freetype # So dependency does not fail
brew switch 2.4.11

and then re run homebrew

miogalang commented Dec 4, 2013

For people who want the solution of using an older version of freetype instead of skipping gd. This is what I used.

brew rm freetype
brew install https://raw.github.com/mxcl/homebrew/0e450f2c2be7450934a3fdcc6537e3fa90c118aa/Library/Formula/freetype.rb
brew unlink ferrotype
brew install freetype # So dependency does not fail
brew switch 2.4.11

and then re run homebrew

@mattheath

This comment has been minimized.

Show comment
Hide comment
@mattheath

mattheath Dec 4, 2013

Owner

@habitullence so presumably this works for versions of freetype <= 2.5.0.1?

Freetype is installed as a package via Homebrew, and they bumped to 2.5.1 a week ago: Homebrew/legacy-homebrew@129ebdc

I'm not sure removing GD is the proper solution, so unless there is a way to build PHP with 2.5.1 I'll have to try and install a sandboxed version of 2.5.0.1 - in the same way that zlib is sandboxed within the PHP module.

Owner

mattheath commented Dec 4, 2013

@habitullence so presumably this works for versions of freetype <= 2.5.0.1?

Freetype is installed as a package via Homebrew, and they bumped to 2.5.1 a week ago: Homebrew/legacy-homebrew@129ebdc

I'm not sure removing GD is the proper solution, so unless there is a way to build PHP with 2.5.1 I'll have to try and install a sandboxed version of 2.5.0.1 - in the same way that zlib is sandboxed within the PHP module.

@nomasprime

This comment has been minimized.

Show comment
Hide comment
@nomasprime

nomasprime Dec 4, 2013

Contributor

@mattheath looks like current GD doesn't compile with freetype 2.5, see https://bugs.php.net/bug.php?id=66198. Suggest defaulting to 2.4.11 (git ref 0e450f2).

Contributor

nomasprime commented Dec 4, 2013

@mattheath looks like current GD doesn't compile with freetype 2.5, see https://bugs.php.net/bug.php?id=66198. Suggest defaulting to 2.4.11 (git ref 0e450f2).

@dbtlr

This comment has been minimized.

Show comment
Hide comment
@dbtlr

dbtlr Dec 10, 2013

Contributor

@miogalang's solution worked for me, with a couple small modifications... Here is the updated version, for anyone in need.

brew rm freetype
brew install https://raw.github.com/mxcl/homebrew/0e450f2c2be7450934a3fdcc6537e3fa90c118aa/Library/Formula/freetype.rb
brew unlink freetype
brew install freetype # So dependency does not fail
brew switch freetype 2.4.11

I'm going to submit a pull request to the main project that does something along these lines, because this is something that at least until php is updated, should just work.

Contributor

dbtlr commented Dec 10, 2013

@miogalang's solution worked for me, with a couple small modifications... Here is the updated version, for anyone in need.

brew rm freetype
brew install https://raw.github.com/mxcl/homebrew/0e450f2c2be7450934a3fdcc6537e3fa90c118aa/Library/Formula/freetype.rb
brew unlink freetype
brew install freetype # So dependency does not fail
brew switch freetype 2.4.11

I'm going to submit a pull request to the main project that does something along these lines, because this is something that at least until php is updated, should just work.

@miogalang

This comment has been minimized.

Show comment
Hide comment
@miogalang

miogalang Dec 13, 2013

@habitullence heads up. The the gd problem has been fixed on the php side so there should be no more issues.
https://bugs.php.net/bug.php?id=64405

miogalang commented Dec 13, 2013

@habitullence heads up. The the gd problem has been fixed on the php side so there should be no more issues.
https://bugs.php.net/bug.php?id=64405

@blackjid

This comment has been minimized.

Show comment
Hide comment
@blackjid

blackjid Dec 13, 2013

Contributor

@miogalang the fix apply to any version of PHP or just new ones??

Contributor

blackjid commented Dec 13, 2013

@miogalang the fix apply to any version of PHP or just new ones??

@miogalang

This comment has been minimized.

Show comment
Hide comment
@miogalang

miogalang Dec 16, 2013

@blackjid I don't really know. sorry.

miogalang commented Dec 16, 2013

@blackjid I don't really know. sorry.

@josegonzalez

This comment has been minimized.

Show comment
Hide comment
@josegonzalez

josegonzalez Jan 6, 2014

@mattheath any movement on this? It's definitely still happening to me on 5.4.17 :(.

josegonzalez commented Jan 6, 2014

@mattheath any movement on this? It's definitely still happening to me on 5.4.17 :(.

@josegonzalez

This comment has been minimized.

Show comment
Hide comment
@josegonzalez

josegonzalez Jan 13, 2014

I was able to fix it using the same hack as for zlib, except within my own project instead of forking puppet-php.

josegonzalez commented Jan 13, 2014

I was able to fix it using the same hack as for zlib, except within my own project instead of forking puppet-php.

@mattheath

This comment has been minimized.

Show comment
Hide comment
@mattheath

mattheath Mar 13, 2014

Owner

This should now be fixed by boxen/puppet-php#27. I'll pull into this repo and tag, but the boxen module should be considered the official fork 😄

Owner

mattheath commented Mar 13, 2014

This should now be fixed by boxen/puppet-php#27. I'll pull into this repo and tag, but the boxen module should be considered the official fork 😄

@mattheath mattheath closed this Mar 13, 2014

@hussfelt

This comment has been minimized.

Show comment
Hide comment
@hussfelt

hussfelt Jun 25, 2014

@mattheath this seems to be back somehow. I can't seem track this error down either... :/

Running latest boxen, latest puppet-php...

Any ideas?

...
/bin/sh /opt/boxen/phpenv/php-src/libtool --silent --preserve-dup-deps --mode=compile cc  -Iext/standard/ -I/opt/boxen/phpenv/php-src/ext/standard/ -DPHP_ATOM_INC -I/opt/boxen/phpenv/php-src/include -I/opt/boxen/phpenv/php-src/main -I/opt/boxen/phpenv/php-src -I/opt/boxen/phpenv/php-src/ext/date/lib -I/opt/boxen/phpenv/php-src/ext/ereg/regex -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml2 -I/opt/boxen/homebrew/opt/zlibphp/include -I/opt/boxen/homebrew/opt/jpeg/include -I/opt/boxen/homebrew/opt/libpng/include -I/opt/boxen/homebrew/Cellar/freetypephp/2.4.11/include/freetype2 -I/opt/boxen/homebrew/Cellar/freetypephp/2.4.11/include -I/opt/boxen/homebrew/opt/gettext/include -I/opt/boxen/homebrew/opt/gmp/include -I/opt/boxen/phpenv/php-src/ext/mbstring/oniguruma -I/opt/boxen/phpenv/php-src/ext/mbstring/libmbfl -I/opt/boxen/phpenv/php-src/ext/mbstring/libmbfl/mbfl -I/opt/boxen/phpenv/php-src/ext/sqlite3/libsqlite -I/usr/include/libxml2 -I/opt/boxen/phpenv/php-src/TSRM -I/opt/boxen/phpenv/php-src/Zend  -no-cpp-precomp  -I/usr/include -g -O2 -fvisibility=hidden  -c /opt/boxen/phpenv/php-src/ext/standard/base64.c -o ext/standard/base64.lo 
DESTROYING PHP 5.4.29
Error: Could not set 'present' on ensure: uncaught throw #<RuntimeError: Could not compile PHP @resource[:version]> at 120:/opt/boxen/repo/shared/php/manifests/version.pp
Error: Could not set 'present' on ensure: uncaught throw #<RuntimeError: Could not compile PHP @resource[:version]> at 120:/opt/boxen/repo/shared/php/manifests/version.pp
Wrapped exception:
uncaught throw #<RuntimeError: Could not compile PHP @resource[:version]>
Error: /Stage[main]/Php::5_4_29/Php::Version[5.4.29]/Php_version[5.4.29]/ensure: change from absent to present failed: Could not set 'present' on ensure: uncaught throw #<RuntimeError: Could not compile PHP @resource[:version]> at 120:/opt/boxen/repo/shared/php/manifests/version.pp
...
``

hussfelt commented Jun 25, 2014

@mattheath this seems to be back somehow. I can't seem track this error down either... :/

Running latest boxen, latest puppet-php...

Any ideas?

...
/bin/sh /opt/boxen/phpenv/php-src/libtool --silent --preserve-dup-deps --mode=compile cc  -Iext/standard/ -I/opt/boxen/phpenv/php-src/ext/standard/ -DPHP_ATOM_INC -I/opt/boxen/phpenv/php-src/include -I/opt/boxen/phpenv/php-src/main -I/opt/boxen/phpenv/php-src -I/opt/boxen/phpenv/php-src/ext/date/lib -I/opt/boxen/phpenv/php-src/ext/ereg/regex -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml2 -I/opt/boxen/homebrew/opt/zlibphp/include -I/opt/boxen/homebrew/opt/jpeg/include -I/opt/boxen/homebrew/opt/libpng/include -I/opt/boxen/homebrew/Cellar/freetypephp/2.4.11/include/freetype2 -I/opt/boxen/homebrew/Cellar/freetypephp/2.4.11/include -I/opt/boxen/homebrew/opt/gettext/include -I/opt/boxen/homebrew/opt/gmp/include -I/opt/boxen/phpenv/php-src/ext/mbstring/oniguruma -I/opt/boxen/phpenv/php-src/ext/mbstring/libmbfl -I/opt/boxen/phpenv/php-src/ext/mbstring/libmbfl/mbfl -I/opt/boxen/phpenv/php-src/ext/sqlite3/libsqlite -I/usr/include/libxml2 -I/opt/boxen/phpenv/php-src/TSRM -I/opt/boxen/phpenv/php-src/Zend  -no-cpp-precomp  -I/usr/include -g -O2 -fvisibility=hidden  -c /opt/boxen/phpenv/php-src/ext/standard/base64.c -o ext/standard/base64.lo 
DESTROYING PHP 5.4.29
Error: Could not set 'present' on ensure: uncaught throw #<RuntimeError: Could not compile PHP @resource[:version]> at 120:/opt/boxen/repo/shared/php/manifests/version.pp
Error: Could not set 'present' on ensure: uncaught throw #<RuntimeError: Could not compile PHP @resource[:version]> at 120:/opt/boxen/repo/shared/php/manifests/version.pp
Wrapped exception:
uncaught throw #<RuntimeError: Could not compile PHP @resource[:version]>
Error: /Stage[main]/Php::5_4_29/Php::Version[5.4.29]/Php_version[5.4.29]/ensure: change from absent to present failed: Could not set 'present' on ensure: uncaught throw #<RuntimeError: Could not compile PHP @resource[:version]> at 120:/opt/boxen/repo/shared/php/manifests/version.pp
...
``
@hussfelt

This comment has been minimized.

Show comment
Hide comment
@hussfelt

hussfelt Jun 25, 2014

Seems like I get the same error with PHP 5.5.13...

/gmp/include -I/opt/boxen/phpenv/php-src/ext/mbstring/oniguruma -I/opt/boxen/phpenv/php-src/ext/mbstring/libmbfl -I/opt/boxen/phpenv/php-src/ext/mbstring/libmbfl/mbfl -I/opt/boxen/phpenv/php-src/ext/sqlite3/libsqlite -I/usr/include/libxml2 -I/opt/boxen/phpenv/php-src/TSRM -I/opt/boxen/phpenv/php-src/Zend  -no-cpp-precomp  -I/usr/include -g -O2 -fvisibility=hidden  -c /opt/boxen/phpenv/php-src/ext/standard/base64.c -o ext/standard/base64.lo 
DESTROYING PHP 5.5.13
Error: Could not set 'present' on ensure: uncaught throw #<RuntimeError: Could not compile PHP @resource[:version]> at 120:/opt/boxen/repo/shared/php/manifests/version.pp
Error: Could not set 'present' on ensure: uncaught throw #<RuntimeError: Could not compile PHP @resource[:version]> at 120:/opt/boxen/repo/shared/php/manifests/version.pp
Wrapped exception:
uncaught throw #<RuntimeError: Could not compile PHP @resource[:version]>
Error: /Stage[main]/Php::5_5_13/Php::Version[5.5.13]/Php_version[5.5.13]/ensure: change from absent to present failed: Could not set 'present' on ensure: uncaught throw #<RuntimeError: Could not compile PHP @resource[:version]> at 120:/opt/boxen/repo/shared/php/manifests/version.pp
``

hussfelt commented Jun 25, 2014

Seems like I get the same error with PHP 5.5.13...

/gmp/include -I/opt/boxen/phpenv/php-src/ext/mbstring/oniguruma -I/opt/boxen/phpenv/php-src/ext/mbstring/libmbfl -I/opt/boxen/phpenv/php-src/ext/mbstring/libmbfl/mbfl -I/opt/boxen/phpenv/php-src/ext/sqlite3/libsqlite -I/usr/include/libxml2 -I/opt/boxen/phpenv/php-src/TSRM -I/opt/boxen/phpenv/php-src/Zend  -no-cpp-precomp  -I/usr/include -g -O2 -fvisibility=hidden  -c /opt/boxen/phpenv/php-src/ext/standard/base64.c -o ext/standard/base64.lo 
DESTROYING PHP 5.5.13
Error: Could not set 'present' on ensure: uncaught throw #<RuntimeError: Could not compile PHP @resource[:version]> at 120:/opt/boxen/repo/shared/php/manifests/version.pp
Error: Could not set 'present' on ensure: uncaught throw #<RuntimeError: Could not compile PHP @resource[:version]> at 120:/opt/boxen/repo/shared/php/manifests/version.pp
Wrapped exception:
uncaught throw #<RuntimeError: Could not compile PHP @resource[:version]>
Error: /Stage[main]/Php::5_5_13/Php::Version[5.5.13]/Php_version[5.5.13]/ensure: change from absent to present failed: Could not set 'present' on ensure: uncaught throw #<RuntimeError: Could not compile PHP @resource[:version]> at 120:/opt/boxen/repo/shared/php/manifests/version.pp
``
@mattheath

This comment has been minimized.

Show comment
Hide comment
@mattheath

mattheath Jun 25, 2014

Owner

@hussfelt do you have any more output from the log on the machine? For example in the original error on this issue the output was:

If configure fails try --with-vpx-dir=<DIR>
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=<DIR>
Configure exit code: pid 41132 exit 1

DESTROYING PHP 5.4.17
...

with an error of:

configure: error: freetype.h not found.

Is yours the same freetype error? If not could you open a new issue please?

Owner

mattheath commented Jun 25, 2014

@hussfelt do you have any more output from the log on the machine? For example in the original error on this issue the output was:

If configure fails try --with-vpx-dir=<DIR>
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=<DIR>
Configure exit code: pid 41132 exit 1

DESTROYING PHP 5.4.17
...

with an error of:

configure: error: freetype.h not found.

Is yours the same freetype error? If not could you open a new issue please?

@hussfelt

This comment has been minimized.

Show comment
Hide comment
@hussfelt

hussfelt Jun 26, 2014

@mattheath that's the thing - it exits with an uncaught exception... :-(
There is no extra data, not even running in debug mode. It just fails, just as in my first comment...

I am opening a new error. :)

hussfelt commented Jun 26, 2014

@mattheath that's the thing - it exits with an uncaught exception... :-(
There is no extra data, not even running in debug mode. It just fails, just as in my first comment...

I am opening a new error. :)

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