PHP 4.0 Bug #6612 Updated: -lgdbm link failure because configure does to add -L/usr/pkg/lib

From: Date: Fri, 29 Sep 2000 12:54:39 +0000
Subject: PHP 4.0 Bug #6612 Updated: -lgdbm link failure because configure does to add -L/usr/pkg/lib
Groups: php.dev 
Request: Send a blank email to php-dev+get-33852@lists.php.net to get a copy of this message
ID: 6612 Updated by: sniper Reported By: cahagn_o@epita.fr Status: Closed Bug Type: Compile Failure Assigned To: Comments: Fixed in CVS. --Jani Previous Comments: --------------------------------------------------------------------------- [2000-09-12 02:52:50] cahagn_o@epita.fr Bug solved if I configure it this way: ./configure --with-gdbm=/usr/pkg it compiles and runs fine. I think there's a bug in ext/db/config.m4 because I can't know _before_ compiling what dbm is going to be preferred. When finding gdbm, on NetBSD at least, /usr/pkg/lib should be added. AC_ADD_LIBPATH missing statement ? --------------------------------------------------------------------------- [2000-09-10 17:09:00] cahagn_o@epita.fr The Short Desc.: should be read as: -lgdbm link failure because configure does not add -L/usr/pkg/lib Sorry about the typo. I just checked ext/db/config.m4 and there seems to be no AC_ADD_LIBPATH(), can this be the reason ? I had another report that it does not work either with dynamic module under NetBSD 1.4.2: bash-2.03# apachectl restart /usr/pkg/sbin/apachectl restart: httpd not running, trying to start /usr/libexec/ld.so: Undefined symbol "_gdbm_version" in httpd:/usr/pkg/lib/httpd/libphp4.so BTW, why is db support (through gdbm, ndbm, etc.) mandatory ? --------------------------------------------------------------------------- [2000-09-07 15:16:55] cahagn_o@epita.fr Here's a simple bug to solve leading to compile failure: configure finds gdbm.h and compiles the test program fine but forgets to add the path (/usr/pkg/lib) to the Makefile compilation fails with this message: Making all in . /bin/sh /nfs/s5/space/users/guest/www/compil/t/php4-200009071045/libtool --silent --mode=link gcc -I. -I/nfs/s5/space/users/guest/www/compil/t/php4-200009071045/ -I/nfs/s5/space/users/guest/www/compil/t/php4-200009071045 -I/nfs/s5/space/users/guest/www/compil/t/php4-200009071045/main -I/nfs/s5/space/users/guest/www/compil/t/php4-200009071045/Zend -I/nfs/s5/space/users/guest/www/compil/t/php4-200009071045 -I/nfs/s5/space/users/guest/www/compil/t/php4-200009071045/ext/mysql/libmysql -I/nfs/s5/space/users/guest/www/compil/t/php4-200009071045/ext/xml/expat/xmltok -I/nfs/s5/space/users/guest/www/compil/t/php4-200009071045/ext/xml/expat/xmlparse -I/nfs/s5/space/users/guest/www/compil/t/php4-200009071045/TSRM -I/usr/pkg/include -DXML_BYTE_ORDER=12 -g -O2 -o php -export-dynamic stub.lo libphp4.la ld: -lgdbm: no match collect2: ld returned 1 exit status *** Error code 1 Stop. *** Error code 1 Stop. NetBSD 1.4.2 egcs 2.91.60 snapshot 200009071045 configure line: ./configure --with-config-file-path=/tmp Here's what config.log says: configure:10016: db1/ndbm.h: No such file or directory configure: failed program was: #line 10015 "configure" #include "confdefs.h" #include <db1/ndbm.h> configure:10053: checking for gdbm_open in -lgdbm configure:10072: gcc -o conftest -g -O2 -I/usr/pkg/include -L/usr/pkg/lib conf test.c -lgdbm -lresolv -lm -lcrypt -lresolv 1>&5 configure:10226: checking preferred dbm library configure:10247: checking for gdbm.h configure:10257: gcc -E -I/usr/pkg/include conftest.c >/dev/null 2>conftest.out configure:10537: checking whether to enable DBA configure:10791: checking for GDBM support configure:11026: checking for NDBM support --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=6612

« previous php.dev (#33852) next »