Error updating Exim from 4.96.1-7-g79877b70e to 4.97

patrickkasie

Verified User
Joined
Sep 21, 2021
Messages
228
Location
Een echte Hollander
Updating Exim
Package gcc-4.8.5-44.el7.x86_64 already installed and latest version
Package 1:make-3.82-24.el7.x86_64 already installed and latest version
Package 1:openssl-devel-1.0.2k-26.el7_9.x86_64 already installed and latest version
Package pcre2-devel-10.23-2.el7.x86_64 already installed and latest version
Package perl-ExtUtils-Embed-1.30-299.el7_9.noarch already installed and latest version
Package libdb-devel-5.3.21-25.el7.x86_64 already installed and latest version
Error: Nothing to do
download_with_cache: using cached '/usr/local/directadmin/custombuild/cache/exim-4.97.tar.gz' file
Compiling exim...
/bin/sh scripts/source_checks

>>> Creating links to source files...
>>> Creating lookups/Makefile for building dynamic modules
>>> New Makefile & lookups/Makefile installed
>>> Use "make makefile" if you need to force rebuilding of the makefile

make[1]: Entering directory `/usr/local/directadmin/custombuild/tmp/tmp.gdC87vjHZw.exim-4.97.tar.gz/build-Linux-x86_64'
/bin/sh ../scripts/Configure-os.c
cc buildconfig.c
/bin/sh ../scripts/Configure-os.h
cc exim_lock.c
cc -o exim_lock
>>> exim_lock utility built

/bin/sh ../scripts/Configure-config.h "make"
make[2]: Entering directory `/usr/local/directadmin/custombuild/tmp/tmp.gdC87vjHZw.exim-4.97.tar.gz/build-Linux-x86_64'
make[2]: `buildconfig' is up to date.
make[2]: Leaving directory `/usr/local/directadmin/custombuild/tmp/tmp.gdC87vjHZw.exim-4.97.tar.gz/build-Linux-x86_64'
Building configuration file config.h
>>> config.h built

