boxen / puppet-php

PHP ALL THE BOXEN
boxen.github.com
MIT License
11 stars 29 forks source link

Error when Installing pthreads #98

Open nei opened 7 years ago

nei commented 7 years ago
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
configure: error: pthreads requires ZTS, please re-compile PHP with ZTS enabled
make: *** No targets specified and no makefile found.  Stop.
Error: Could not set 'present' on ensure: Failed to build module pthreads for 5.6.29 at 43:/opt/boxen/repo/shared/php/manifests/extension/pthreads.pp

I have this on pthreads.pp

define php_extension::pthreads(
    $php,
    $version = '3.1.6'
) {
    require php::config
    # Require php version eg. php::5_4_10
    # This will compile, install and set up config dirs if not present
    php_require($php)

    $extension = 'pthreads'
    $package_name = "pthreads-${version}"
    $url = "http://pecl.php.net/get/pthreads-${version}.tgz"

    # Final module install path
    $module_path = "${php::config::root}/versions/${php}/modules/${extension}.so"

    $configure_params = "--enable-maintainer-zts"

    php_extension { $name:
        extension      => $extension,
        version        => $version,
        package_name   => $package_name,
        package_url    => $url,
        homebrew_path  => $boxen::config::homebrewdir,
        phpenv_root    => $php::config::root,
        php_version    => $php,
        configure_params => $configure_params,
        cache_dir      => $php::config::extensioncachedir,
    }

    # Add config file once extension is installed

    file { "${php::config::configdir}/${php}/conf.d/${extension}.ini":
        content => template('php/extensions/generic.ini.erb'),
        require => Php_extension[$name],
    }

}
jacobbednarz commented 7 years ago

The puppet manifest here looks fine and judging by the error, it's an issue with the extension. I don't use PHP (or compile extensions) on a regular basis anymore so the only thing I would suggest is to try doing this without Boxen and just ensure that the extension can be installed with your current setup and once that is working, fit it into a Puppet manifest.