Re: [exim] Solved compilation failure with gdbm library (was…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Adam Nielsen
Dátum:  
Címzett: exim-users
Régi témák: Re: [exim] How do you get multiple messages sent via the same smarthost SMTP connection?
Tárgy: Re: [exim] Solved compilation failure with gdbm library (was: How do you get multiple messages sent via the same smarthost SMTP connection?)
> Perhaps it's not even trying to link in the gdbm library?

I've done some more digging and found the command it's using to compile
and that is indeed the case:

$ gcc -o exim_dbmbuild exim_dbmbuild.o -lnsl -lcrypt -lm -ldb
exim_dbmbuild.o(.text+0x458): In function `main':
: undefined reference to `gdbm_open'
exim_dbmbuild.o(.text+0x62f): In function `main':
: undefined reference to `gdbm_store'
exim_dbmbuild.o(.text+0x6bc): In function `main':
: undefined reference to `gdbm_store'
exim_dbmbuild.o(.text+0x94c): In function `main':
: undefined reference to `gdbm_store'
exim_dbmbuild.o(.text+0x9e0): In function `main':
: undefined reference to `gdbm_store'
exim_dbmbuild.o(.text+0xa63): In function `main':
: undefined reference to `gdbm_close'
collect2: ld returned 1 exit status

If I change it from the "db" library to "gdbm" then it works:

$ gcc -o exim_dbmbuild exim_dbmbuild.o -lnsl -lcrypt -lm -lgdbm
$ ./exim_dbmbuild /etc/aliases test.db
18 entries written

So it looks like the Makefile isn't pulling in the correct library when
USE_GDBM=yes.

I edited the generated Makefile by hand and changed the library:

DBMLIB = -lgdbm

And this appears to have worked fine - I recompiled Exim and installed
it and I don't get any of those failed/success errors any more! Now I
can go back to investigating the original problem :-)

Cheers,
Adam.