If you try to build exim on a DirectAdmin server and it fails with the error:
In file included from tls.c:120: tls-openssl.c:78:3: warning: #warning "OpenSSL library version too old; define DISABLE_OCSP in Makefile" In file included from tls.c:120: tls-openssl.c: In function 'init_ecdh': tls-openssl.c:662: error: 'EC_KEY' undeclared (first use in this function) tls-openssl.c:662: error: (Each undeclared identifier is reported only once tls-openssl.c:662: error: for each function it appears in.) tls-openssl.c:662: error: 'ecdh' undeclared (first use in this function) In file included from tls.c:121: tlscert-openssl.c: In function 'asn1_time_copy': tlscert-openssl.c:121: warning: passing argument 2 of 'ASN1_TIME_print' discards qualifiers from pointer target type make[1]: *** [tls.o] Error 1 make[1]: Leaving directory `/usr/local/directadmin/custombuild/exim-4.86/build-Linux-x86_64' make: *** [all] Error 2
here you can find a possible solution of the issue.
To get it fixed and upgrade/install exim with custombuild run the following command
./build exim
until you get the message to retry the build (because it failed).
*** The make has failed, would you like to try to make again? (y,n):
Don't enter either y or n but press ctrl+z to push the build to the background and run this code:
echo "DISABLE_OCSP=yes" >> ./exim-4.86/Local/Makefile echo "OPENSSL_NO_ECDH=yes" >> ./exim-4.86/Local/Makefile
and this to open a file for editing:
vi ./exim-4.86/src/tls-openssl.c
Find and change code:
static BOOL init_ecdh(SSL_CTX * sctx, host_item * host) { EC_KEY * ecdh;
to
static BOOL init_ecdh(SSL_CTX * sctx, host_item * host) { #ifndef OPENSSL_NO_ECDH EC_KEY * ecdh; #endif
Save changes and exit the editor.
Then get the build process back to the foreground with:
fg
The process is still waiting for you to enter 'y' or 'n', although you don't see that. Type 'y' and press enter. The build will 'make' exim again without extracting the tar.gz and will succeed.
P.S. Credits to user sysdev for his instructions on how to build curl with custombuild from this post. As these instructions are based on the idea introduced by the user.