|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30593 --with-ingres option generates broken Makefile
Submitted: 2004-10-28 02:07 UTC Modified: 2005-05-20 18:15 UTC
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: sean dot lincolne at gmail dot com Assigned:
Status: Closed Package: Ingres II related
PHP Version: 5CVS, 4CVS (2005-02-17) OS: *
Private report: No CVE-ID: None
 [2004-10-28 02:07 UTC] sean dot lincolne at gmail dot com
Configuring a PHP build with the '--with-ingres' option results in an incomplete Makefile.  When you attempt to make PHP the make fails.

If you manually edit the Makefile after configure, and add '-lpthread' to the 'EXTRA_LIBS' line the make will complete successfully.

Specifiying the '--with-tsrm-pthreads' as a configure option does not fix this.

Can someone examine the Ingres build code in PHP and ensure that when the '--with-ingres' option is specified the 'libpthread' library is included in the library list ?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-28 08:11 UTC]
Please provide your 1. configure line, 2. the error itself, 3. a link to the output of config.log (do not paste it here!)
 [2004-10-31 04:44 UTC] sean dot lincolne at gmail dot com
Configuration command as follows:

./configure --with-apxs --without-mysql \
	--with-ingres --with-ldap \
	--without-pear --disable-shared \
	--enable-static --with-tsrm-pthreads

Make fails with the following error:

/opt/ingres/lib/libingres.a(louniq.o): In function `LOuniq':
louniq.o(.text+0x16d): the use of `mktemp' is dangerous, better use `mkstemp'
/opt/ingres/lib/libingres.a(mepages.o): In function `IIMEget_pages':
mepages.o(.text+0x1c5): undefined reference to `pthread_mutex_trylock'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
[root@toshiba php-4.3.9]#

The 'config.log' file can be found at


 [2004-11-24 01:35 UTC]
WHY do you want to use the --with-tsrm-phtreads option?
You're compiling an apache 1.x module which isn't multithreaded..

 [2004-11-24 07:36 UTC] sean dot lincolne at gmail dot com
I was trying everything to see if I could force 'configure' to recognise that it needs the 'libpthread' library.

Either way it has no impact on the problem, nor does it impact on the use of libpthread.  Currently the only workaround is to manually edit 'Makefile' after 'configure' but before 'make'.  Not particularly friendly or elegant.
 [2005-03-21 16:38 UTC] grant dot croker at ca dot com
This is happening because config.m4 uses the static ingres libraries libingres.a and libiiapi.a. Changing this file to use the correct shared libs allows the build to complete without hacking any Makefile also has the added feature of enabling the build of an ingres shared module. See below for a cvs diff. This diff applies to all versions of PHP from 4.3 upwards.

Index: ext/ingres_ii/config.m4
RCS file: /repository/php-src/ext/ingres_ii/config.m4,v
retrieving revision
diff -u -b -w -B -d -r1.8.4.1 config.m4
--- ext/ingres_ii/config.m4     23 Jan 2003 05:33:17 -0000
+++ ext/ingres_ii/config.m4     21 Mar 2005 15:35:13 -0000
@@ -29,7 +29,9 @@
     AC_MSG_ERROR(Cannot find libiiapi.a under $II_DIR/lib)

 [2005-05-20 18:15 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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 21:01:31 2024 UTC