Some customers want to use apache2.2+php5 but they do not want to upgrade their RHEL4/CentOS4.
According to customers' requirements, we can grab SRPMs from CentOS 5 beta and build binary RPMs on RHEL4/CentOS4. Most likely we should get srpm of apr, apr-util, pcre, httpd and php
[root@happyrimu ~]# ls
apr-1.2.7-10.src.rpm httpd-2.2.3-5.el5.centos.1.src.rpm php-5.1.6-3.src.rpm
apr-util-1.2.7-3.src.rpm pcre-6.6-1.1.src.rpm
Then install these SRPMs:
Then build RPMS:
cd /usr/src/redhat/SPECS
rpmbuild -ba apr.spec
Building of httpd and its dependencies should be no problems. But unfortunately the building of php5 is not smooth. Build fails with the following errors:
checking for C compiler default output file name… configure: error: C
compiler cannot create executables
See `config.log' for more details.
error: Bad exit status from /var/tmp/rpm-tmp.21471 (%build)
I have tried many ways to resolve this error but all failed. Finally I found
http://bugs.php.net/bug.php?id=36419 via search engines. According to this page, I removed "-Wno-pointer-sign" in php.spec, as a result, this error disappeared!