Topic: Recompiling php-pecl-apc-3.1.15-0.4.20130912 with Php 5.5.16

Hi

Compiling fails on the ZTS stuff:

cd ../APC-%{version}-zts
%{_bindir}/zts-phpize
%configure --enable-apc-mmap --with-php-config=%{_bindir}/zts-php-config
make %{?_smp_mflags}

What do I need to install to get zts-phpize and zts-php-config ?

Thanks

Re: Recompiling php-pecl-apc-3.1.15-0.4.20130912 with Php 5.5.16

Why damn do you want to use APC with 5.5 ?

APC is dead, unmaintain, dangerous. No "stable" version was never publish for php > 5.4. Version 3.1.14 have even be unreleased (by upstream, in pecl...) This package (for 5.4) is a development snapshot...

For opcode cache, use php-opcache
For user data cache, use php-pecl-apcu which is a dropin replacement.

And for your question, my PHP 5.5 package provides the zts-phpize and zts-php-config command.

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: Recompiling php-pecl-apc-3.1.15-0.4.20130912 with Php 5.5.16

Thanks Remi.
I don't want to use APC but Trying to compile php-pecl-redis requires php-pecl-igbinary which requires php-pecl-apc... Hence the reason for compiling php-pecl-apc!
Which PHP 5.5 rpm provide the zts- commands? I installed php, php-common, php-cli, etc.. and no zts- type commands.

Re: Recompiling php-pecl-apc-3.1.15-0.4.20130912 with Php 5.5.16

> php-pecl-igbinary which requires php-pecl-apc.
> Hence the reason for compiling php-pecl-apc!
No.
igbinary build with apc OR apcu which provides the needed stuff.

How do you think I build pecl/redis for my repository ?

> Which PHP 5.5 rpm provide the zts- commands?
> I installed php, php-common, php-cli, etc.. and no zts- type commands.

$ rpm -qlp php-devel-5.5.16-1.el7.remi.x86_64.rpm | grep bin
/usr/bin/php-config
/usr/bin/zts-php-config
/usr/bin/zts-phpize

I still really don't understand why you think rebuilding everything is a good 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: Recompiling php-pecl-apc-3.1.15-0.4.20130912 with Php 5.5.16

Long story... but one of the reason for recompiling PHP 5.5.16 is: https://bugs.php.net/bug.php?id=61435

Re: Recompiling php-pecl-apc-3.1.15-0.4.20130912 with Php 5.5.16

Trying to get php-pecl-apcu-4.0.6-2.remi.src.rpm to compile now

What is providing these values?
php_extdir
pecl_xmldir
pecl_docdir
pecl_testdir

I can set them up in the spec file (as below) and it builds ok but I assume something should set them up which obviously I don't have...
%{!?php_extdir: %{expand: %%global php_extdir %(pecl config-get ext_dir)}}
%{!?pecl_xmldir: %{expand: %%global pecl_xmldir %(pecl config-get metadata_dir)/pkgxml}}
%{!?pecl_docdir: %{expand: %%global pecl_docdir %(pecl config-get doc_dir)}}
%{!?pecl_testdir: %{expand: %%global pecl_testdir %(pecl config-get test_dir)}}

Also the following trips me when trying to install the rebuilt apcu rpms:
           Requires: php(zend-abi) = %{php_zend_api}
           Installed: php-common-5.5.16-200.el6.x86_64 (@/php-common-5.5.16-200.el6.x86_64)
               php(zend-abi) = 20121212-64
           ...
           Requires: php(api) = %{php_core_api}
           Installed: php-common-5.5.16-200.el6.x86_64 (@/php-common-5.5.16-200.el6.x86_64)
               php(api) = 20121113-64

What provides %{php_zend_api} and %{php_core_api}?

Re: Recompiling php-pecl-apc-3.1.15-0.4.20130912 with Php 5.5.16

It seems you really do too much changes in my spec.
Restore or compare with original

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: Recompiling php-pecl-apc-3.1.15-0.4.20130912 with Php 5.5.16

Actually I don't change anything except the Release
   Release:       200%{?dist}
and just rebuild...
That's why I don't understand because it should just work!

Re: Recompiling php-pecl-apc-3.1.15-0.4.20130912 with Php 5.5.16

I'm going to create a new VM with CentOS 6.5 (x86_64) just to ensure I've got a clean build VM.
Would that be better then to use mock instead of rpmbuild?

Re: Recompiling php-pecl-apc-3.1.15-0.4.20130912 with Php 5.5.16

> Would that be better then to use mock instead of rpmbuild?
Definitively, mock is better. The only sane way to make clean rpm.

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: Recompiling php-pecl-apc-3.1.15-0.4.20130912 with Php 5.5.16

Well well well... New VM with a fresh CentOS 6.5 (x86_64) and all is working well now.