OpenVPN compilation against OpenSSL 1.1.0

Weekly dev snapshots are available for testing.
We talk about them here. Testing features in the dev snapshot helps the features make it to stable.
Forum rules
Please report your experience with testing branch. Include what you were using and how
If there is a problem, the more info the better!
kenny
OpenVpn Newbie
Posts: 1
Joined: Thu Sep 15, 2016 7:05 am

OpenVPN compilation against OpenSSL 1.1.0

Postby kenny » Thu Sep 15, 2016 8:15 am

Hello,
I ran into problems compiling OpenVPN 2.3.12 against OpenSSL 1.1.0:

OpenSSL:

Code: Select all

tar zxf /usr/local/src/openssl-1.1.0.tar.gz
./config --prefix=/opt/openssl-1.1.0 && make && make test && make install


Code: Select all

ldd /opt/openssl-1.1.0/bin/openssl
        linux-vdso.so.1 =>  (0x00007fffab9ee000)
        libssl.so.1.1 => /opt/openssl-1.1.0/lib/libssl.so.1.1 (0x00007f80d229e000)
        libcrypto.so.1.1 => /opt/openssl-1.1.0/lib/libcrypto.so.1.1 (0x00007f80d1e36000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f80d1c26000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f80d1a06000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f80d166e000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f80d250e000)


Code: Select all

ldd /opt/openssl-1.1.0/lib/libcrypto.so
        linux-vdso.so.1 =>  (0x00007ffd7db46000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fe1f631e000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fe1f60fe000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fe1f5d66000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fe1f6996000)


OpenVPN

Code: Select all

tar zxf openvpn-2.3.12.tar.gz
cd openvpn-2.3.12
./configure --prefix=/opt/openvpn-2.3.12 --disable-plugin-auth-pam OPENSSL_SSL_CFLAGS="-I/opt/openssl-1.1.0/include/" OPENSSL_SSL_LIBS="-L/opt/openssl-1.1.0/lib/ -lssl" OPENSSL_CRYPTO_CFLAGS="-I/opt/openssl-1.1.0/include/" OPENSSL_CRYPTO_LIBS="-L/opt/openssl-1.1.0/lib/ -lcrypto" --disable-lzo
make


Output of make:

Code: Select all

make  all-recursive
make[1]: Entering directory `/usr/local/src/openvpn-2.3.12'
Making all in build
make[2]: Entering directory `/usr/local/src/openvpn-2.3.12/build'
Making all in msvc
make[3]: Entering directory `/usr/local/src/openvpn-2.3.12/build/msvc'
Making all in msvc-generate
make[4]: Entering directory `/usr/local/src/openvpn-2.3.12/build/msvc/msvc-generate'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/usr/local/src/openvpn-2.3.12/build/msvc/msvc-generate'
make[4]: Entering directory `/usr/local/src/openvpn-2.3.12/build/msvc'
make[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory `/usr/local/src/openvpn-2.3.12/build/msvc'
make[3]: Leaving directory `/usr/local/src/openvpn-2.3.12/build/msvc'
make[3]: Entering directory `/usr/local/src/openvpn-2.3.12/build'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/usr/local/src/openvpn-2.3.12/build'
make[2]: Leaving directory `/usr/local/src/openvpn-2.3.12/build'
Making all in distro
make[2]: Entering directory `/usr/local/src/openvpn-2.3.12/distro'
Making all in rpm
make[3]: Entering directory `/usr/local/src/openvpn-2.3.12/distro/rpm'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/usr/local/src/openvpn-2.3.12/distro/rpm'
make[3]: Entering directory `/usr/local/src/openvpn-2.3.12/distro'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/usr/local/src/openvpn-2.3.12/distro'
make[2]: Leaving directory `/usr/local/src/openvpn-2.3.12/distro'
Making all in include
make[2]: Entering directory `/usr/local/src/openvpn-2.3.12/include'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/src/openvpn-2.3.12/include'
Making all in src
make[2]: Entering directory `/usr/local/src/openvpn-2.3.12/src'
Making all in compat
make[3]: Entering directory `/usr/local/src/openvpn-2.3.12/src/compat'
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../..     -g -O2 -MT compat-dirname.lo -MD -MP -MF .deps/compat-dirname.Tpo -c -o compat-dirname.lo compat-dirname.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT compat-dirname.lo -MD -MP -MF .deps/compat-dirname.Tpo -c compat-dirname.c  -fPIC -DPIC -o .libs/compat-dirname.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT compat-dirname.lo -MD -MP -MF .deps/compat-dirname.Tpo -c compat-dirname.c -o compat-dirname.o >/dev/null 2>&1
mv -f .deps/compat-dirname.Tpo .deps/compat-dirname.Plo
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../..     -g -O2 -MT compat-basename.lo -MD -MP -MF .deps/compat-basename.Tpo -c -o compat-basename.lo compat-basename.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT compat-basename.lo -MD -MP -MF .deps/compat-basename.Tpo -c compat-basename.c  -fPIC -DPIC -o .libs/compat-basename.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT compat-basename.lo -MD -MP -MF .deps/compat-basename.Tpo -c compat-basename.c -o compat-basename.o >/dev/null 2>&1
mv -f .deps/compat-basename.Tpo .deps/compat-basename.Plo
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../..     -g -O2 -MT compat-gettimeofday.lo -MD -MP -MF .deps/compat-gettimeofday.Tpo -c -o compat-gettimeofday.lo compat-gettimeofday.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT compat-gettimeofday.lo -MD -MP -MF .deps/compat-gettimeofday.Tpo -c compat-gettimeofday.c  -fPIC -DPIC -o .libs/compat-gettimeofday.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT compat-gettimeofday.lo -MD -MP -MF .deps/compat-gettimeofday.Tpo -c compat-gettimeofday.c -o compat-gettimeofday.o >/dev/null 2>&1
mv -f .deps/compat-gettimeofday.Tpo .deps/compat-gettimeofday.Plo
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../..     -g -O2 -MT compat-daemon.lo -MD -MP -MF .deps/compat-daemon.Tpo -c -o compat-daemon.lo compat-daemon.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT compat-daemon.lo -MD -MP -MF .deps/compat-daemon.Tpo -c compat-daemon.c  -fPIC -DPIC -o .libs/compat-daemon.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT compat-daemon.lo -MD -MP -MF .deps/compat-daemon.Tpo -c compat-daemon.c -o compat-daemon.o >/dev/null 2>&1
mv -f .deps/compat-daemon.Tpo .deps/compat-daemon.Plo
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../..     -g -O2 -MT compat-inet_ntop.lo -MD -MP -MF .deps/compat-inet_ntop.Tpo -c -o compat-inet_ntop.lo compat-inet_ntop.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT compat-inet_ntop.lo -MD -MP -MF .deps/compat-inet_ntop.Tpo -c compat-inet_ntop.c  -fPIC -DPIC -o .libs/compat-inet_ntop.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT compat-inet_ntop.lo -MD -MP -MF .deps/compat-inet_ntop.Tpo -c compat-inet_ntop.c -o compat-inet_ntop.o >/dev/null 2>&1
mv -f .deps/compat-inet_ntop.Tpo .deps/compat-inet_ntop.Plo
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../..     -g -O2 -MT compat-inet_pton.lo -MD -MP -MF .deps/compat-inet_pton.Tpo -c -o compat-inet_pton.lo compat-inet_pton.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT compat-inet_pton.lo -MD -MP -MF .deps/compat-inet_pton.Tpo -c compat-inet_pton.c  -fPIC -DPIC -o .libs/compat-inet_pton.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -MT compat-inet_pton.lo -MD -MP -MF .deps/compat-inet_pton.Tpo -c compat-inet_pton.c -o compat-inet_pton.o >/dev/null 2>&1
mv -f .deps/compat-inet_pton.Tpo .deps/compat-inet_pton.Plo
/bin/sh ../../libtool  --tag=CC   --mode=link gcc  -g -O2   -o libcompat.la  compat-dirname.lo compat-basename.lo compat-gettimeofday.lo compat-daemon.lo compat-inet_ntop.lo compat-inet_pton.lo 
libtool: link: ar cru .libs/libcompat.a .libs/compat-dirname.o .libs/compat-basename.o .libs/compat-gettimeofday.o .libs/compat-daemon.o .libs/compat-inet_ntop.o .libs/compat-inet_pton.o
libtool: link: ranlib .libs/libcompat.a
libtool: link: ( cd ".libs" && rm -f "libcompat.la" && ln -s "../libcompat.la" "libcompat.la" )
make[3]: Leaving directory `/usr/local/src/openvpn-2.3.12/src/compat'
Making all in openvpn
make[3]: Entering directory `/usr/local/src/openvpn-2.3.12/src/openvpn'
gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../src/compat    -I/opt/openssl-1.1.0/include/ -I/opt/openssl-1.1.0/include/    -g -O2 -MT base64.o -MD -MP -MF .deps/base64.Tpo -c -o base64.o base64.c
mv -f .deps/base64.Tpo .deps/base64.Po
gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../src/compat    -I/opt/openssl-1.1.0/include/ -I/opt/openssl-1.1.0/include/    -g -O2 -MT buffer.o -MD -MP -MF .deps/buffer.Tpo -c -o buffer.o buffer.c
mv -f .deps/buffer.Tpo .deps/buffer.Po
gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../src/compat    -I/opt/openssl-1.1.0/include/ -I/opt/openssl-1.1.0/include/    -g -O2 -MT clinat.o -MD -MP -MF .deps/clinat.Tpo -c -o clinat.o clinat.c
mv -f .deps/clinat.Tpo .deps/clinat.Po
gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../src/compat    -I/opt/openssl-1.1.0/include/ -I/opt/openssl-1.1.0/include/    -g -O2 -MT crypto.o -MD -MP -MF .deps/crypto.Tpo -c -o crypto.o crypto.c
In file included from crypto.c:36:
crypto.h:437: error: field ‘ctx’ has incomplete type
crypto.c: In function ‘init_key_ctx’:
crypto.c:483: error: invalid application of ‘sizeof’ to incomplete type ‘cipher_ctx_t’
crypto.c:506: error: invalid application of ‘sizeof’ to incomplete type ‘hmac_ctx_t’
crypto.c: In function ‘read_passphrase_hash’:
crypto.c:1043: error: storage size of ‘md’ isn’t known
make[3]: *** [crypto.o] Error 1
make[3]: Leaving directory `/usr/local/src/openvpn-2.3.12/src/openvpn'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/openvpn-2.3.12/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/openvpn-2.3.12'
make: *** [all] Error 2


The same procedure against any OpenSSL 1.0.X works without problems (I'm using it this way for years).
Does anybody have any idea what's wrong? I can't find any hint...

Thanks in advance
Michal

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

Re: OpenVPN compilation against OpwnSSL 1.1.0

Postby TinCanTech » Thu Sep 15, 2016 11:33 am

I do not believe openvpn is ready for openssl 1.1.x yet ..


Return to “Testing branch”

Who is online

Users browsing this forum: No registered users and 1 guest