Compiling OpenVPN 2.4 on Linux Mint 18

This forum is for all inquiries relating to the installation of OpenVPN from source and with binaries.
Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Normando
OpenVpn Newbie
Posts: 6
Joined: Wed Nov 11, 2015 7:04 pm

Compiling OpenVPN 2.4 on Linux Mint 18

Postby Normando » Thu Jun 15, 2017 8:35 am

Good day,

Linux Mint 18 came with OpenVPN 2.3. I need to update it to 2.4 in order to connect to a server.
Upon make, I receive the following:

g

Code: Select all

cc -DHAVE_CONFIG_H -I. -I../.. -I../../include  -I../../include -I../../src/compat   -I/usr/local/include    -DPLUGIN_LIBDIR=\"/usr/local/lib/openvpn/plugins\"  -g -O2 -std=c99 -MT crypto.o -MD -MP -MF .deps/crypto.Tpo -c -o crypto.o crypto.c
In file included from crypto.h:131:0,
                 from crypto.c:36:
crypto.c: In function ‘init_key_ctx’:
crypto.c:855:32: error: invalid application of ‘sizeof’ to incomplete type ‘cipher_ctx_t {aka struct evp_cipher_ctx_st}’
         ALLOC_OBJ(ctx->cipher, cipher_ctx_t);
                                ^
buffer.h:1015:61: note: in definition of macro ‘ALLOC_OBJ’
         check_malloc_return((dptr) = (type *) malloc(sizeof(type))); \
                                                             ^
crypto.c:879:30: error: invalid application of ‘sizeof’ to incomplete type ‘hmac_ctx_t {aka struct hmac_ctx_st}’
         ALLOC_OBJ(ctx->hmac, hmac_ctx_t);
                              ^
buffer.h:1015:61: note: in definition of macro ‘ALLOC_OBJ’
         check_malloc_return((dptr) = (type *) malloc(sizeof(type))); \
                                                             ^
Makefile:662: recipe for target 'crypto.o' failed
make[3]: *** [crypto.o] Error 1
make[3]: Leaving directory '/home/user/Downloads/openvpn-2.4.2/src/openvpn'
Makefile:418: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/user/Downloads/openvpn-2.4.2/src'
Makefile:604: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/user/Downloads/openvpn-2.4.2'
Makefile:491: recipe for target 'all' failed
make: *** [all] Error 2


Initially .configure demanded several dependencies to be installed most of which I got through apt-get. However, I had to compile and install the latest openssl which overwrote default one. Long story short, i think it was resolved following https://serverfault.com/questions/818445/error-while-loading-shared-libraries-libcrypto-so-1-1.

Any suggestion as to why I receive the above error message?

Many thanks!

Normando
OpenVpn Newbie
Posts: 6
Joined: Wed Nov 11, 2015 7:04 pm

Re: Compiling OpenVPN 2.4 on Linux Mint 18

Postby Normando » Thu Jun 15, 2017 8:53 am

I just found this: https://community.openvpn.net/openvpn/ticket/802
The openssl version I installed is 1.1.0f. Is that why I am getting the error message above?
If so, any idea if I can downgrade openssl and what version?
Thanks,

Normando
OpenVpn Newbie
Posts: 6
Joined: Wed Nov 11, 2015 7:04 pm

Re: Compiling OpenVPN 2.4 on Linux Mint 18

Postby Normando » Thu Jun 15, 2017 9:29 am

Wonderful, i just screwed myself over. Compiled and Installed 1.0.2 from source and now openssl does not work at all: bash:

Code: Select all

user@machine ~/Downloads/openssl-1.0.2l $ openssl
bash: /usr/local/bin/openssl: No such file or directory

Thats what i get for being sleep deprived and irritated.
Any suggestions at this point would go a long way.

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 2436
Joined: Fri Jun 03, 2016 1:17 pm

Re: Compiling OpenVPN 2.4 on Linux Mint 18

Postby TinCanTech » Thu Jun 15, 2017 1:00 pm

Officially, OpenVPN does not currently support OpenSSL 1.1x
and (technically) Linux Mint (Ubuntu) also officially uses OpenSSL 1.0.1f

So, you cannot use OpenSSL 1.1.x to build OpenVPN
and you better be careful what you do with OpenSSL Source 1.1x
because you can easily shoot yourself in the foot ..

If you want to get OpenVPN 2.4.x go here:
https://community.openvpn.net/openvpn/wiki/OpenvpnSoftwareRepos


Return to “Installation Help”

Who is online

Users browsing this forum: No registered users and 2 guests