cc -DMACRO_PREDEF globals.c
cc -DMACRO_PREDEF macro_predef.c
In file included from exim.h:550:0,
from macro_predef.c:13:
spf.h:18:22: fatal error: spf2/spf.h: No such file or directory
#include <spf2/spf.h>
^
compilation terminated.
In file included from exim.h:550:0,
from globals.c:13:
spf.h:18:22: fatal error: spf2/spf.h: No such file or directory
#include <spf2/spf.h>
^
compilation terminated.
make[1]: *** [macro_predef.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [macro-globals.o] Error 1
make[1]: Leaving directory `/usr/local/directadmin/custombuild/tmp/tmp.gdC87vjHZw.exim-4.97.tar.gz/build-Linux-x86_64'
make: *** [all] Error 2
doExim: failed to compile '/usr/local/directadmin/custombuild/cache/exim-4.97.tar.gz' inside '/usr/local/directadmin/custombuild/tmp/tmp.gdC87vjHZw.exim-4.97.tar.gz'
failed to compile exim 4.97
Custombuild 2 cannot update Exim from 4.96.1 to 4.97

Latest version of DirectAdmin: 1.656 build 717db52f01df06ced6e5664c83082cdcb9c47ac7
Installed version of DirectAdmin: 1.656 build 717db52f01df06ced6e5664c83082cdcb9c47ac7
CentOS7
 
spf.h:18:22: fatal error: spf2/spf.h: No such file or directory
something wrong with libspf2 - try reinstall it.
run YUM update before any DA updates
 
Code:
yum list libspf*
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: ftp.nluug.nl
 * extras: ftp.nluug.nl
 * updates: ftp.nluug.nl
Error: No matching Packages to list
I will have to request my VPS hostingprovider to include this package in its library
 
A different VPS has the following error:
Code:
make[2]: Entering directory `/usr/local/directadmin/custombuild/tmp/tmp.xGKP7NsGXz.exim-4.97.tar.gz/build-Linux-x86_64/lookups'
cc cdb.c
make[2]: Entering directory `/usr/local/directadmin/custombuild/tmp/tmp.xGKP7NsGXz.exim-4.97.tar.gz/build-Linux-x86_64/auths'
cc auth-spa.c
Can't locate File/FcntlLock.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./exim_id_update line 18.
BEGIN failed--compilation aborted at ./exim_id_update line 18.
make[1]: *** [exim_id_update] Error 2
make[1]: *** Waiting for unfinished jobs....

In this case, libspf2 is actually installed because it was installed seperately, but it's not provided through the mirrors.
Code:
yum list libspf*
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.mirror.triple-it.nl
 * extras: centos.mirror.transip.nl
 * updates: centos.mirror.transip.nl
Installed Packages
libspf2.x86_64                                                                                 1.2.11-1.20210922git4915c308.el7                                                                            @epel
libspf2-devel.x86_64                                                                           1.2.11-1.20210922git4915c308.el7                                                                            @epel
 
Last edited:
an't locate File/FcntlLock.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5
Ok had the same after upgrading one server from Centos 7 to AL8
There are 2 versions of Perl on your system probably, I have fixed by rename Perl5 directory ( backup first no guarantee here !)
Check
Code:
perl -V
where the Perl is complied

Then you will see that the rebuild goes well because it does not search it anymore in usr/local
further, yeah its dirty trick but saved me from exim rebuild error

Warning : This was an non essential server and after doing above everything worked well but still no any guarantee if you have made some custom.
 
Last edited:
I would have to do this on every single server, including production servers. I'm afraid I'm going to have to skip your hack until there's a permanent solution in place provided by DirectAdmin. I mean, everything still works, so why fix something that isn't broken, right?
 
spf.h:18:22: fatal error: spf2/spf.h: No such file or directory

did you removed it with ? :
Code:
da build list_removals
because that is this is going to delete for you, see list :
  • icu
  • freetype
  • libglib
  • libiconv
  • libjpeg
  • libltdl
  • libmcrypt
  • libmhash
  • libpcre
  • libpcre2
  • libpng
  • libwebp
  • libsodium
  • libspf2
  • libsrs_alt
  • libxml2
  • libxslt
  • libzip
  • ragel
then
Code:
da build remove_items
da build remove_old_local libiconv
da build all
 
I mean, everything still works, so why fix something that isn't broken, right?
Understand your approach but clearly something is not in line with standard DA updates or Custombuild updates, mainly because lot of programs where updated wit Custombuild but after some time DA dropped that and let us with messy usr/local directory
 
I have not removed any old programs/items and haven't touched any repo in any VPS other than installing libspf2 on vps02 through some git repo as a standalone package. Even though /usr/local isn't needed anymore, I pressume it's not going to be in our way of progressing through the installation process or updating process of other applications/packages
 
do not fully remove "/usr/local", it could messed up your server.

due you manual install libspf2 from git repo, maybe that's a problem. I thing you can create ticket to let DA Team solved for you for 1 server and then they can reproduce issued and push update in all server.
 
I will most likely have to give up a list of packages on both servers. At that time, I really needed libspf2, regardless of how I got it, it was required right there and then. I've contacted my hosting provider, I'll have to wait and see about their response
 
Error: No matching Packages to list
Do you have the epel repo installed? Seems that might be missing because libspf2 is provided via epel. And nowadays epel is almost installed by default if I'm not mistaken. By me anyway. :)
For Alma 8 and 9 the libspf2 is provided by the system repo too.

For Centos 7 I only see it in the epel release, so this might fix your issue if you don't want to remove things yet.
yum install epel-release -y yum install libspf2
 
For Centos 7 I only see it in the epel release, so this might fix your issue if you don't want to remove things yet.
yum install epel-release -y yum install libspf2

# yum install epel-release
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.nluug.nl
* extras: ftp.nluug.nl
* updates: ftp.nluug.nl
Package epel-release-7-11.noarch already installed and latest version
Nothing to do
# yum install libspf2
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.nluug.nl
* extras: ftp.nluug.nl
* updates: ftp.nluug.nl
No package libspf2 available.
Error: Nothing to do

Reply from our hosting provider is that the mirrors do not have the libspf2 package as it has not been taken into the official Cent OS 7 repositories.
 
Reply from our hosting provider is that the mirrors do not have the libspf2 package as it has not been taken into the official Cent OS 7 repositories.
Same as I said. In Centos 7 you need to take it from the epel repository.
However....
Package epel-release-7-11.noarch already installed and latest version
So you have an old version. Current epel-release is 7-14 on Centos 7 so you most certainly do not have the most recent version.

You're not running Centos 6 or disabled the epel-release, right?
Check the content of the /etc/yum.repos.d/epel.repo it should look like this:
Code:
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
# It is much more secure to use the metalink, but if you wish to use a local mirror
# place its address here.
#baseurl=http://download.example/pub/epel/7/$basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch&infra=$infra&content=$contentdir
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

There are 2 others below that, epel-debuginfo and epel-source but these are both disabled so that's not interesting.

If it's the same, try reinstalling and see if that helps.
yum clean all
yum reinstall epel-release
 
I'm trying to update Exim on one of our servers, and I'm getting the following error:
I have no idea what it could be.

Code:
(...)
cc tf_maildir.c
cc heimdal_gssapi.c
cc rf_get_transport.c
cc rf_get_ugid.c
cc rf_lookup_hostlist.c
cc rf_queue_add.c
cc plaintext.c
cc pwcheck.c
cc spa.c
cc rf_self_action.c
cc rf_set_ugid.c
cc tls.c
cc xtextdecode.c
cc xtextencode.c
ar cq routers.a
ranlib routers.a
make[2]: Leaving directory `/usr/local/directadmin/custombuild/tmp/tmp.bx7GgZZWMe.exim-4.97.tar.gz/build-Linux-x86_64/routers'
 
ar cq auths.a
ranlib auths.a
make[2]: Leaving directory `/usr/local/directadmin/custombuild/tmp/tmp.bx7GgZZWMe.exim-4.97.tar.gz/build-Linux-x86_64/auths'
 
ar cq transports.a
ranlib transports.a
make[2]: Leaving directory `/usr/local/directadmin/custombuild/tmp/tmp.bx7GgZZWMe.exim-4.97.tar.gz/build-Linux-x86_64/transports'
 
cc -o exim
rfc2047.o: In function `rfc2047_decode2':
rfc2047.c:(.text+0x49f): undefined reference to `libiconv_open'
rfc2047.c:(.text+0x543): undefined reference to `libiconv'
rfc2047.c:(.text+0x5f2): undefined reference to `libiconv_close'
collect2: error: ld returned 1 exit status
make[1]: *** [exim] Error 1
make[1]: Leaving directory `/usr/local/directadmin/custombuild/tmp/tmp.bx7GgZZWMe.exim-4.97.tar.gz/build-Linux-x86_64'
make: *** [all] Error 2
doExim: failed to compile '/usr/local/directadmin/custombuild/cache/exim-4.97.tar.gz' inside '/usr/local/directadmin/custombuild/tmp/tmp.bx7GgZZWMe.exim-4.97.tar.gz'
failed to compile exim 4.97
 
@paulonichio I don't know if Active8's answer is related, but have you tried this?

@Richard G
Code:
/etc/yum.repos.d/epel.repo
[epel]
enabled=0

Will enabling this repo infringe on the stability of the system? It's enabled on our AlmaLinux 8 systems, but not on our CentOS7 systems.
 
rfc2047.o: In function `rfc2047_decode2': rfc2047.c:(.text+0x49f): undefined reference to `libiconv_open' rfc2047.c:(.text+0x543): undefined reference to `libiconv' rfc2047.c:(.text+0x5f2): undefined reference to `libiconv_close'
did you do this ? (backup first)

Code:
da build list_removals
da build remove_items
da build remove_old_local libiconv
da build all

if you need iconv install it manual
Code:
cd /root
wget https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.17.tar.gz
tar xf libiconv-1.17.tar.gz
cd libiconv-1.17
./configure
make
make install
cd /root
rm -rf libiconv-1.17.tar.gz libiconv-1.17
 
Last edited:
libiconv come from glibc package.

Please enable epel repo and update all package to latest version.

any package that still doesn't installed on server, you need manual install
Example:
Code:
yum install libspf2-devel
 
Facing the same issue on both (some) CentOS 7 servers and some AlmaLinux servers.
Most servers don't seem to have any update problems.

Should I wait for a fix from DirectAdmin, or should I start troubleshooting on my own?
 
Back
Top