[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

BerkeleyDB Perl module on potato (slightly long)



Hi,

I've spent some time trying to get the BerkeleyDB module to build on
potato (and been quietly going insane in the process).

I've got libc6, libc6-dev, libdb2 and libdb2-dev from woody installed.

I've successfully built the BerkeleyDB module, but on running the tests I
get:

BerkeleyDB needs compatible versions of libdb & db.h
        you have db.h version 2.7.7 and libdb version 2.4.14

At this point, I scream at my computer, harass the libdb2/libdb2-dev
package maintainer etc etc, but after rereading this chunk of the README
for the BerkeleyDB Perl module:

Newer versions of Linux (e.g. RedHat 6, SuSe 6) ship with a C library
that has version 2.x of Berkeley DB linked into it. This makes it
difficult to build this module with anything other than the version of
Berkeley DB that shipped with your Linux release. If you do try to use
a different version of Berkeley DB you will most likely get the error
described in the "Incompatible versions of db.h and libdb" section of
this file.

The penny finally dropped tonight. Perl's linked against something
different:

daedalus:~/.cpan/build/BerkeleyDB-0.14# ldd /usr/bin/perl
        libnsl.so.1 => /lib/libnsl.so.1 (0x4001b000)
        libdb.so.3 => /lib/libdb.so.3 (0x40030000)
        libgdbm.so.1 => /usr/lib/libgdbm.so.1 (0x4006c000)
        libdl.so.2 => /lib/libdl.so.2 (0x40072000)
        libm.so.6 => /lib/libm.so.6 (0x40075000)
        libc.so.6 => /lib/libc.so.6 (0x40093000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x401a2000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

daedalus:~/.cpan/build/BerkeleyDB-0.14# ls -l /lib/libdb.so.3
lrwxrwxrwx    1 root     root           19 Apr  3 19:43 /lib/libdb.so.3 ->
/lib/libdb-2.2.2.so

daedalus:~/.cpan/build/BerkeleyDB-0.14# ls -l /lib/libdb-2.2.2.so
-rw-r--r--    1 root     root       237900 Feb 17 03:58
/lib/libdb-2.2.2.so

daedalus:~/.cpan/build/BerkeleyDB-0.14# ldd
blib/arch/auto/BerkeleyDB/BerkeleyDB.so
        libdb2.so.2 => /usr/lib/libdb2.so.2 (0x40016000)
        libc.so.6 => /lib/libc.so.6 (0x4005b000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

So while I'm building my BerkeleyDB stuff against the right BerkeleyDB
libraries and stuff, Perl itself appears to be hardlinked against an older
libdb.

(For the heck of it I symlinked /lib/libdb.so.3 to /usr/lib/libdb2.so.2,
lo and behold, the module started working (it passed a "make test" at
least), but things like Sendmail's makemap started bleating).

So, how screwed am I? Do I have to roll my own Perl? Do I have to resort
to other feral workarounds as described in the README that comes with the
module?

In short, has anyone else been here?

Andrew



Reply to: