1.656 Broke Exim & PHP, Followed instructions but no full fix yet.

modem

Verified User
Joined
Apr 7, 2004
Messages
355
Good morning.

I upgraded DA this morning to 1.656 and initially, all was well except Exim would not compile/install.

I checked the forums and found the support link of https://forum.directadmin.com/threads/directadmin-v1-656-rc.69439/#post-367775 showing how to remove old libraries. I proceeded to follow those instructions removing old libraries and then manually removing libiconv. When I went to do the da build all command, it will build apache, mysql correctly, but when it comes to Exim it would fail with the following below:


cc -DMACRO_PREDEF transport.c
cc -DMACRO_PREDEF drtables.c
cc -DMACRO_PREDEF acl.c
In file included from globals.c:13:0:
exim.h:528:19: fatal error: pcre2.h: No such file or directory

#include <pcre2.h>
^
compilation terminated.
In file included from readconf.c:14:0:
exim.h:528:19: fatal error: pcre2.h: No such file or directory

#include <pcre2.h>
^
compilation terminated.
In file included from macro_predef.c:13:0:
exim.h:528:19: fatal error: pcre2.h: No such file or directory

#include <pcre2.h>
^
compilation terminated.
In file included from transport.c:14:0:
exim.h:528:19: fatal error: pcre2.h: No such file or directory

#include <pcre2.h>
^
compilation terminated.
In file included from expand.c:14:0:
exim.h:528:19: fatal error: pcre2.h: No such file or directory

#include <pcre2.h>
^
compilation terminated.
In file included from drtables.c:11:0:
exim.h:528:19: fatal error: pcre2.h: No such file or directory

#include <pcre2.h>
^
compilation terminated.
In file included from route.c:13:0:
exim.h:528:19: fatal error: pcre2.h: No such file or directory

#include <pcre2.h>
^
compilation terminated.
In file included from acl.c:12:0:
exim.h:528:19: fatal error: pcre2.h: No such file or directory

