Bug 143183 - Compile from source fails when Informix support is added
Compile from source fails when Informix support is added
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: php (Show other bugs)
3.0
ia64 Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
David Lawrence
http://bugs.php.net/bug.php?id=28719
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-17 01:40 EST by Brad Kittredge
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-04-03 10:59:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description Brad Kittredge 2004-12-17 01:40:08 EST
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:
Comment 1 Joe Orton 2004-12-17 04:20:26 EST
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 12:27:00 EST
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.
Comment 3 Brad Kittredge 2004-12-20 12:11:30 EST
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.
Comment 4 Brad Kittredge 2004-12-22 17:13:14 EST
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 17:23:16 EST
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...
Comment 6 Juvenal A. Silva Jr. 2005-11-16 06:07:55 EST
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 06:09:34 EST
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 10:59:54 EDT
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.