Compiling Sendmail on RedHat 9.0 was fun - definitely
worth posting a quick summary.
cd /usr/src/
# download fresh sendmail
tar xvzf sendmail.8.13.3.tar.gz
cd sendmail-8.13.3
./Build
./Build install
cd ..
/etc/init.d/sendmail start
After a default compilation, Sendmail 8.13.3
complains that "class hash not available".
It took me some time to accomplish the following
building procedure:
/etc/init.d/sendmail stop
Download fresh Berkeley DB (libdb), at the time of this
writing the fresh one is version 4.3.27. This can be
obtained at
http://www.sleepycat.com/
It appears that Sendmail fails to build against
BDB < 2.0 and 4.0 - 4.1.xx.
RedHat comes with libdb 4.0.
tar xvzf db-4.3.27.tar.gz
cd db-4.3.27
# what ho, no Makefile, no ./configure, no INSTALL ?
cd build_unix
../dist/configure
make
make install
cd ../..
This installed berkeley DB. It installs into its very
own directory, /usr/local/BerkeleyDB.4.3/ which is a
good thing. The RedHat distro is compiled against 4.0,
and we only want Sendmail to know about the fresh 4.3
- other apps compiled against 4.0 could possibly be confused.
# Let the system-wide ld know about the new library.
echo "/usr/local/BerkeleyDB.4.3/lib" >>/etc/ld.so.conf
ldconfig
cd sendmail-8.13.3
Now create a file under ./devtools/Site/ called site.config.m4 .
Check site.config.m4.sample in that same directory for a bit
of an explanation / example. Our custom site.config.m4 should
contain these two lines:
PREPENDDEF(`confLIBDIRS', `-L/usr/local/BerkeleyDB.4.3/lib')
PREPENDDEF(`confINCDIRS', `-I/usr/local/BerkeleyDB.4.3/include')
Obviously this should pass the right options to the compiler
and linker. Now that we have the site config, we can re-try
the build. Interestingly, if you run just ./Build, the updated
config won't take effect... After some more reading, you try
./Build -f /usr/src/sendmail-8.13.3/devtools/Site/site.config.m4
which shouts that it can't overwrite previously parsed config!
Fortunately, the error message suggests the right Build option of "-c".
./Build -c
./Build install
/etc/init.d/sendmail start
Now it should launch just fine.
Hope this helps
Frank Rysanek