DirectAdmin Knowledge Base and Support

DirectAdmin is a web panel for a simple administration of both virtual and dedicated servers. DirectAdmin is faster, safe and more powerful than any other CP. And we know how to customize and support it.

./build exim fails with error: 'EC_KEY' undeclared

| 21:27:00 29.07.2015

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.

For exim 4.86

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;


static BOOL
init_ecdh(SSL_CTX * sctx, host_item * host)
EC_KEY * ecdh;

Save changes and exit the editor.

Then get the build process back to the foreground with:


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.

About Us
We are a team of professionals, and specialize in installation, configuring and managing of remote virtual and dedicated servers powered by Linux/Unix-like OS with DirectAdmin. We support various sets of software, including web-servers Apache, Nginx; internet domain name servers Bind, PowerDNS; mail-servers with POP3, IMAP and SMTP, FTP-servers, etc. After years of working through the most complex server challenges our team has gathered valuable experience and universal solutions suitable for everyday tasks. We are here to lend you a helping hand and take care of your servers in order to let you have enough time to do more of what you love.

All of the information and data on this site is for informational purposes only and is provided for the convenience of the user.
Powered by: Amiro.CMS - Free edition