1 (edited by kde 2014-10-12 12:12:33)

Topic: Building zts-enabled third-party extension

Hi,

I have ZTS-enabled PHP 5.5 and need to compile an extension for it.
I use  php-devel-5.5.17-2.el6.remi.x86_64 rpm and do the following

# cd /var/saxon-HEC/Saxon-C-API/
# zts-phpize
# ./configure --enable-saxon --enable-maintainer-zts --with-php-config=/usr/bin/zts-php-config
# make
# make install
# apachectl restart
# tail /var/log/httpd/error_log

But apache's log says:

PHP Warning:  PHP Startup: Saxon/C: Unable to initialize module
Module compiled with build ID=API20121212,NTS
PHP    compiled with build ID=API20121212,TS
These options need to match\n in Unknown on line 0

Also, I am getting this waring from configure:

configure: WARNING: unrecognized options: --enable-maintainer-zts

Basically it is the same result as if I just compiled with non-zts phpize and php-config.
What am I doing wrong?

Re: Building zts-enabled third-party extension

--enable-maintainer-zts  is only for PHP, not needed for extension

--with-php-config=/usr/bin/zts-php-config should be enough (and work for all extensions in my repo...)

Sorry no idea...

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Building zts-enabled third-party extension

After the build, (after make, before make install), to check the module

zts-php -d extension=modules/saxon.so -m
Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

4 (edited by kde 2014-10-12 23:35:08)

Re: Building zts-enabled third-party extension

Sorry, it was my mistake. I had mistakenly tried to build my extension with phpize before I realized that I have to use zts-phpize.
zts-phpize does not overwrite previously created config files.
So, once I manually cleaned-up the directory with extension and re-run zts-phpize everything worked.

Re: Building zts-enabled third-party extension

smile

OK, closing.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi