Topic: Building php 5.2.x in mock RL 5.6 environment

Hi Remi,

I'm trying to rebuild php-5.2.17 using mock in an epel-5-x86_64 environment (I want to build it against MySQL 5.0.x libs, not 5.1.x or 5.5.x). I have done this successfully with your 5.2.10 SRPM.

I am using mock on Fedora 15 as follows:

mock -r epel-5-x86_64 ~/SRPMS/php-5.2.17-1.remi.src.rpm

The build fails with the following error:

/bin/sh /builddir/build/BUILD/php-5.2.17/build-cgi/libtool --silent --preserve-dup-deps --mode=compile cc  -Iext/curl/ -I/builddir/build/BUILD/php-5.2.17/ext/curl/ -DPHP_ATOM_INC -I/builddir/build/BUILD/php-5.2.17/build-cgi/include -I/builddir/build/BUILD/php-5.2.17/build-cgi/main -I/builddir/build/BUILD/php-5.2.17 -I/builddir/build/BUILD/php-5.2.17/build-cgi/ext/date/lib -I/builddir/build/BUILD/php-5.2.17/ext/date/lib -I/usr/include/libxml2 -I/usr/kerberos/include -I/usr/include/freetype2 -I/usr/include/imap -I/usr/lib64/firebird/include -I/builddir/build/BUILD/php-5.2.17/ext/mbstring/oniguruma -I/builddir/build/BUILD/php-5.2.17/build-cgi/ext/mbstring/oniguruma -I/builddir/build/BUILD/php-5.2.17/ext/mbstring/libmbfl -I/builddir/build/BUILD/php-5.2.17/build-cgi/ext/mbstring/libmbfl -I/builddir/build/BUILD/php-5.2.17/ext/mbstring/libmbfl/mbfl -I/builddir/build/BUILD/php-5.2.17/build-cgi/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql -I/usr/include/ncurses -I/usr/include/pspell -I/builddir/build/BUILD/php-5.2.17/build-cgi/TSRM -I/builddir/build/BUILD/php-5.2.17/build-cgi/Zend -I/builddir/build/BUILD/php-5.2.17/main -I/builddir/build/BUILD/php-5.2.17/Zend -I/builddir/build/BUILD/php-5.2.17/TSRM -I/builddir/build/BUILD/php-5.2.17/build-cgi/    -I/usr/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing  -prefer-pic -c /builddir/build/BUILD/php-5.2.17/ext/curl/interface.c -o ext/curl/interface.lo 
In file included from /usr/include/curl/curl.h:34,
                 from /builddir/build/BUILD/php-5.2.17/ext/curl/interface.c:39:
/usr/include/curl/curlbuild.h:6:26: error: curlbuild-64.h: No such file or directory
In file included from /usr/include/curl/curl.h:35,
                 from /builddir/build/BUILD/php-5.2.17/ext/curl/interface.c:39:
/usr/include/curl/curlrules.h:79:4: error: #error "CURL_SIZEOF_LONG definition is missing!"
In file included from /usr/include/curl/curl.h:35,
                 from /builddir/build/BUILD/php-5.2.17/ext/curl/interface.c:39:
/usr/include/curl/curlrules.h:80: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Compilation_aborted_CURL_SIZEOF_LONG_is_missing'
/usr/include/curl/curlrules.h:84:4: error: #error "CURL_TYPEOF_CURL_SOCKLEN_T definition is missing!"
/usr/include/curl/curlrules.h:89:4: error: #error "CURL_SIZEOF_CURL_SOCKLEN_T definition is missing!"
/usr/include/curl/curlrules.h:94:4: error: #error "CURL_TYPEOF_CURL_OFF_T definition is missing!"
/usr/include/curl/curlrules.h:99:4: error: #error "CURL_FORMAT_CURL_OFF_T definition is missing!"
/usr/include/curl/curlrules.h:104:4: error: #error "CURL_FORMAT_CURL_OFF_TU definition is missing!"
/usr/include/curl/curlrules.h:109:4: error: #error "CURL_FORMAT_OFF_T definition is missing!"
/usr/include/curl/curlrules.h:114:4: error: #error "CURL_SIZEOF_CURL_OFF_T definition is missing!"
/usr/include/curl/curlrules.h:119:4: error: #error "CURL_SUFFIX_CURL_OFF_T definition is missing!"
/usr/include/curl/curlrules.h:124:4: error: #error "CURL_SUFFIX_CURL_OFF_TU definition is missing!"
/usr/include/curl/curlrules.h:153: error: 'curl_off_t' undeclared here (not in a function)
/usr/include/curl/curlrules.h:153: error: 'CURL_SIZEOF_CURL_OFF_T' undeclared here (not in a function)
/usr/include/curl/curlrules.h:173: error: 'curl_socklen_t' undeclared here (not in a function)
/usr/include/curl/curlrules.h:173: error: 'CURL_SIZEOF_CURL_SOCKLEN_T' undeclared here (not in a function)
In file included from /builddir/build/BUILD/php-5.2.17/ext/curl/interface.c:39:
/usr/include/curl/curl.h:237: error: expected specifier-qualifier-list before 'curl_off_t'
/usr/include/curl/curl.h:298: error: expected declaration specifiers or '...' before 'curl_off_t'
/builddir/build/BUILD/php-5.2.17/ext/curl/interface.c: In function 'zif_curl_copy_handle':
/builddir/build/BUILD/php-5.2.17/ext/curl/interface.c:1232: warning: passing argument 1 of 'zval_add_ref' from incompatible pointer type
/builddir/build/BUILD/php-5.2.17/ext/curl/interface.c:1238: warning: passing argument 1 of 'zval_add_ref' from incompatible pointer type
/builddir/build/BUILD/php-5.2.17/ext/curl/interface.c:1244: warning: passing argument 1 of 'zval_add_ref' from incompatible pointer type
make: *** [ext/curl/interface.lo] Error 1
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.94451 (%build)
    Bad exit status from /var/tmp/rpm-tmp.94451 (%build)
Child returncode was: 1
EXCEPTION: Command failed. See logs for output.
 # ['bash', '--login', '-c', 'rpmbuild -bb --target x86_64 --nodeps builddir/build/SPECS/php52.spec']
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/mock/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.7/site-packages/mock/util.py", line 328, in do
    raise mock.exception.Error, ("Command failed. See logs for output.\n # %s" % (command,), child.returncode)
Error: Command failed. See logs for output.
 # ['bash', '--login', '-c', 'rpmbuild -bb --target x86_64 --nodeps builddir/build/SPECS/php52.spec']
LEAVE do --> EXCEPTION RAISED

Do you have any idea how I might fix this?

Thanks,

R.

Re: Building php 5.2.x in mock RL 5.6 environment

Sorry, no idea. (no issue when I build it... some months ago)

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 php 5.2.x in mock RL 5.6 environment

Turns out it was an issue with my build environment.

I had modified the mock env to use my own internal repo and I had some curl packages from http://www.city-fan.org/ftp/contrib/ that were being pulled in. As it happened, there was a problem in libcurl-devel (it was missing curlbuild-64.h).

All sorted now!

FWIW, the only reason I have to re-build your packages is that we're still using MySQL 5.0.x and your packages are built against MySQL 5.1/5.5.

I don't suppose there's any chance you'd consider maintaining a set of MySQL 5.0.x-compatible PHP packages?

Thanks,

R.

Re: Building php 5.2.x in mock RL 5.6 environment

robinbowes wrote:

I don't suppose there's any chance you'd consider maintaining a set of MySQL 5.0.x-compatible PHP packages?

No, I always provide the latest version.

But you can use latest php + mysql-compat55 (or mysql-compat51 for php 5.2, AFAIR) and keep system default mysql (5.0)

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 php 5.2.x in mock RL 5.6 environment

Remi wrote:

But you can use latest php + mysql-compat55 (or mysql-compat51 for php 5.2, AFAIR) and keep system default mysql (5.0)

Ah, OK. That's good to know. Will save me rebuilding!

R.