perl build problems, chapter 5

Bruce Dubbs bruce.dubbs at
Sun Jul 3 12:03:14 PDT 2011

Nathan Coulson wrote:
> On Sun, Jul 3, 2011 at 3:26 AM, Andrew Benton <b3nton at> wrote:
>> On Sat, 2 Jul 2011 19:26:34 -0700
>> Nathan Coulson <conathan at> wrote:
>>> Checking for optional libraries...
>>> What libraries to use?
>>> [-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat -lpthread]

>>> I've tried to compile and run the following simple program:
>>> #include <stdio.h>
>>> int main() { printf("Ok\n"); return(0); }
>>> I used the command:
>>> $ cc -o try -O2 -fno-strict-aliasing -pipe -fstack-protector
>>> -fstack-protector try.c -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
>>> -lgdbm_compat -lpthread
>>> $ ./try
>>> and I got the following output:
>>> cannot find -lgdbm
>>> cannot find -ldb
>>> collect2: ld returned 1 exit status
>>> I can't compile the test program.
>>> You have a BIG problem. Â Shall I abort Configure [y]
>>> Ok. Â Stopping Configure.
>>> must have picked up that I had gdbm and db on the host somehow

In my test logs, I have

What libraries to use? [-lnsl -ldl -lm -lcrypt -lutil -lc]

I do have /usr/lib/libgdbm.{a,so,so.3,so.3.0.0}, but not /usr/lib/libdb*.

> -Dnoextensions=GDBM_File fixed it for me,  but never had time to hunt
> down the reason yet

It looks like a partial installation to me where configure finds some 
parts and thinks it can use libdb, but then can't.  If it did build that 
in, it looks like it might cause a problem in Chapter 6.

   -- Bruce

More information about the lfs-dev mailing list