|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28564 Compiling informix extension fails if compiling out of tree
Submitted: 2004-05-29 01:21 UTC Modified: 2004-05-30 19:57 UTC
From: roques at mti dot ag Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.3.7RC1 OS: Debian GNU/Linux Sarge
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: roques at mti dot ag
New email:
PHP Version: OS:


 [2004-05-29 01:21 UTC] roques at mti dot ag
1) A harmless error in the Makefile, which only occurs on out of tree builds is not ignored and causes make to abort.
2) The resulting module is empty, because HAVE_IFX is not defined, because config.h is not included.

Both of these problems can be fixed by applying the following patch:

diff -wurd php-4.3.7RC1.orig/ext/informix/Makefile.frag php-4.3.7RC1/ext/informix/Makefile.frag
--- php-4.3.7RC1.orig/ext/informix/Makefile.frag        2002-06-13 20:01:41.000000000 -0400
+++ php-4.3.7RC1/ext/informix/Makefile.frag     2004-05-28 19:17:05.000000000 -0400
@@ -1,7 +1,9 @@
+OVERALL_TARGET += $(srcdir)/ifx.c
 $(srcdir)/ifx.c: $(srcdir)/ $(builddir)/libphpifx.a
        (if test -d $(INFORMIXDIR); then \
-          THREADLIB=POSIX $(INFORMIXDIR)/bin/esql -e $(IFX_ESQL_FLAGS) $(srcdir)/; mv ifx.c $@; \
+          THREADLIB=POSIX $(INFORMIXDIR)/bin/esql -e $(IFX_ESQL_FLAGS) $(srcdir)/; \
+          mv ifx.c $@ || true; \
         else \
           touch $@; \
diff -wurd php-4.3.7RC1.orig/ext/informix/ php-4.3.7RC1/ext/informix/
--- php-4.3.7RC1.orig/ext/informix/       2003-11-02 19:14:06.000000000 -0400
+++ php-4.3.7RC1/ext/informix/    2004-05-28 19:17:05.000000000 -0400
@@ -37,6 +37,10 @@
 /* prevent mod_ssl.h's header file from being included. */
 #define AP_HOOK_H
+# include "config.h"
 #include "php.h"
 #include "php_globals.h"
 #include "ext/standard/php_standard.h"

Reproduce code:
curry:/tmp% cp -a php-4.3.7RC1/ext/informix /tmp
curry:/tmp% cd informix 
curry:/tmp/informix% phpize 
Configuring for:
  PHP Api Version:   20020918
  Zend Module Api No:   20020429
  Zend Extension Api No:   20021010
curry:/tmp/informix% ./configure
curry:/tmp/informix% make
/bin/sh /tmp/informix/libtool --mode=link gcc /usr/local/informix/lib/esql/checkapi.o -o libphpifx.a
mkdir .libs
ar cru libphpifx.a 
ranlib libphpifx.a
(if test -d /usr/local/informix; then \
   THREADLIB=POSIX /usr/local/informix/bin/esql -e -EDHAVE_IFX_IUS /tmp/informix/; mv ifx.c /tmp/informix/ifx.c; \
 else \
   touch /tmp/informix/ifx.c; \
mv: `ifx.c' and `/tmp/informix/ifx.c' are the same file
make: *** [/tmp/informix/ifx.c] Error 1

This is the first problem.  It can be fixed by replacing:
  mv ifx.c $@
  mv ifx.c $@ || true
to make make ignore the error, or by explicitely telling make to ignore all errors in this recipe.

When this problem has been fixed make generates a shared PHP-extension named  This extension is unusable, becuase it is empty.  The reason for this is, that does not include config.h and thus HAVE_IFX in not defined and the contents of the module is ommitted.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-30 19:57 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Mar 24 07:03:43 2023 UTC