#include <pcre2.h>
^
compilation terminated.
make[1]: *** [macro-readconf.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [macro-globals.o] Error 1
make[1]: *** [macro-transport.o] Error 1
make[1]: *** [macro-expand.o] Error 1
make[1]: *** [macro-acl.o] Error 1
make[1]: *** [macro-drtables.o] Error 1
make[1]: *** [macro_predef.o] Error 1
make[1]: *** [macro-route.o] Error 1
make[1]: Leaving directory `/usr/local/directadmin/custombuild/tmp/tmp.kEc5PNEU15.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.kEc5PNEU15.exim-4.97.tar.gz'

failed to compile exim 4.97



Likewise, when I try to build php using da build php, I initially get the following:


Package oniguruma-devel-6.8.2-2.el7.x86_64 already installed and latest version
Error: Package: libxslt-devel-1.1.28-6.el7.x86_64 (base)
Requires: pkgconfig(libxml-2.0)

You could try using --skip-broken to work around the problem

......

checking for strtoll... yes
checking for atoll... yes
checking whether to build with LIBXML support... yes
checking for libxml-2.0 >= 2.7.6... no
configure: error: Package requirements (libxml-2.0 >= 2.7.6) were not met:

No package 'libxml-2.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBXML_CFLAGS
and LIBXML_LIBS to avoid the need to call pkg-config.

See the pkg-config man page for more details.

*** There was an error while trying to configure php. Check the configure file



This obviously is showing an issue with libxml2, but since DA's custombuild has changed I have not run the old commands of ./build libxml2 as I didn't know if they were still even valid or not.

I have restored the old libraries and went into versions to downgrade Exim to 4.96 and ran the da build all command.

This has brought MTA back and PHP has managed to recompile successfully again, although there were some errors showing up during the PHP 7.4 and 8.1.25 build with the following:


Error: Package: libxslt-devel-1.1.28-6.el7.x86_64 (base)
Requires: pkgconfig(libxml-2.0)
You could try using --skip-broken to work around the problem



When attempting to update to PHP 8.1.25 from within DA I also get the following (most likely due to the original issues brought forth in the 1.656 upgrade needing old libraries removed and da build all ran)



checking for iconv support... yes
checking for iconv... yes
checking if iconv is glibc's... yes
checking if iconv supports errno... no
configure: error: iconv does not support errno

*** There was an error while trying to configure php. Check the configure file




For now, the server is stable, but I would gladly appreciate any input on solving these issues long term.
 
For me the same thing happened. After upgrade to DA 1.656 the build of PHP 8.1.25 failed with the same error as yours. I'm wary to build Exim at this time, so haven't tried that.
 
Hi @all,

Looks like I have also the same issue (did just a couple of minutes a go the upgrade to DirectAdmin 1.656) (everything is still up and running) but upgrading php and exim fails with:

root@mail /usr/local/directadmin/custombuild # ./build version
2.0.0
root@mail /usr/local/directadmin/custombuild #

#Linux version:

root@mail /usr/local/directadmin/custombuild # cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Installation error log upgrading current Exim: 4.96.2-12

root@mail /usr/local/directadmin/custombuild # exim --version
Exim version 4.96.2-12-g29d01ae2a #2 built 30-Oct-2023 15:05:51
Copyright (c) University of Cambridge, 1995 - 2018
(c) The Exim Maintainers and contributors in ACKNOWLEDGMENTS file, 2007 - 2022
Berkeley DB: Berkeley DB 5.3.28: (September 9, 2013)
Support for: crypteq IPv6 Perl OpenSSL TLS_resume move_frozen_messages Content_Scanning DANE DKIM DNSSEC Event OCSP PIPECONNECT PRDR Queue_Ramp SPF SRS TCP_Fast_Open
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmjz dbmnz dnsdb
Authenticators: cram_md5 dovecot plaintext spa
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Malware: f-protd f-prot6d drweb fsecure sophie clamd avast sock cmdline
Fixed never_users: 0
Configure owner: 0:0
Size of off_t: 8
2023-11-19 14:44:36 cwd=/usr/local/directadmin/custombuild 2 args: exim --version
Configuration file is /etc/exim.conf

To:

cc -o exim
/usr/bin/ld: rfc2047.o: in function `rfc2047_decode2':
rfc2047.c:(.text+0x3d4): undefined reference to `libiconv_open'
/usr/bin/ld: rfc2047.c:(.text+0x4c3): undefined reference to `libiconv'
/usr/bin/ld: rfc2047.c:(.text+0x54d): undefined reference to `libiconv_close'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:687: exim] Error 1
make[1]: Leaving directory '/usr/local/directadmin/custombuild/tmp/tmp.kr3ygZRlJi.exim-4.97.tar.gz/build-Linux-x86_64'
make: *** [Makefile:37: all] Error 2
doExim: failed to compile '/usr/local/directadmin/custombuild/cache/exim-4.97.tar.gz' inside '/usr/local/directadmin/custombuild/tmp/tmp.kr3ygZRlJi.exim-4.97.tar.gz'
failed to compile exim 4.97

and php 8.1 or 8.2 upgrade fails with:

checking if iconv supports errno... no
configure: error: iconv does not support errno


*** There was an error while trying to configure php. Check the configure file

Have a good day+

Grtz,
Mek.
 
You all tried this already?
  1. da build remove_items - remove all libraries except iconv.
  2. da build remove_old_local libiconv - remove iconv.
  3. da build all - rebuild everything. Note: after iconv is removed, but before everything is rebuilt some services will not work if restarted.
 
You all tried this already?
  1. da build remove_items - remove all libraries except iconv.
  2. da build remove_old_local libiconv - remove iconv.
  3. da build all - rebuild everything. Note: after iconv is removed, but before everything is rebuilt some services will not work if restarted.
@Richard G Yup, When I first realized things were broken, I followed those instructions but that didn't resolve the issue. What happened on the da build all was that it would give errors building PHP stating that libxml2 wasn't found. I was able to back down by restoring the backed up libraries one by one, and downgrading back to Exim 4.96 and rebuilding everything. However, I still can't upgrade to PHP 8.1.25 at the moment.

I have an open ticket with DA support as of yesterday morning who is investigating it.
 
Yup, When I first realized things were broken, I followed those instructions
Yes you stated indeed that you did this. I was wondering if @tveenker and @mekmek also already tried this.
Because in lots of cases this does fix the issue. And it was not clear if they also tried.

Please let us know the outcome of the ticket and solution if you get it.
 
You all tried this already?
  1. da build remove_items - remove all libraries except iconv.
  2. da build remove_old_local libiconv - remove iconv.
  3. da build all - rebuild everything. Note: after iconv is removed, but before everything is rebuilt some services will not work if restarted.

Hi @Richard G

I can confirm these actions did the trick (for me). Looks like this has been triggered by the last (recent) 1.656 Directadmin upgrade. I'm using Debian 11 Bullseye. Not sure if this will happen also on other Linux variants

Thanks for your help.

Have a good day+

Grtz,
Mek.
 
You all tried this already?
  1. da build remove_items - remove all libraries except iconv.
  2. da build remove_old_local libiconv - remove iconv.
  3. da build all - rebuild everything. Note: after iconv is removed, but before everything is rebuilt some services will not work if restarted.
Hi @Richard G , Thanks for your answer, would be appreciated. Was not aware of this possible fix. I will give it a try now. Let you know if this will fix it.

Grtz,
Mek.
 
Most of the errors can be resolved by just removing all of the old libraries (including iconv with da build remove_old_local libiconv, which is not removed with the bulk da build remove_items commands) and rebuilding all the software that stopped working due to library removal.

Original post by @modem seems quite different case. It looks like CustomBuils report errors when installing system packages (either with yum or apt), like this example:

Code:
Error: Package: libxslt-devel-1.1.28-6.el7.x86_64 (base)
Requires: pkgconfig(libxml-2.0)
You could try using --skip-broken to work around the problem

You would need to check which packages are causing these conflicts and resolve the manually, they could be caused by adding 3rd party repositories and installing extra packages form there. Or installing custom packages manually with dpkg or rpm commands. Removing old libraries will not help because CB is unable to bring the system libraries.

@modem if you stuck with using old libraries please open a support ticket.
 
I can confirm these actions did the trick (for me). Looks like this has been triggered by the last (recent) 1.656 Directadmin upgrade.
That is correct. I also odd enough got an Exim update notification on one of the Alma 8 servers which went without issues. On 1 Alma 9 this went fine too and on 1 Alma 8 and 1 Centos 7 server I had to do this trick.

Strangely enough, the day after I did this update (and DA 1.656 was already running), I again got the notification of the same Exim update which I did the day before already on one of these Alma 8 servers. So i just did it again and it now gave these errors on building. So I had to do this fix too on this server.
I wonder why this wasn't an issue the first time I updated, but also strange that the same update was announce again.
So if you or anybody else would encounter this on another server, just try the fix again. ;)

I hope this can fix it for @tveenker too and I trust the support ticket for @modem will be fixed soon too.
 
Most of the errors can be resolved by just removing all of the old libraries (including iconv with da build remove_old_local libiconv, which is not removed with the bulk da build remove_items commands) and rebuilding all the software that stopped working due to library removal.
FYI: Did the upgrade on other Debian 11 systems with DirectAdmin (not upgraded from 10 to 11) and no issue at all. So looks like this could happen on distro's which are upgraded in the past.

Grt,
Mek.
 
@fln Currently I have ticket #52898 open and looks like the issue has been addressed.

What was discovered was the tech Roman checked and found I had the following in my exclusion list for yum.conf:

exclude=apache* bind-chroot* apache* dovecot* exim* ftpd* httpd* mysql* MySQL* mod_* php* sendmail* openssh* libxml2* freetype* pcre* libpng* seamonkey* nscd* nptl* kernel-unsupported kernel-smp-unsupported kernel-hugemem*

This dates back years when I had setup those extra exclusions from some support issue I dealt with a good 12 or so years ago. I had completely forgotten about that. I then altered my yum.conf file down to exclude the following:

exclude=apache* nginx* httpd* mod_* mysql* MySQL* mariadb* da_* *ftpd exim* sendmail* php* bind-chroot* dovecot*

Afterwards I ran "da build all" but that failed with the following:

######################################################################## 100.0%
Adding AuthLog to /var/www/html/phpMyAdmin-5.2.1-all-languages/config.inc.php
Adding PmaNoRelation_DisableWarning to /var/www/html/phpMyAdmin-5.2.1-all-languages/config.inc.php
phpMyAdmin 5.2.1-all-languages installation is done.
Enabling BlockCracking...
BlockCracking is now enabled.
/usr/sbin/exim: error while loading shared libraries: libpcre2-8.so.0: cannot open shared object file: No such file or directory
/usr/sbin/exim: error while loading shared libraries: libpcre2-8.so.0: cannot open shared object file: No such file or directory
Your version of Exim does not support SPF, which is needed for Easy Spam Fighter. Please update exim using command 'da build exim'.
2023/11/20 10:43:05 info executing task task=action=notify&message=CustomBuild+installation+has+failed%2C+please+check+the+following+file+for+more+information%3A%0A%2Fvar%2Flog%2Fdirectadmin%2Fcustombuild.1700494407.10204.YWxsAA.log&subject=CustomBuild+installation+has+failed&value=admin
/usr/sbin/sendmail: error while loading shared libraries: libpcre2-8.so.0: cannot open shared object file: No such file or directory
[root@DELETED custombuild]#

The good news is that libxml2 was installed during the da build all process which resolved the PHP errors, but Exim was still failing. The command line yum check-update still wasn't showing any pcre2 updates and running yum install pcre2 didn't give any options for an update for that.

I then ran yum makecache followed by yum install pcre2 which then installed pcre2.

Lastly I re-ran da build all which completed successfully with everything fully working.

Moral of this story, check your YUM or APT/APT-GET exclusion lists first. That fixed it entirely for me.
 
Yes you stated indeed that you did this. I was wondering if @tveenker and @mekmek also already tried this.
Because in lots of cases this does fix the issue. And it was not clear if they also tried.

Please let us know the outcome of the ticket and solution if you get it.
Finally had time to check this too. This indeed fixes the problems for me too. Thank you!

I do see that /usr/local/lib does not get fully cleaned up. I'm left with this:
Code:
ls -l /usr/local/lib
total 8116
-rw-r--r--  1 root root     222 Dec  4  2018 charset.alias
drwxr-xr-x. 2 root root       6 Nov 21 08:26 cmake
-rw-r--r--  1 root root 1263174 May  6  2021 libnghttp2.a
-rwxr-xr-x  1 root root     959 May  6  2021 libnghttp2.la
lrwxrwxrwx  1 root root      21 May  6  2021 libnghttp2.so -> libnghttp2.so.14.20.1
lrwxrwxrwx  1 root root      21 May  6  2021 libnghttp2.so.14 -> libnghttp2.so.14.20.1
-rwxr-xr-x  1 root root  670000 Feb 22  2019 libnghttp2.so.14.17.1
-rwxr-xr-x  1 root root  670648 Sep  1  2019 libnghttp2.so.14.18.0
-rwxr-xr-x  1 root root  672808 Mar 15  2020 libnghttp2.so.14.19.0
-rwxr-xr-x  1 root root  673752 Nov 16  2020 libnghttp2.so.14.20.0
-rwxr-xr-x  1 root root  721136 May  6  2021 libnghttp2.so.14.20.1
-rw-r--r--  1 root root 1066580 Nov 16  2020 libzstd.a
lrwxrwxrwx  1 root root      16 Nov 16  2020 libzstd.so -> libzstd.so.1.4.5
lrwxrwxrwx  1 root root      16 Nov 16  2020 libzstd.so.1 -> libzstd.so.1.4.5
-rwxr-xr-x  1 root root  892240 Nov 16  2020 libzstd.so.1.4.5
lrwxrwxrwx  1 root root      24 Mar 15  2020 php -> /usr/local/php73/lib/php
lrwxrwxrwx  1 root root      31 Mar 15  2020 php.conf.d -> /usr/local/php73/lib/php.conf.d
lrwxrwxrwx  1 root root      28 Mar 15  2020 php.ini -> /usr/local/php73/lib/php.ini
-rw-r--r--  1 root root   69520 May  9  2017 php.ini~
drwxr-xr-x. 2 root root      43 Nov 21 08:26 pkgconfig
-rw-r--r--  1 root root 1584648 Dec  4  2018 preloadable_libiconv.so
Where the php* symlinks point to a non-existent version. Als there's still some iconv related so-file present. Maybe some extra cleaing up should go in the remove_items command.
 
I also got a lot in there, mostly Libmagic* things but also libnghttp2 stuff like you.
Only no php things anymore.

Things like this too:
Code:
drwxr-xr-x. 29 root root 4.0K 2023-11-16 16:51 ..
-rw-r--r--   1 root root  221 2019-09-08 21:13 charset.alias
drwxr-xr-x   2 root root 4.0K 2023-11-16 16:33 cmake
drwxr-xr-x   3 root root 4.0K 2020-10-19 15:09 ImageMagick-7.0.10
drwxr-xr-x   3 root root 4.0K 2021-06-26 23:46 ImageMagick-7.1.0
drwxr-xr-x   3 root root 4.0K 2023-04-04 23:56 ImageMagick-7.1.1
drwxr-xr-x   2 root root 4.0K 2023-11-16 16:50 ioncube
lrwxrwxrwx   1 root root   16 2022-09-07 20:09 libcurl.so -> libcurl.so.4.8.0
where the libcurl.so symlink is blinking (so non existing).

Odd thing.... libcurl.so.4.8.0 is a newer version than the libcurl.so.4.5.0 (or 4.7.0 or 4.3.0) which exists on the servers. So I wonder where this 4.8.0 is coming from anyway.
And this is on a Centos 7 and an Alma 8 server. The others are fine.
 
Probably difficult to tell where the files come from. I suspect, since I (as far as I know) have never installed anything explicitly in /usr/local, these leftover files are all/mostly produced by DirectAdmin in the past.
 
Yep it looks like it, and it's still going on as I see the same happening on a freshly (approx. 3 weeks ago) Alma 9 server.
Code:
drwxr-xr-x.  3 root root 4.0K 2023-10-19 01:13 ImageMagick-7.1.1
drwxr-xr-x.  2 root root 4.0K 2023-11-16 16:30 ioncube
-rw-r--r--   1 root root  11M 2023-10-26 21:10 libMagick++-7.Q16HDRI.a
-rwxr-xr-x   1 root root 1.3K 2023-10-26 21:10 libMagick++-7.Q16HDRI.la
lrwxrwxrwx   1 root root   30 2023-10-26 21:10 libMagick++-7.Q16HDRI.so -> libMagick++-7.Q16HDRI.so.5.0.0
lrwxrwxrwx   1 root root   30 2023-10-26 21:10 libMagick++-7.Q16HDRI.so.5 -> libMagick++-7.Q16HDRI.so.5.0.0
-rwxr-xr-x   1 root root 4.4M 2023-10-26 21:10 libMagick++-7.Q16HDRI.so.5.0.0
-rw-r--r--   1 root root  35M 2023-10-26 21:10 libMagickCore-7.Q16HDRI.a
-rwxr-xr-x   1 root root 1.2K 2023-10-26 21:10 libMagickCore-7.Q16HDRI.la
lrwxrwxrwx   1 root root   33 2023-10-26 21:10 libMagickCore-7.Q16HDRI.so -> libMagickCore-7.Q16HDRI.so.10.0.1
lrwxrwxrwx   1 root root   33 2023-10-26 21:10 libMagickCore-7.Q16HDRI.so.10 -> libMagickCore-7.Q16HDRI.so.10.0.1
-rwxr-xr-x   1 root root  17M 2023-10-26 21:10 libMagickCore-7.Q16HDRI.so.10.0.1
-rw-r--r--   1 root root 7.1M 2023-10-26 21:10 libMagickWand-7.Q16HDRI.a
-rwxr-xr-x   1 root root 1.2K 2023-10-26 21:10 libMagickWand-7.Q16HDRI.la
lrwxrwxrwx   1 root root   33 2023-10-26 21:10 libMagickWand-7.Q16HDRI.so -> libMagickWand-7.Q16HDRI.so.10.0.1
lrwxrwxrwx   1 root root   33 2023-10-26 21:10 libMagickWand-7.Q16HDRI.so.10 -> libMagickWand-7.Q16HDRI.so.10.0.1
-rwxr-xr-x   1 root root 3.6M 2023-10-26 21:10 libMagickWand-7.Q16HDRI.so.10.0.1
drwxr-xr-x.  2 root root 4.0K 2023-10-26 21:10 pkgconfig
Must be done by DA and not cleaned up afterwards.

@fln any insight? Might this be interesting for you?
 
Yes, ImageMagic is still being installed in /usr/local. It is OK to have these files they are actually being used by PHP builds created by CustomBuild.

Removal of custom libnghttp2 is already added in DA 1.657 (currently in alpha).
 
@fln DA 1.657 (currently in alpha) will support old PHP 5.6-7.x even on ubuntu 22 and 24(comes in 4 months) too?
 
Question seems to be a bit off-topic :).

DA 1.657 does allow using PHP 5.6 on Ubuntu 22 (this combination is covered by daily build test suite).

Can not give any guarantees about Ubuntu 24 we will see once it is released and once we try running tests on it.
 
Can not give any guarantees about Ubuntu 24 we will see once it is released and once we try running tests on it.
Doesn't Ubuntu 24 uses Openssl 3.0 which would mean customisation for Openssl to run php lower than 8.1?
 
Back
Top