Exim fails to build

d.dobrev

Verified User
Joined
Mar 20, 2018
Messages
50
cc -o exim
/usr/bin/ld: rfc2047.o: in function `rfc2047_decode2':
rfc2047.c:(.text+0x3e9): undefined reference to `libiconv_open'
/usr/bin/ld: rfc2047.c:(.text+0x4d4): undefined reference to `libiconv'
/usr/bin/ld: rfc2047.c:(.text+0x562): undefined reference to `libiconv_close'
collect2: error: ld returned 1 exit status
make[1]: Leaving directory '/usr/local/directadmin/custombuild/tmp/tmp.LsGabDKNvU.exim-4.97.tar.gz/build-Linux-x86_64'
make[1]: *** [Makefile:687: exim] Error 1
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.LsGabDKNvU.exim-4.97.tar.gz'
failed to compile exim 4.97
 
OK, here's the trick:
Code:
root@serv:/usr/local/directadmin/custombuild# da build remove_old_local libiconv

after local libiconv is removed all went ok, I had to remove all:
Code:
icu
freetype
libglib
libiconv
libjpeg
libltdl
libmcrypt
libmhash
libpcre
libpcre2
libpng
libwebp
libsodium
libspf2
libsrs_alt
libxml2
libxslt
libzip
ragel

before it was possible to remove libiconv

at the end:
Code:
da build all
 
Last edited:
simelar problem
this command /usr/local/directadmin/custombuild# da build remove_old_local libiconv
gives notification :No such file or directory

I'm a nerd with Linux and can only handle DirectAdmin. every Linux commondo must be exactly correct because I don't understand anything about it

please...can someone help me

Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
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.fTF2OsdVsE.exim-4.97.tar.gz/build-Linux-x86_64'
/bin/sh ../scripts/Configure-os.c
cc buildconfig.c
/bin/sh ../scripts/Configure-config.h "make"
make[2]: Entering directory '/usr/local/directadmin/custombuild/tmp/tmp.fTF2OsdVsE.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.fTF2OsdVsE.exim-4.97.tar.gz/build-Linux-x86_64'
Building configuration file config.h
>>> config.h built

/bin/sh ../scripts/Configure-os.h
cc -DMACRO_PREDEF macro_predef.c
In file included from exim.h:550,
from macro_predef.c:13:
spf.h:18:10: fatal error: spf2/spf.h: No such file or directory
#include <spf2/spf.h>
^~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:263: macro_predef.o] Error 1
make[1]: Leaving directory '/usr/local/directadmin/custombuild/tmp/tmp.fTF2OsdVsE.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.fTF2OsdVsE.exim-4.97.tar.gz'
failed to compile exim 4.97
 
Having the same error I followed the outline above.
The error:
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'
doExim: failed to compile '/usr/local/directadmin/custombuild/cache/exim-4.97.1.tar.gz' inside '/usr/local/directadmin/custombuild/tmp/tmp.lQSfoFaMnZ.exim-4.97.1.tar.gz'

I did (after starting 'screen'):
# da build remove_old_local libiconv
refusing to remove 'libiconv', it must be the last package removed, please remove all other old packages list of removable packages can be checked with command:
da build list_removals

Ok, do that:
# da build list_removals
[ output very shortened, terms like 'not needed anymore' were shown ]
If you want to remove all the suggested programs above, run: da build remove_items

Ok, do that!
# da build remove_items
-- much text -- cut -- -- then last lines:
ATTENTION! Removing 'libiconv requires all CustomBuild managed software to be rebuilt!
All software components can be rebuilt with command:'
da build all

local package 'libiconv' is removed, it can be restored with command:
da build restore_old_local libiconv

Then I ran again:
# da build remove_items
To see if all went well. But it told me I had to manually remove libiconv, and I did just that:
#da build remove_old_local libiconv

After that I did:
#da build all

I did not think about the impact. It is upgrading things like Apache and php to the latest version.
Please take care to 'freeze' your versions if you have (like me) compiled components for Apache, unless you are prepared to compile them right now (I am always prepared).
After recompiling all Apache modules (mod_flvx mod_h264_streaming mod_auth_token mod_maxminddb), I was good to go.

PS: I did this on a CentOs 7 server which is going offline forever tomorrow, so I know there is nothing to loose. But all went file, and that is why I am giving this feedback. Someone else may feel uncomfertable (like me) removing so many libraries. In the end all went well.
Also note that DA did make copies of all removed libraries, and showed how to restore them 'just in case'.
 
Having the same error I followed the outline above.
The error:
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'
doExim: failed to compile '/usr/local/directadmin/custombuild/cache/exim-4.97.1.tar.gz' inside '/usr/local/directadmin/custombuild/tmp/tmp.lQSfoFaMnZ.exim-4.97.1.tar.gz'

I did (after starting 'screen'):
# da build remove_old_local libiconv
refusing to remove 'libiconv', it must be the last package removed, please remove all other old packages list of removable packages can be checked with command:
da build list_removals

Ok, do that:
# da build list_removals
[ output very shortened, terms like 'not needed anymore' were shown ]
If you want to remove all the suggested programs above, run: da build remove_items

Ok, do that!
# da build remove_items
-- much text -- cut -- -- then last lines:
ATTENTION! Removing 'libiconv requires all CustomBuild managed software to be rebuilt!
All software components can be rebuilt with command:'
da build all

local package 'libiconv' is removed, it can be restored with command:
da build restore_old_local libiconv

Then I ran again:
# da build remove_items
To see if all went well. But it told me I had to manually remove libiconv, and I did just that:
#da build remove_old_local libiconv

After that I did:
#da build all

I did not think about the impact. It is upgrading things like Apache and php to the latest version.
Please take care to 'freeze' your versions if you have (like me) compiled components for Apache, unless you are prepared to compile them right now (I am always prepared).
After recompiling all Apache modules (mod_flvx mod_h264_streaming mod_auth_token mod_maxminddb), I was good to go.

PS: I did this on a CentOs 7 server which is going offline forever tomorrow, so I know there is nothing to loose. But all went file, and that is why I am giving this feedback. Someone else may feel uncomfertable (like me) removing so many libraries. In the end all went well.
Also note that DA did make copies of all removed libraries, and showed how to restore them 'just in case'.
Confirmed working.
I just performed this due to exim and dovecot error.
 
Well.. I'm @ Debian Buster (YES, I KNOW) VM so da build remove_old_local libiconv did not go so well.
I'm restoring now and rebuilding, hopefully no issues....

I spoke too early... I reran da build all but when it went to build exim - it failed and that was it - didn't install the old version, didn't continue building the rest (if anything else was left)

Any ideas besides "OS is EOL, update it"? Don't have a spare server and there's several websites that can't be down for more than 10-20 minutes (and that's pushing it). I suppose the only way would be to build a new VM and move the /home disk (it's on separate partition) from the old VM to the new VM...
 
Last edited:
Back
Top