Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Error when Installing pthreads #98

Open
nei opened this issue Oct 4, 2017 · 1 comment
Open

Error when Installing pthreads #98

nei opened this issue Oct 4, 2017 · 1 comment

Comments

@nei
Copy link

nei commented Oct 4, 2017

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
Copy link
Member

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.

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

No branches or pull requests

2 participants