[SUMMARY]Problems compiling sendmail 8.9.0

From: Larry Griffith <larry_at_garfield.wsc.mass.edu>
Date: Thu, 04 Jun 1998 15:19:58 -0400

Dear Managers,

    With the help of Amy Adams of Sleepycat Software (whose help was
even faster than this list and that's saying something!) the problem
has been located:

    The -L switch on cc (and gcc) is broken (which probably means it's
broken on ld), at least in version 4.0B, patchlevel 6. I verified
this not only with sendmail but with unrelated software loading both
libraries from /usr/local/lib and personal libraries from my own
directories. The -L switch is simply ignored in all cases.

    Three possible fixes:

    i) My fix was to edit the Build routine in sendmail-8.9.0/src to
allow the Makefile to be edited on the fly (put a call to emacs or
your favorite editor before the last line) after it's created, then in
Makefile remove references to -ldb (and -lresolv if you're using the
new BIND); then insert /usr/local/lib/libdb.a (and
/usr/local/bind/lib/libbind.a) explicitly into the command that links
sendmail itself.

    ii) Robert Benites <benites_at_cs.unca.edu> mentioned that he used the
DB1.85 built into DU (he has 4.0D) without trouble, despite the
warnings in the sendmail 8.9.0 documentation.

    iii) I didn't try it, but maybe moving /usr/include/db.h and
/usr/lib/libdb.a to backup files and putting the new files in their
place while sendmail is compiled would work, too.

    sendmail now compiles; I have to prepare for a brief trip out of
town so testing will come later. Thanks for all the help!


Original post and follow-up
-------- ---- --- ---------

     No joy on this one. I did receive two responses, asking whether
I had included the proper link options (yes I had and the sendmail
Build script was indeed transmitting them to the cc command used to
link). Arrigo suggested check for patches at www.sendmail.com (not
.org). I tried this but could not locate any.

     On my own I tried recompiling the DB 2.4.10 package with my
original configuration (C++ support and DB 1.85 compatibility) and
with the basic configuration (no options). The sendmail build script
reacted in exactly the same way: "db_open" unresolved. I also tried
putting the correct db library into the cc command explicitly, without
using the link flags. That also failed in exactly the same way.

     Finally I tried writing a simple C program of my own that just
basically just consists of a call to db_open. I compiled with the
correct -L and -I options. The link failed in exactly the same way:
"db_open" is unresolved.

     The only conclusion I can come to is that DB 2.4.10 has a serious
bug in it. I'll try contacting sleepcat to see if I can find out
anything.

     As far as sendmail is concerned, the only thing I can think of at
this point is to remove the NEWDB support (I already removed NIS since
that seems to cause problems on my system) and rely solely on NDBM.
This does at least compile, although I have not tested it further as
yet.

Responses from and thanks to:

Arrigo Triulzi <arrigo_at_albourne.com>
"Allen, Mark R (PBD)" <Mark.Allen_at_pbdir.com>

Original post
-------- ----

          I've been trying to compile sendmail 8.9.0. I have
installed bind-8.1.2 and db-2.4.10 (the latter as recommended in the
sendmail documentation). The libraries and include files for both are
installed in the default locations under /usr/local.

          I had to patch src/sendmail.h and src/map.c because of a
compiler error concerning the declaration of "map_rewrite". I put a

         #define MAP_REWRITE_FIX

before the #include "sendmail.h" in map.c and surrounded the
prototype of "map_rewrite" in sendmail.h with a preprocessor test of
this symbol.

          Once you do this, the following command compiles all of the
sendmail files, but fails to link sendmail itself:

         ./Build -L/usr/local/lib -L/usr/local/bind/lib
-I/usr/local/include -I/usr/local/bind/include

(this is on one line)

          The linker error complains that "db_open" is unresolved.

          I checked the db-2.4.10 software; there is indeed a db_open
function in it. The command

          nm /usr/local/lib/libdb.a | grep "db_open"

seems to show the presence of db_open. What am I doing wrong here?


                                                Larry

============================================================================
Larry Griffith Dept. of Computer & Info Science
larry_at_garfield.wsc.mass.edu Westfield State College
(413) 572-5294 Westfield, MA 01086 USA
PGP public key available at: http://garfield.wsc.mass.edu/dcis/griffith.html
============================================================================
Received on Thu Jun 04 1998 - 21:22:39 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:37 NZDT