From Bugzilla Helper: User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Description of problem: PHP will not compile with the --with-informix=/opt/informix flag placed in the php.spec file. The PHP developers claim there's a bug in Red Hats SRPMs. The command is 'rpmbuild -ba /path/to/php.spec' INFORMIXDIR variable is set, as is LD_LIBRARY_PATH Below is the output of the failed compile: //usr/bin/ld: cannot find -lphpifx collect2: ld returned 1 exit status usr/bin/ld: cannot find -lphpifx collect2: ld returned 1 exit status make: *** [sapi/cgi/php] Error 1 make: *** Waiting for unfinished jobs.... make: *** [sapi/cli/php] Error 1 error: Bad exit status from /var/tmp/rpm-tmp.31610 (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.31610 (%build) Version-Release number of selected component (if applicable): php-4.3.2-14.ent How reproducible: Always Steps to Reproduce: 1.rpmbuild -ba /path/to/php.spec 2. 3. Actual Results: Same error Expected Results: Informix support enabled. Additional info:
If you can work out what needs to be done to fix this we can integrate the necessary changes.
By adding the following to /etc/ld.so.conf: /opt/informix /opt/informix/lib /opt/informix/bin and running 'ldconfig' I'm able to get past the previous problem. Build still fails though, with this output: Installing PHP SAPI module + popd /usr/src/redhat/BUILD/php-4.3.2 + install -m 755 -d /var/tmp/php-root/etc/ + install -m 644 php.ini-dist /var/tmp/php-root/etc/php.ini + install -m 755 -d /var/tmp/php-root/usr/lib/httpd/modules + install -m 755 build-apache/libs/libphp4.so /var/tmp/php-root/usr/lib/httpd/modules install: cannot stat `build-apache/libs/libphp4.so': No such file or directory error: Bad exit status from /var/tmp/rpm-tmp.95629 (%install) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.95629 (%install) The original bug no longer appears.
Sorry. The previous comment only applies when the option: --enable-force-cgi-redirect is commented out in the SPEC file. Remove the comment, and the original error still applies.
Here's what I know after messing around with this for a few hours: I can compile php-4.3.2 from the expanded tar file (from the current php-4.3.2-19.ent.src.rpm) in the '/usr/src/redhat/SOURCE' directory with the only flag being: --with-informix=/opt/informix and the compile completes but no 'libphp4.so' is created. I can do the same with the current source from the PHP web site (php-4.3.10) and it does create 'libphp4.so'. The current php5 source code compiles as well, and 'libphp5.so' is created. (There's a small syntax error in php-5.0.3/Zend/zend_strtod.c - a missing comment tag on line 233, and it's in php-4.3.10, too. It's been bugzilla'd.) I've given up on rebuilding from the current src.rpm that Red Hat is currently shipping. I've got a working solution, and compiling from the current source tree is pretty trivial. I'll try it again with the next PHP upgrade that Red Hat releases for this platform.
Interestingly enough, I just downloaded the source for php-4.3.2 from the PHP website, compiled it with just the --with-informix=/opt/informix flag, and lo and behold, it did create 'libphp4.so'. Thought you might like to know...
Hi all, I had the same problem with it... It resides in the spec file for the build that RedHat provides. Building PHP in two steps on diferent folders generates a mess in the Informix build, since it is generated in many diferent steps with intermediary so files generated with absolute path on the link. To solve it I remove the two pass build since it isn't really necessary (you can build the CLI and Apache modules at once) and the build completed like a charm. I'm sending you the patch for the spec file... Please note that I included some other DBs that I also use (DB2, OCI8, Interbase, Firebird and -sigh!- dbase). I also added the SNMP module support.
Created attachment 121117 [details] Patch to solve the Informix build problem on PHP Patch to be applied to the php.spec file
The PHP package as distributed in Red Hat Enterprise Linux cannot be built against third-party libraries. PHP extension modules can be packaged using separate source/binary RPMs rather than by modifying the PHP source RPM. This will eliminate the need to rebuild the source RPM after every update.