[ start | index | login ]
start > knowledgebase > linux > miscapplications > Build php 5.1.6 rpm on RHEL4

Build php 5.1.6 rpm on RHEL4

Created by zu. Last edited by zu, one year and 164 days ago. Viewed 1,335 times. #3
[diff] [history] [edit] [rdf]
labels
attachments
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:

rpm -Uvh *.src.rpm

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!

no comments | post comment
Powered by snipsnap.org Found a mistake in a howto? Let us know via an email to p.blikibugs at rimuhosting com.