Bug 143183 - Compile from source fails when Informix support is added
Summary: Compile from source fails when Informix support is added
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: php   
(Show other bugs)
Version: 3.0
Hardware: ia64
OS: Linux
Target Milestone: ---
Assignee: Joe Orton
QA Contact: David Lawrence
URL: http://bugs.php.net/bug.php?id=28719
Depends On:
TreeView+ depends on / blocked
Reported: 2004-12-17 06:40 UTC by Brad Kittredge
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-04-03 14:59:54 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to solve the Informix build problem on PHP (3.12 KB, patch)
2005-11-16 11:09 UTC, Juvenal A. Silva Jr.
no flags Details | Diff

Description Brad Kittredge 2004-12-17 06:40:08 UTC
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):

How reproducible:

Steps to Reproduce:
1.rpmbuild -ba /path/to/php.spec

Actual Results:  Same error

Expected Results:  Informix support enabled.

Additional info:

Comment 1 Joe Orton 2004-12-17 09:20:26 UTC
If you can work out what needs to be done to fix this we can integrate
the necessary changes.

Comment 2 Brad Kittredge 2004-12-19 17:27:00 UTC
By adding the following to /etc/ld.so.conf:


and running 'ldconfig' I'm able to get past the previous problem. 
Build still fails though, with this output:

Installing PHP SAPI module
+ popd
+ 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
install: cannot stat `build-apache/libs/libphp4.so': No such file or
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.

Comment 3 Brad Kittredge 2004-12-20 17:11:30 UTC
Sorry.  The previous comment only applies when the option:


is commented out in the SPEC file.  Remove the comment, and the
original error still applies.

Comment 4 Brad Kittredge 2004-12-22 22:13:14 UTC
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.

Comment 5 Brad Kittredge 2004-12-22 22:23:16 UTC
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

Thought you might like to know...

Comment 6 Juvenal A. Silva Jr. 2005-11-16 11:07:55 UTC
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.

Comment 7 Juvenal A. Silva Jr. 2005-11-16 11:09:34 UTC
Created attachment 121117 [details]
Patch to solve the Informix build problem on PHP

Patch to be applied to the php.spec file

Comment 8 Joe Orton 2007-04-03 14:59:54 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.