sendmail 8.14.2 and Berkeley DB build problem
am 09.11.2007 10:34:33 von andy thomas
I'm trying to build sendmail 8.14.2 with NEWDB support (for virtual domain
support using the virtusertable feature) on Solaris 9 using Berkely DB
4.6.21.NC (the version with no compression). My ../devtools/site.config.m4
has the following lines:
APPENDDEF(`confENVDEF', `-UNDBM -DNEWDB')
APPENDDEF(`confINCDIRS', `-I/usr/local/BerkeleyDB/include')
to first remove support for NDBM and replace it with NEWDB and then add
the path to the BerkeleyDB include files. But the build fails with the
following undefined symbols (see below). Exactly the same thing happens
with the earlier version Berkeley DB 2.7.7. I'm using gcc 3.4.6 in
/usr/local/bin and my PATH is /usr/bin:/usr/local/bin:/usr/ccs/bin and
this seems to be a path or linker path issue - does anyone have any ideas?
gcc -o sendmail main.o alias.o arpadate.o bf.o collect.o conf.o
control.o convtime.o daemon.o deliver.o domain.o envelope.o err.o
headers.o macro.o map.o mci.o milter.o mime.o parseaddr.o queue.o
ratectrl.o readcf.o recipient.o sasl.o savemail.o sfsasl.o shmticklib.o
sm_resolve.o srvrsmtp.o stab.o stats.o sysexits.o timers.o tls.o trace.o
udb.o usersmtp.o util.o version.o
/export/home/cyber/development/installation/sendmail-8.14.2/ obj.SunOS.5.9.sun4/libsmutil/libsmutil.a
/export/home/cyber/development/installation/sendmail-8.14.2/ obj.SunOS.5.9.sun4/libsm/libsm.a
-lresolv -lsocket -lnsl
Undefined first referenced
symbol in file
db_create map.o
db_version conf.o
ld: fatal: Symbol referencing errors. No output written to sendmail
collect2: ld returned 1 exit status
make: *** [sendmail] Error 1
Andy
-------------------------------------------
Andy Thomas,
Time Domain Systems
Tel: +44 (0)7866 556626
Fax: +44 (0)20 8372 2582
http://www.time-domain.co.uk
Re: sendmail 8.14.2 and Berkeley DB build problem
am 09.11.2007 14:32:44 von Gary Mills
In andy thomas writes:
>I'm trying to build sendmail 8.14.2 with NEWDB support (for virtual domain
>support using the virtusertable feature) on Solaris 9 using Berkely DB
>4.6.21.NC (the version with no compression). My ../devtools/site.config.m4
>has the following lines:
> APPENDDEF(`confENVDEF', `-UNDBM -DNEWDB')
> APPENDDEF(`confINCDIRS', `-I/usr/local/BerkeleyDB/include')
You likely need something like this:
APPENDDEF(`confLIBS', `-ldb')
although it might need to be `-ldb4' depending on how the library's
named. I'll include my entire site.config.m4 below. Beware that it
includes features and versions that you may not want.
>Undefined first referenced
> symbol in file
>db_create map.o
>db_version conf.o
define(`confCC', `cc')
define(`confDEPEND_TYPE', `Solaris')
define(`confMAPDEF', `-DNEWDB')
define(`confINSTALL', `/usr/ucb/install')
define(`confLIBSEARCH', `')
APPENDDEF(`confENVDEF', `-DSASL=20118')
APPENDDEF(`conf_sendmail_ENVDEF', `-D_REENTRANT')
APPENDDEF(`conf_sendmail_ENVDEF', `-DSTARTTLS -DHASURANDOMDEV')
APPENDDEF(`conf_sendmail_ENVDEF', `-DMILTER')
APPENDDEF(`conf_libmilter_ENVDEF', `-DSM_CONF_POLL')
APPENDDEF(`confINCDIRS', `-I/usr/local/src/cyrus/libsasl-2.1.18x/include')
APPENDDEF(`confINCDIRS', `-I/usr/local/src/OpenSSL/openssl-0.9.8f/include')
APPENDDEF(`confINCDIRS', `-I/usr/local/src/db/db-3.1.17/build_unix')
APPENDDEF(`confLIBDIRS', `-L/usr/local/src/cyrus/libsasl-2.1.18x/lib')
APPENDDEF(`confLIBDIRS', `-L/usr/local/src/OpenSSL/openssl-0.9.8f/lib')
APPENDDEF(`confLIBDIRS', `-L/usr/local/src/db/db-3.1.17/build_unix')
APPENDDEF(`confLIBDIRS', `-R/usr/local/lib')
APPENDDEF(`confLIBS', `-ldb')
APPENDDEF(`conf_sendmail_LIBS', `-lsasl2 -lthread')
APPENDDEF(`conf_sendmail_LIBS', `-lssl -lcrypto')
APPENDDEF(`conf_sendmail_LIBS', `-lresolv')
--
-Gary Mills- -Unix Support- -U of M Academic Computing and Networking-
Re: sendmail 8.14.2 and Berkeley DB build problem
am 09.11.2007 17:21:16 von andy thomas
On Fri, 9 Nov 2007, Gary Mills wrote:
>
>
> In andy thomas writes:
>
>> I'm trying to build sendmail 8.14.2 with NEWDB support (for virtual domain
>> support using the virtusertable feature) on Solaris 9 using Berkely DB
>> 4.6.21.NC (the version with no compression). My ../devtools/site.config.m4
>> has the following lines:
>
>> APPENDDEF(`confENVDEF', `-UNDBM -DNEWDB')
>> APPENDDEF(`confINCDIRS', `-I/usr/local/BerkeleyDB/include')
>
> You likely need something like this:
>
> APPENDDEF(`confLIBS', `-ldb')
>
> although it might need to be `-ldb4' depending on how the library's
> named. I'll include my entire site.config.m4 below. Beware that it
> includes features and versions that you may not want.
Thanks for this - you've put me on the right track and it's now working. I
first tried adding the APPENDDEF(`confLIBS', `-ldb4') line as in your
site.config.m4 but this didn't seem to work. Then I added
/usr/local/BerkeleyDB/lib to my /var/ld/ld.config with the crle utility as
well as adding the line:
APPENDDEF(`confLIBDIRS', `-L/usr/local/BerkeleyDB/lib')
to my site.config.m4 and this time the compile almost completed except at
the end I was getting the '-ldb4 not found' error message. But I found if
I omitted the APPENDDEF(`confLIBS', `-ldb4') altogther, the compilation
would complete. So my site.config.m4 now reads:
APPENDDEF(`confENVDEF', `-UNDBM')
define(`confMAPDEF', `-DNEWDB')
APPENDDEF(`confINCDIRS', `-I/usr/local/BerkeleyDB/include')
APPENDDEF(`confLIBDIRS', `-L/usr/local/BerkeleyDB/lib')
APPENDDEF(`conf_sendmail_ENVDEF', `-DMILTER')
and the sendmail binary links to the following libraries:
# ldd sendmail
libdb-4.6.so => /usr/local/BerkeleyDB/lib/libdb-4.6.so
libresolv.so.2 => /usr/lib/libresolv.so.2
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libc.so.1 => /usr/lib/libc.so.1
librt.so.1 => /usr/lib/librt.so.1
libpthread.so.1 => /usr/lib/libpthread.so.1
libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libmp.so.2 => /usr/lib/libmp.so.2
libaio.so.1 => /usr/lib/libaio.so.1
libmd5.so.1 => /usr/lib/libmd5.so.1
/usr/platform/SUNW,UltraSPARC-IIi-cEngine/lib/libc_psr.so.1
libthread.so.1 => /usr/lib/libthread.so.1
/usr/platform/SUNW,UltraSPARC-IIi-cEngine/lib/libmd5_psr.so. 1
Thanks a lot!
cheers,
Andy