php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6612 -lgdbm link failure because configure does to add -L/usr/pkg/lib
Submitted: 2000-09-07 15:16 UTC Modified: 2000-09-29 08:54 UTC
From: cahagn_o at epita dot fr Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0 Latest CVS (07/09/2000) OS: NetBSD 1.4.2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: cahagn_o at epita dot fr
New email:
PHP Version: OS:

 

 [2000-09-07 15:16 UTC] cahagn_o at epita dot 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-10 17:09 UTC] cahagn_o at epita dot 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-12 02:52 UTC] cahagn_o at epita dot 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-29 08:54 UTC] sniper@php.net
Fixed in CVS.

--Jani
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 11:00:01 2026 UTC