Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#21604 - [db] dbm compatibility missing in

Attached to Project: Arch Linux
Opened by Benoit Izac (benizac) - Thursday, 04 November 2010, 22:06 GMT
Last edited by Allan McRae (Allan) - Thursday, 11 November 2010, 04:21 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No


Since I upgraded db from 4.8.26-2 to 5.1.19-2, the dbm compatibility is missing:

$ cat test.c
#define DB_DBM_HSEARCH 1
#include <db.h>

int main(void) {
DBM *db = dbm_open("/dev/null", 0, 0600);
return 0;
$ gcc -ldb test.c
/tmp/ccvbSNOF.o: In function `main':
test.c:(.text+0x18): undefined reference to `__db_ndbm_open'
collect2: ld returned 1 exit status

This is a problem for application like inn who needs it in authprogs/ckpasswd.c.

Please add --enable-dbm to ../dist/configure.

Without --enable-dbm (current package):
$ nm /usr/lib/libdb.a 2>/dev/null | grep dbm_open
$ nm pkg/usr/lib/libdb.a 2>/dev/null | grep dbm_open
0000000000000050 T __db_ndbm_open
This task depends upon

Closed by  Allan McRae (Allan)
Thursday, 11 November 2010, 04:21 GMT
Reason for closing:  Implemented
Additional comments about closing:  db-5.1.19-3
Comment by Wilderman Ceren (m0n0lithic) - Monday, 08 November 2010, 04:00 GMT
Hi, since the last update of db and checking /var/ log/auth.log for the authentication process I realized that was not working pam_userdb module version of pam-1.1.1-2 generated an error like this:

PAM unable to dlopen(/lib/security/ /lib/security/ undefined symbol: __db_ndbm_firstkey
PAM adding faulty module: /lib/security/

verifying resolved functions :
ldd -r /lib/security/ => (0x00007fff549ff000) => /lib/ (0x00007f831b4f8000) => /lib/ (0x00007f831b2f4000) => /usr/lib/ (0x00007f831af72000) => /lib/ (0x00007f831ad3b000) => /lib/ (0x00007f831a9de000)
/lib/ (0x00007f831b913000) => /lib/ (0x00007f831a7c0000)
undefined symbol: __db_ndbm_firstkey (/lib/security/
undefined symbol: __db_ndbm_open (/lib/security/
undefined symbol: __db_ndbm_nextkey (/lib/security/
undefined symbol: __db_ndbm_close (/lib/security/
undefined symbol: __db_ndbm_fetch (/lib/security/

It is possible to repair it with the suggested parameter:

Fix using ABS:
add --enable-dbm to PKGBUILD build() ./configure of last db abs-source:

build() {
cd ${srcdir}/$pkgname-${_basever}/build_unix
../dist/configure --prefix=/usr --enable-compat185 \
--enable-shared --enable-static --enable-cxx --enable-dbm

[wceren@canete db]$ makepkg -s
$ sudo pacman -U db-5.1.19-2-x86_64.pkg.tar.xz
$ ldd -r /lib/security/ => (0x00007fff2a688000) => /lib/ (0x00007f8536ef7000) => /lib/ (0x00007f8536cf3000) => /usr/lib/ (0x00007f8536970000) => /lib/ (0x00007f8536739000) => /lib/ (0x00007f85363dc000)
/lib/ (0x00007f8537312000) => /lib/ (0x00007f85361be000)

;-) It's fun, now PAM-BerkeleyDB Auth it's functional!