Re: [exim] error building on gentoo Linux (4.22) "undefined …

Góra strony
Delete this message
Reply to this message
Autor: Chad Leigh -- Shire.Net LLC
Data:  
Dla: Exim User's Mailing List
Temat: Re: [exim] error building on gentoo Linux (4.22) "undefined reference to `db_create'"
Hi

Ok, I got it built. It appears that the libdb-4.1.so (/usr/lib) that
you get on gentoo with emerge is "incomplete" or something but if I use
the one I compiled from Sleepycat directly (in /usr/local/lib in my
case) it is fine. I am not a Linux/gcc build guru but it appears that
the ldconfig stuff only affects at runtime, not compile time? The
ldconfig shows the /usr/local/lib version listed first but the /usr/lib
was being used to compile. I had to explicitly stick a
-L/usr/local/lib in the DBMLIB line of the Makefile-Linux makefile in
the OS directory.

My running exim binary also got fixed by making sure any damage I did
to the libdb load priorities and library files was fixed :-)

Best
Chad

On Sep 3, 2004, at 12:53 PM, Chad Leigh -- Shire.Net LLC wrote:

> Anybody have any ideas on this?
>
> Once I started trying to build this new exim, my running exim now
> won't complete deliveries with the error:
>
> /usr/local/bin/exim: error while loading shared libraries:
> /usr/local/bin/exim: undefined symbol: db_create
>
> so I need to get this solved asap as no one has gotten mail in the
> last day and a half, it appears...
>
> Looking at the output of ldconfig there is a libdb available and it is
> the same one as before as far as I can tell. I have also tried to
> emerge a new libdb (succesfully) and I still get the error below in
> building and the error above at runtime (of my current exim).
>
> I don't quite know what to do at this point.
>
> Thanks
> Chad
>
> On Sep 1, 2004, at 10:01 PM, Chad Leigh -- Shire.Net LLC wrote:
>
>> Well, as part of my test on why my exim started to behave differently
>> (see 503 AUTH post) when I switched out Mandrake and put gentoo
>> underneath it, I decided to rebuild my exim binaries on the new
>> system, using the same source (exim 4.22)and Local/Makefile that I
>> had used for the current binaries.
>>
>> I did a make clean and then a make makefile and a make and I get this:
>>
>> gcc -o exim_dbmbuild exim_dbmbuild.o \
>> -lnsl -lcrypt -ldb
>> exim_dbmbuild.o(.text+0x2be): In function `main':
>> : undefined reference to `db_create'
>> collect2: ld returned 1 exit status
>> make[1]: *** [exim_dbmbuild] Error 1
>> make[1]: Leaving directory `/space/kits/exim-4.22/build-Linux-i386'
>> make: *** [go] Error 2
>>
>>
>> I also tried it with libgdbm. Exact same error... Both libdb and
>> libgdbm are installed on the server and are found when doing ldconfig
>> -p .
>>
>> Here are the files in /usr/lib
>>
>> lrwxrwxrwx   1 root root      11 Sep  1 21:35 libdb-1.so -> 
>> libdb1.so.2
>> -rw-r--r--   1 root root 1081480 Sep  1 21:35 libdb-4.1.a
>> -rw-r--r--   1 root root     703 Sep  1 21:35 libdb-4.1.la
>> -rwxr-xr-x   1 root root  806640 Sep  1 21:35 libdb-4.1.so
>> lrwxrwxrwx   1 root root      11 Sep  1 21:35 libdb.a -> libdb-4.1.a
>> lrwxrwxrwx   1 root root      12 Sep  1 21:35 libdb.so -> libdb-4.1.so
>> lrwxrwxrwx   1 root root      11 Sep  1 21:35 libdb.so.2 -> 
>> libdb1.so.2
>> -rw-r--r--   1 root root  905870 Aug 31 02:02 libdb1.a
>> lrwxrwxrwx   1 root root      11 Sep  1 21:35 libdb1.so -> libdb1.so.2
>> -rwxr-xr-x   1 root root   58484 Aug 31 02:02 libdb1.so.2
>> -rw-r--r--   1 root root 1179106 Sep  1 21:35 libdb_cxx-4.1.a
>> -rw-r--r--   1 root root     731 Sep  1 21:35 libdb_cxx-4.1.la
>> -rwxr-xr-x   1 root root  874160 Sep  1 21:35 libdb_cxx-4.1.so
>> lrwxrwxrwx   1 root root      15 Sep  1 21:35 libdb_cxx.a -> 
>> libdb_cxx-4.1.a
>> lrwxrwxrwx   1 root root      16 Sep  1 21:35 libdb_cxx.so -> 
>> libdb_cxx-4.1.so
>> -rw-r--r--   1 root root   50634 Sep  1 21:23 libgdbm.a
>> -rwxr-xr-x   1 root root     466 Sep  1 21:23 libgdbm.la
>> lrwxrwxrwx   1 root root      16 Sep  1 21:23 libgdbm.so -> 
>> libgdbm.so.2.0.0
>> lrwxrwxrwx   1 root root      16 Sep  1 21:23 libgdbm.so.2 -> 
>> libgdbm.so.2.0.0
>> -rwxr-xr-x   1 root root   24972 Sep  1 21:23 libgdbm.so.2.0.0

>>
>> and the ldconfig stuff
>>
>>         libgdbm.so.3 (libc6) => /usr/local/lib/libgdbm.so.3
>>         libgdbm.so.2 (libc6) => /usr/lib/libgdbm.so.2
>>         libgdbm.so (libc6) => /usr/lib/libgdbm.so
>>         libgdbm.so (libc6) => /usr/local/lib/libgdbm.so
>>         libdb_cxx-4.1.so (libc6) => /usr/lib/libdb_cxx-4.1.so
>>         libdb.so.2 (libc6) => /usr/lib/libdb.so.2
>>         libdb-4.1.so (libc6) => /usr/lib/libdb-4.1.so
>>         libdb-4.1.so (libc6) => /usr/local/lib/libdb-4.1.so

>>
>> (the ones in /usr/local/lib are also really there)
>>
>> I have not had this problem before building exim. I am normally a
>> BSD person and use FreeBSD and have not had a problem there nor did I
>> have a problem previously on this customer Linux box.
>>
>> Any of you who are better Linux gurus in terms of building stuff;
>> thoughts and hints would be appreciated.
>>
>> Thanks
>> Chad
>>
>>
>> --
>> ## List details at http://www.exim.org/mailman/listinfo/exim-users
>> Exim details at http://www.exim.org/ ##
>
>
> --
> ## List details at http://www.exim.org/mailman/listinfo/exim-users
> Exim details at http://www.exim.org/ ##