Problems Compiling Sendmail on CentOS8

Issues related to applications and software problems and general support
Post Reply
blondie72
Posts: 6
Joined: 2015/07/13 10:13:46

Problems Compiling Sendmail on CentOS8

Post by blondie72 » 2021/02/15 13:46:52

Hi Community,

we have some trouble to Build Sendmail from source.
This worked fine with CentOS7.
We tried with versions 8.14 8.15 and 8.16, without success.
When installing the binary 8.15.2 its working.

Any ideas?

CU

tunk
Posts: 895
Joined: 2017/02/22 15:08:17

Re: Problems Compiling Sendmail on CentOS8

Post by tunk » 2021/02/15 16:06:36

Why do you want to do this when 8.15.2 is working?
And I think nobody can help unless you provide more info.

User avatar
TrevorH
Forum Moderator
Posts: 30314
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Problems Compiling Sendmail on CentOS8

Post by TrevorH » 2021/02/15 16:49:03

Why would anyone try to even use sendmail any more? Let alone compile it when it's already supplied and in the appstream repo?
CentOS 6 died in November 2020 - migrate to a new version!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

blondie72
Posts: 6
Joined: 2015/07/13 10:13:46

Re: Problems Compiling Sendmail on CentOS8

Post by blondie72 » 2021/02/16 13:08:34

Hello,

I have found this:
https://bugs.gentoo.org/691692
There could be a problem with glibc; I don't know whether the patch is working on CentOS.
But this should be fixed with Sendmail 8.16...
I'm surprised that nobody got this error when building Sendmail.

Here is the output of the building process:

readcf.c:2603:13: warning: RES_AAONLY is deprecated
{ "aaonly", RES_AAONLY },
^~~~~~~~~~~~~~
readcf.c:2605:13: warning: RES_PRIMARY is deprecated
{ "primary", RES_PRIMARY },
^~~~~~~~~~~~~~~~
readcf.c:2612:13: warning: RES_USE_INET6 is deprecated
{ "use_inet6", RES_USE_INET6 },
^~~~~~~~~~~~~~~~~~~~
cc -O2 -I. -I../../include -c -o recipient.o recipient.c
cc -O2 -I. -I../../include -c -o sasl.o sasl.c
cc -O2 -I. -I../../include -c -o savemail.o savemail.c
cc -O2 -I. -I../../include -c -o sfsasl.o sfsasl.c
cc -O2 -I. -I../../include -c -o shmticklib.o shmticklib.c
cc -O2 -I. -I../../include -c -o sm_resolve.o sm_resolve.c
cc -O2 -I. -I../../include -c -o srvrsmtp.o srvrsmtp.c
cc -O2 -I. -I../../include -c -o stab.o stab.c
cc -O2 -I. -I../../include -c -o stats.o stats.c
cc -O2 -I. -I../../include -c -o sysexits.o sysexits.c
cc -O2 -I. -I../../include -c -o timers.o timers.c
cc -O2 -I. -I../../include -c -o tlsh.o tlsh.c
cc -O2 -I. -I../../include -c -o tls.o tls.c
cc -O2 -I. -I../../include -c -o trace.o trace.c
cc -O2 -I. -I../../include -c -o udb.o udb.c
cc -O2 -I. -I../../include -c -o usersmtp.o usersmtp.c
cc -O2 -I. -I../../include -c -o util.o util.c
cc -O2 -I. -I../../include -c -o version.o version.c
cc -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 tlsh.o tls.o trace.o udb.o usersmtp.o util.o version.o /home/zsoft/mail/sendmail-8.16.1/obj.Linux.4.18.0-269.el8.x86_64.x86_64/libsmutil/libsmutil.a /home/zsoft/mail/sendmail-8.16.1/obj.Linux.4.18.0-269.el8.x86_64.x86_64/libsm/libsm.a -ldl
domain.o: In function `getmxrr':
domain.c:(.text+0x14e): undefined reference to `__res_search'
domain.c:(.text+0x220): undefined reference to `__dn_skipname'
domain.c:(.text+0x358): undefined reference to `__res_query'
domain.c:(.text+0x4ab): undefined reference to `__dn_expand'
domain.c:(.text+0x692): undefined reference to `__dn_expand'
domain.o: In function `dns_getcanonname':
domain.c:(.text+0x10cd): undefined reference to `__res_querydomain'
domain.c:(.text+0x1227): undefined reference to `__dn_skipname'
domain.c:(.text+0x1345): undefined reference to `__dn_expand'
domain.c:(.text+0x1457): undefined reference to `__dn_expand'
sm_resolve.o: In function `dns_lookup_int':
sm_resolve.c:(.text+0x2a4): undefined reference to `__res_search'
sm_resolve.c:(.text+0x506): undefined reference to `__res_search'
sm_resolve.c:(.text+0x5ce): undefined reference to `__dn_expand'
sm_resolve.c:(.text+0x67f): undefined reference to `__dn_expand'
sm_resolve.c:(.text+0x84d): undefined reference to `__dn_expand'
sm_resolve.c:(.text+0x9dd): undefined reference to `__dn_expand'
sm_resolve.c:(.text+0xaee): undefined reference to `__dn_expand'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:446: sendmail] Error 1


CU

sml
Posts: 221
Joined: 2020/01/17 09:01:44

Re: Problems Compiling Sendmail on CentOS8

Post by sml » 2021/02/16 19:06:16

1) You didn't answer tunk's question: why are you building Sendmail from source if the version in the repository works?

2) You linked to a fix needed to link Sendmail against glibc 2.30. CentOS has glibc 2.28 though.

3) The file sendmail/README that comes with Sendmail sources states
Complaints about an undefined reference to `__dn_skipname' in domain.o are a sure sign that you need to add -lresolv to LIBS.

User avatar
TrevorH
Forum Moderator
Posts: 30314
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Problems Compiling Sendmail on CentOS8

Post by TrevorH » 2021/02/16 19:43:05

And if you must build it then build it as a package. Start by using the distro SRPM spec file and amend that to vater for the newer version. Build that in mock. If it's set up right in the spec file, it will pull in all the required -devel packages to allow the build to complete.
CentOS 6 died in November 2020 - migrate to a new version!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

blondie72
Posts: 6
Joined: 2015/07/13 10:13:46

Re: Problems Compiling Sendmail on CentOS8

Post by blondie72 » 2021/02/18 14:00:44

Hi,

thanks for your support.
The idea behind compiling Sendmail is ,that I could use the latest version 8.16.
The version that comes with CentOS 8 is quite old.

CU

User avatar
TrevorH
Forum Moderator
Posts: 30314
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Problems Compiling Sendmail on CentOS8

Post by TrevorH » 2021/02/18 14:17:21

You're sort of missing the entire point of CentOS then. The idea is that you install it and stick to known working and stable versions of things and rely on Red Hat to backport security fixes to it. Not to mention that by installing it just as a source install and not creating your own packages, the next time you install something via yum that has a "Requires: MTA" or "Requires: sendmail" in it, it will go off, pull down the latest and install it and overwrite portions of your source install and break it.
CentOS 6 died in November 2020 - migrate to a new version!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 8 - General Support”