mattheath / puppet-php

DEPRECATED see official Boxen fork:
https://github.com/boxen/puppet-php
MIT License
21 stars 53 forks source link

Unable to build PHP 5.3.2 or 5.3.3 #16

Closed enthooz closed 11 years ago

enthooz commented 11 years ago

I'm unable to build PHP 5.3.2 or 5.3.3, resulting in the following error (the remaining error messages show below):

Error: Could not set 'present' on ensure: uncaught throw `Error occured while configuring PHP 5.3.3' at 118:/opt/boxen/repo/shared/php/manifests/version.pp
Wrapped exception:
uncaught throw `Error occured while configuring PHP 5.3.3'

Environment

Add the following to Puppetfile:

github "php",         "0.4.2", :repo => "mattheath/puppet-php"
github "autoconf",    "1.0.0"
github "libtool",     "1.0.0"
github "pkgconfig",   "1.0.0"
github "pcre",        "1.0.0"

Create a project with the following (tried both 5.3.2 and 5.3.3:

class projects::my_php_project {
  php::project { 'my_rad_project':
    source        => 'enthooz/super-rad',
    mysql         => [ 'super_development', 'rad_development' ],
    nginx         => 'php/nginx/nginx.conf.erb',
    php           => '5.3.3',
  }
}

All output from Boxen

$ boxen
Boxen's master branch is out of sync, won't auto-update!
Notice: /File[/opt/boxen/config/php/5.3.2]/ensure: removed
Notice: /Stage[main]/Php/Package[icu4c]/ensure: created
Notice: Package[homebrew/dupes/zlib](provider=homebrew): Updating homebrew formulas
Notice: /Stage[main]/Php/Package[homebrew/dupes/zlib]/ensure: created
Notice: /Stage[main]/Php/Exec[phpenv-rehash-post-install]/returns: executed successfully
Notice: /Stage[main]/Php::5-3-3/Php::Version[5.3.3]/File[/opt/boxen/config/php/5.3.3]/ensure: created
Notice: /Stage[main]/Php::5-3-3/Php::Version[5.3.3]/File[/opt/boxen/config/php/5.3.3/php.ini]/ensure: defined content as '{md5}5747ecc319b35dcb06ce654409a297cc'
Notice: /Stage[main]/Php::5-3-3/Php::Version[5.3.3]/File[/opt/boxen/config/php/5.3.3/conf.d]/ensure: created
Notice: /Stage[main]/Php::5-3-3/Php::Version[5.3.3]/File[/opt/boxen/data/php/5.3.3]/ensure: created
Notice: /Stage[main]/Php::5-3-3/Php::Version[5.3.3]/File[/opt/boxen/data/php/5.3.3/cache]/ensure: created
Notice: /Stage[main]/Pkgconfig/Package[gettext]/ensure: created
DESTROYING PHP 5.3.3
Checking out files: 100% (6511/6511), done.
Switched to branch 'master'
Checking out files: 100% (6193/6193), done.
Switched to a new branch 'build'
Installing PHP 5.3.3, this may take a while...
export PHP_AUTOCONF=/opt/boxen/homebrew/bin/autoconf213 && export PHP_AUTOHEADER=/opt/boxen/homebrew/bin/autoheader213 && cd /opt/boxen/phpenv/php-src/ && ./buildconf --force
Forcing buildconf
buildconf: checking installation...
buildconf: autoconf version 2.13 (ok)
rebuilding aclocal.m4
rebuilding configure
rebuilding acconfig.h
rebuilding main/php_config.h.in
Configuring PHP 5.3.3: --prefix=/opt/boxen/phpenv/versions/5.3.3 --localstatedir=/var --sysconfdir=/opt/boxen/config/php/5.3.3 --with-config-file-path=/opt/boxen/config/php/5.3.3 --with-config-file-scan-dir=/opt/boxen/config/php/5.3.3/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-bcmath --enable-calendar --with-ldap --with-ldap-sasl=/usr --with-xmlrpc --with-kerberos=/usr --with-xsl=/usr --with-gd --enable-gd-native-ttf --with-freetype-dir=/opt/boxen/homebrew/opt/freetype --with-jpeg-dir=/opt/boxen/homebrew/opt/jpeg --with-png-dir=/opt/boxen/homebrew/opt/libpng --with-gettext=/opt/boxen/homebrew/opt/gettext --with-gmp=/opt/boxen/homebrew/opt/gmp --with-zlib=/opt/boxen/homebrew/opt/zlib --with-snmp=/usr --with-libedit --with-mhash --with-curl --with-openssl=/usr --with-bz2=/usr --with-mysql-sock=/tmp/mysql.sock --with-mysqli=mysqlnd --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --enable-fpm
configure: warning: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
configure: error: libevent >= 1.4.11 could not be found
creating cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for egrep... grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking host system type... i386-apple-darwin12.3.0
checking target system type... i386-apple-darwin12.3.0
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for icc... no
checking for suncc... no
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for AIX... no
checking whether ln -s works... yes
checking for system library directory... lib
checking whether to enable runpaths... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking for bison... bison -y
checking for bison version... 2.3 (ok)
checking for re2c... no
checking whether to enable computed goto gcc extension with re2c... no
checking whether gcc supports -no-cpp-precomp... yes
checking whether to force non-PIC code in shared modules... no
checking whether /dev/urandom exists... yes
checking for pthreads_cflags... 
checking for pthreads_lib... 

Configuring SAPI modules
checking for AOLserver support... no
checking for Apache 1.x module support via DSO through APXS... no
checking for Apache 1.x module support... no
checking whether to enable Apache charset compatibility option... no
checking for Apache 2.0 filter-module support via DSO through APXS... no
checking for Apache 2.0 handler-module support via DSO through APXS... no
checking for Apache 1.x (hooks) module support via DSO through APXS... no
checking for Apache 1.x (hooks) module support... no
checking whether to enable Apache charset compatibility option... no
checking for Caudium support... no
checking for CLI build... yes
checking for Continuity support... no
checking for embedded SAPI library support... no
checking for FPM build... yes
checking for libevent >= 1.4.11 install prefix... no
Configure exit code: 256

DESTROYING PHP 5.3.3
Error: Could not set 'present' on ensure: uncaught throw `Error occured while configuring PHP 5.3.3' at 118:/opt/boxen/repo/shared/php/manifests/version.pp
Error: Could not set 'present' on ensure: uncaught throw `Error occured while configuring PHP 5.3.3' at 118:/opt/boxen/repo/shared/php/manifests/version.pp
Wrapped exception:
uncaught throw `Error occured while configuring PHP 5.3.3'
Error: /Stage[main]/Php::5-3-3/Php::Version[5.3.3]/Php_version[5.3.3]/ensure: change from absent to present failed: Could not set 'present' on ensure: uncaught throw `Error occured while configuring PHP 5.3.3' at 118:/opt/boxen/repo/shared/php/manifests/version.pp
Notice: /Stage[main]/Php::5-3-3/Php::Version[5.3.3]/Exec[pear-5.3.3-cache_dir]: Dependency Php_version[5.3.3] has failures: true
Warning: /Stage[main]/Php::5-3-3/Php::Version[5.3.3]/Exec[pear-5.3.3-cache_dir]: Skipping because of failed dependencies
Notice: /Stage[main]/Php::5-3-3/Php::Version[5.3.3]/Exec[pear-5.3.3-temp_dir]: Dependency Php_version[5.3.3] has failures: true
Warning: /Stage[main]/Php::5-3-3/Php::Version[5.3.3]/Exec[pear-5.3.3-temp_dir]: Skipping because of failed dependencies
Notice: /Stage[main]/Php::5-3-3/Php::Version[5.3.3]/Exec[pear-5.3.3-download_dir]: Dependency Php_version[5.3.3] has failures: true
Warning: /Stage[main]/Php::5-3-3/Php::Version[5.3.3]/Exec[pear-5.3.3-download_dir]: Skipping because of failed dependencies
Notice: /Stage[main]/Php::5-3-3/Php::Version[5.3.3]/File[/opt/boxen/phpenv/versions/5.3.3]: Dependency Php_version[5.3.3] has failures: true
Warning: /Stage[main]/Php::5-3-3/Php::Version[5.3.3]/File[/opt/boxen/phpenv/versions/5.3.3]: Skipping because of failed dependencies
Notice: /Stage[main]/Php::5-3-3/Php::Version[5.3.3]/File[/opt/boxen/phpenv/versions/5.3.3/modules]: Dependency Php_version[5.3.3] has failures: true
Warning: /Stage[main]/Php::5-3-3/Php::Version[5.3.3]/File[/opt/boxen/phpenv/versions/5.3.3/modules]: Skipping because of failed dependencies
Notice: /Stage[main]/Php::Fpm::5-3-3/Php::Fpm[5.3.3]/File[/opt/boxen/config/php/5.3.3/php-fpm.conf]: Dependency Php_version[5.3.3] has failures: true
Warning: /Stage[main]/Php::Fpm::5-3-3/Php::Fpm[5.3.3]/File[/opt/boxen/config/php/5.3.3/php-fpm.conf]: Skipping because of failed dependencies
Notice: /Stage[main]/Php::Fpm::5-3-3/Php::Fpm[5.3.3]/File[/opt/boxen/config/php/5.3.3/pool.d]: Dependency Php_version[5.3.3] has failures: true
Warning: /Stage[main]/Php::Fpm::5-3-3/Php::Fpm[5.3.3]/File[/opt/boxen/config/php/5.3.3/pool.d]: Skipping because of failed dependencies
Notice: /File[/opt/boxen/config/php/5.3.3/pool.d/README.md]: Dependency Php_version[5.3.3] has failures: true
Warning: /File[/opt/boxen/config/php/5.3.3/pool.d/README.md]: Skipping because of failed dependencies
Notice: /Stage[main]/Projects::Cweb_php/Php::Project[cweb]/Php::Fpm::Pool[cweb-5.3.3]/File[/opt/boxen/config/php/5.3.3/pool.d/cweb-5.3.3.conf]: Dependency Php_version[5.3.3] has failures: true
Warning: /Stage[main]/Projects::Cweb_php/Php::Project[cweb]/Php::Fpm::Pool[cweb-5.3.3]/File[/opt/boxen/config/php/5.3.3/pool.d/cweb-5.3.3.conf]: Skipping because of failed dependencies
Notice: /Stage[main]/Php::Fpm::5-3-3/Php::Fpm[5.3.3]/File[/opt/boxen/config/php/5.3.3/pool.d/5.3.3.conf]: Dependency Php_version[5.3.3] has failures: true
Warning: /Stage[main]/Php::Fpm::5-3-3/Php::Fpm[5.3.3]/File[/opt/boxen/config/php/5.3.3/pool.d/5.3.3.conf]: Skipping because of failed dependencies
Notice: /Stage[main]/Php::Fpm::5-3-3/Php::Fpm[5.3.3]/Php::Fpm::Service[5.3.3]/File[/Library/LaunchDaemons/dev.php-fpm.5.3.3.plist]: Dependency Php_version[5.3.3] has failures: true
Warning: /Stage[main]/Php::Fpm::5-3-3/Php::Fpm[5.3.3]/Php::Fpm::Service[5.3.3]/File[/Library/LaunchDaemons/dev.php-fpm.5.3.3.plist]: Skipping because of failed dependencies
Notice: /Stage[main]/Php::Fpm::5-3-3/Php::Fpm[5.3.3]/Php::Fpm::Service[5.3.3]/Service[dev.php-fpm.5.3.3]: Dependency Php_version[5.3.3] has failures: true
Warning: /Stage[main]/Php::Fpm::5-3-3/Php::Fpm[5.3.3]/Php::Fpm::Service[5.3.3]/Service[dev.php-fpm.5.3.3]: Skipping because of failed dependencies
Notice: /Stage[main]/Projects::Cweb_php/Php::Project[cweb]/Php::Local[/Users/aashbacher/src/cweb]/File[/Users/aashbacher/src/cweb/.php-version]: Dependency Php_version[5.3.3] has failures: true
Warning: /Stage[main]/Projects::Cweb_php/Php::Project[cweb]/Php::Local[/Users/aashbacher/src/cweb]/File[/Users/aashbacher/src/cweb/.php-version]: Skipping because of failed dependencies
enthooz commented 11 years ago

This may be related: https://bugs.php.net/bug.php?id=51821

mattheath commented 11 years ago

Looks like installing libevent via homebrew, then adding the configure option --with-libevent-dir=/opt/boxen/homebrew/opt/libevent seems to fix 5.3.3. Just testing 5.3.2 then will push up a fix. Thanks for the awesome bug report btw! :thumbsup:

enthooz commented 11 years ago

Rad, dude. Pulling down and testing with this change now.

enthooz commented 11 years ago

It looked like everything was going fine until...

    Error: Could not set 'present' on ensure: uncaught throw `Failed to install PHP 5.3.3' at 118:/opt/boxen/repo/shared/php/manifests/version.pp
    Error: Could not set 'present' on ensure: uncaught throw `Failed to install PHP 5.3.3' at 118:/opt/boxen/repo/shared/php/manifests/version.pp
    Wrapped exception:
    uncaught throw `Failed to install PHP 5.3.3'
    Error: /Stage[main]/Php::5-3-3/Php::Version[5.3.3]/Php_version[5.3.3]/ensure: change from absent to present failed: Could not set 'present' on ensure: uncaught throw `Failed to install PHP 5.3.3' at 118:/opt/boxen/repo/shared/php/manifests/version.pp

This happened right after:

    Installing PEAR environment:      /opt/boxen/phpenv/versions/5.3.3/lib/php/
    [PEAR] Archive_Tar    - installed: 1.3.7
    [PEAR] Console_Getopt - installed: 1.3.0
    [PEAR] Structures_Graph- installed: 1.0.4
    [PEAR] XML_Util       - installed: 1.2.1
    [PEAR] PEAR           - installed: 1.9.4
    Wrote PEAR system config file at: /opt/boxen/config/php/5.3.3/pear.conf
    You may want to add: /opt/boxen/phpenv/versions/5.3.3/lib/php to your php.ini include_path
    /opt/boxen/phpenv/php-src/build/shtool install -c ext/phar/phar.phar /opt/boxen/phpenv/versions/5.3.3/bin
    ln -s -f /opt/boxen/phpenv/versions/5.3.3/bin/phar.phar /opt/boxen/phpenv/versions/5.3.3/bin/phar
    Installing PDO headers:          /opt/boxen/phpenv/versions/5.3.3/include/php/ext/pdo/
    find . -name \*.gcno -o -name \*.gcda | xargs rm -f
    find . -name \*.lo -o -name \*.o | xargs rm -f
    find . -name \*.la -o -name \*.a | xargs rm -f 
    find . -name \*.so | xargs rm -f
    find . -name .libs -a -type d|xargs rm -rf
    rm -f libphp5.la sapi/cli/php sapi/fpm/php-fpm modules/* libs/*
    DESTROYING PHP 5.3.3
mattheath commented 11 years ago

So it appears that 5.3.3 builds on my machine, but creates the php cli binary as php.dSYM rather than php, and php-fpm.dSYM instead of php-fpm . As a result the existence check fails (it's checking for php and php-fpm amongst others) and the provider rolls back removing the install.

mattheath commented 11 years ago

Related: CHH/php-build#78

mattheath commented 11 years ago

And php/php-src#135

enthooz commented 11 years ago

Your pull request got me up and running. Though, I haven't tried compiling 5.3.2 as I need the fpm support.