Can not link with GDBM

egor at scatisp.ru egor at scatisp.ru
Sun Jan 25 12:33:07 PST 2004


Hello All,

I'm trying to build one weird piece of software (ifmail from http://ifmail.sf.net) and
getting problem with GDBM. Ifmail could not link with libgdbm with the following error:

gcc -O2 -Wall make_new_ref.o ref.o -lgdbm -lresolv -o make_new_ref
ref.o(.text+0x15): In function `ref_init':
: undefined reference to `dbm_open'
ref.o(.text+0x172): In function `ref_store_extended':
: undefined reference to `dbm_store'
ref.o(.text+0x232): In function `ref_get_extended':
: undefined reference to `dbm_fetch'
ref.o(.text+0x2c5): In function `ref_deinit':
: undefined reference to `dbm_close'
ref.o(.text+0x2eb): In function `ref_first_key':
: undefined reference to `dbm_firstkey'
ref.o(.text+0x35f): In function `ref_next_key':
: undefined reference to `dbm_nextkey'
ref.o(.text+0x415): In function `ref_cleanup':
: undefined reference to `dbm_firstkey'
ref.o(.text+0x464): In function `ref_cleanup':
: undefined reference to `dbm_fetch'
ref.o(.text+0x561): In function `ref_cleanup':
: undefined reference to `dbm_nextkey'
ref.o(.text+0x5e4): In function `ref_cleanup':
: undefined reference to `dbm_delete'
collect2: ld returned 1 exit status
make[1]: *** [make_new_ref] Error 1

You can see that -lgdbm is passed to linker but it still can not link with this
library. I check libgdbm with grep -r dbm_open /usr/lib/ and found

Binary file /usr/lib/libgdbm.so.3.0.0 matches
Binary file /usr/lib/libgdbm.so.3 matches
Binary file /usr/lib/libgdbm.so matches
Binary file /usr/lib/libgdbm.a matches
Binary file /usr/lib/libgdbm_compat.so.3.0.0 matches
Binary file /usr/lib/libgdbm_compat.so.3 matches
Binary file /usr/lib/libgdbm_compat.so matches
Binary file /usr/lib/libgdbm_compat.a matches

among output lines. I did ldconfig also. So I got valid headers, valid libs but still
can not links. Could anyone point me to the right direction (man, info page, etc)?

Regards,
Egor Pervouninski






More information about the blfs-support mailing list