Skip to content

Instantly share code, notes, and snippets.

@Anubisss
Last active September 11, 2025 09:47
How to compile statically linked OpenVPN client for ARMv5

How to compile statically linked OpenVPN client for ARMv5

You need to install ARMv5 gcc cross compiler: apt-get install gcc-arm-linux-gnueabi

You have to define a directory (via --prefix) where all of your binaries will be installed (copied). In the guide I use the following: /home/user/vpn_compile

OpenSSL

  1. Download the source: wget https://www.openssl.org/source/openssl-1.0.2j.tar.gz
  2. Extract it and change the working directory: tar -xvf openssl-1.0.2j.tar.gz && cd openssl-1.0.2j
  3. Configure it: ./Configure gcc -static -no-shared --prefix=/home/user/vpn_compile --cross-compile-prefix=arm-linux-gnueabi-
  4. Compile: make
  5. Install: make install

LZO

  1. Download the source: wget http://www.oberhumer.com/opensource/lzo/download/lzo-2.09.tar.gz
  2. Extract it and change the working directory: tar -xvf lzo-2.09.tar.gz && cd lzo-2.09
  3. Configure it: ./configure --prefix=/home/user/vpn_compile --enable-static --target=arm-linux-gnueabi --host=arm-linux-gnueabi --disable-debug
  4. Compile: make
  5. Install: make install

OpenVPN

  1. Download the source: wget https://swupdate.openvpn.org/community/releases/openvpn-2.3.12.tar.gz
  2. Extract it and change the working directory: tar -xvf openvpn-2.3.12.tar.gz && cd openvpn-2.3.12
  3. Configure it: ./configure --target=arm-linux-gnueabi --host=arm-linux-gnueabi --prefix=/home/user/vpn_compile --disable-server --enable-static --disable-shared --disable-debug --disable-plugins OPENSSL_SSL_LIBS="-L/home/user/vpn_compile/lib -lssl" OPENSSL_SSL_CFLAGS="-I/home/user/vpn_compile/include" OPENSSL_CRYPTO_LIBS="-L/home/user/vpn_compile/lib -lcrypto" OPENSSL_CRYPTO_CFLAGS="-I/home/user/vpn_compile/include" LZO_CFLAGS="-I/home/user/vpn_compile/include" LZO_LIBS="-L/home/user/vpn_compile/lib -llzo2"
  4. Compile: make LIBS="-all-static"
  5. Install: make install

Your OpenVPN client is here: /home/user/vpn_compile/sbin/openvpn

Make sure this is what you need:

$ file /home/user/vpn_compile/sbin/openvpn
/home/user/vpn_compile/sbin/openvpn: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=e6fd2008c129fef90ed9826e3ffb9d53e83eb42c, not stripped

Versions

Build system:

$ uname -rm
4.4.0-45-generic x86_64
$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"
$ arm-linux-gnueabi-gcc --version
arm-linux-gnueabi-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609

Target system:

$ uname -rm
3.2.34 armv5tejl
$ openvpn --version
OpenVPN 2.3.12 arm-unknown-linux-gnueabi [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Oct 27 2016
library versions: OpenSSL 1.0.2j  26 Sep 2016, LZO 2.09
Originally developed by James Yonan
Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
Compile time defines: enable_crypto=yes enable_crypto_ofb_cfb=yes enable_debug=no enable_def_auth=yes enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown enable_fast_install=needless enable_fragment=yes enable_http_proxy=yes enable_iproute2=no enable_libtool_lock=yes enable_lzo=yes enable_lzo_stub=no enable_management=yes enable_multi=yes enable_multihome=yes enable_pam_dlopen=no enable_pedantic=no enable_pf=yes enable_pkcs11=no enable_plugin_auth_pam=no enable_plugin_down_root=no enable_plugins=no enable_port_share=yes enable_selinux=no enable_server=no enable_shared=no enable_shared_with_static_runtimes=no enable_small=no enable_socks=yes enable_ssl=yes enable_static=yes enable_strict=no enable_strict_options=no enable_systemd=no enable_win32_dll=yes enable_x509_alt_username=no with_crypto_library=openssl with_gnu_ld=yes with_mem_check=no with_plugindir='$(libdir)/openvpn/plugins' with_sysroot=no
@thomasa88
Copy link

Not related to above comment, but this is how I managed to compile OpenVPN 2.5.5 for the Synology DS212j (a bit old).

Synology toolchains:
https://sourceforge.net/projects/dsgpl/files/Tool%20Chain
For DS212j:
https://deac-ams.dl.sourceforge.net/project/dsgpl/Tool%20Chain/DSM%206.2.4%20Tool%20Chains/Marvell%2088F628x%20Linux%202.6.32/6281-gcc464_glibc215_88f6281-GPL.txz

Synology 6.2.4, DS212j build

export TOOLCHAIN=$HOME/src/openvpn-synology/arm-marvell-linux-gnueabi
# find arm-marvell-linux-gnueabi/ -name '*crt1*'
export SYSROOT=$TOOLCHAIN/arm-marvell-linux-gnueabi/libc
# Not all tools are contained inside the sysroot, so cannot use that "gcc" etc
#export PATH=$SYSROOT/bin:$PATH
export PATH=$TOOLCHAIN/bin:$PATH
export PREFIX=$HOME/src/openvpn-synology/prefix
export HOST=arm-marvell-linux-gnueabi

openssl-1.1.1n:
./Configure gcc --cross-compile-prefix=${HOST}- -static -no-shared --prefix=$PREFIX --sysroot=$SYSROOT
make -j8
make install


lzo-2.10: # Needed if we want lzo compression
./configure --host $HOST CC=$TOOLCHAIN/bin/${HOST}-gcc --enable-static --prefix=$PREFIX LDFLAGS="--sysroot=$SYSROOT" CFLAGS="--sysroot=$SYSROOT"
make -j8
make install


openvpn-2.5.5:
# lz4 compression compat files kicks in automatically.
./configure --host=$HOST CC=$TOOLCHAIN/bin/${HOST}-gcc --prefix=$PREFIX --enable-static --disable-shared --disable-debug --disable-plugins --disable-unit-tests LDFLAGS="--sysroot=$SYSROOT -L$PREFIX/lib" CFLAGS="--sysroot=$SYSROOT" CPPFLAGS="-I$PREFIX/include" 

# Fails on "no module named docutils", but succeeds if run again..
make -j8 LIBS="-all-static"

make install

@locnnil
Copy link

locnnil commented Nov 11, 2022

@hanneshoettinger Go inside the configure script and search for the keyword: OPENSSL_CRYPTO_LIBS looks that this options is not properly configured.

I'm building version 2.5.8 and inside of my configure there is no OPENSSL_CRYPTO_LIBS or OPENSSL_CRYPTO_CFLAGS

@CMohan22
Copy link

i'm trying to compile openssl , i 'm facing the below issue,
not sure which environmental variable is causing this issue ?

make[1]: Leaving directory '/home/hf/hydraforce_project/openvpn/openssl-1.0.2j/ssl'
making all in apps...
make[1]: Entering directory '/home/hf/hydraforce_project/openvpn/openssl-1.0.2j/apps'
rm -f openssl
shlib_target=; if [ -n "" ]; then
shlib_target="linux-shared";
elif [ -n "" ]; then
FIPSLD_CC="/home/hf/hydraforce_project/ql-ag35-le22-gcc640-v1-toolchain/gcc/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc"; CC=/usr/local/ssl/fips-2.0/bin/fipsld; export CC FIPSLD_CC;
fi;
LIBRARIES="-L.. -lssl -L.. -lcrypto" ;
make -f ../Makefile.shared -e
APPNAME=openssl OBJECTS="openssl.o verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o x509.o genrsa.o gendsa.o genpkey.o s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o pkey.o pkeyparam.o pkeyutl.o spkac.o smime.o cms.o rand.o engine.o ocsp.o prime.o ts.o srp.o"
LIBDEPS=" $LIBRARIES -ldl"
link_app.${shlib_target}
make[2]: Entering directory '/home/hf/hydraforce_project/openvpn/openssl-1.0.2j/apps'
( :; LIBDEPS="${LIBDEPS:--L.. -lssl -L.. -lcrypto -ldl}"; LDCMD="${LDCMD:-/home/hf/hydraforce_project/ql-ag35-le22-gcc640-v1-toolchain/gcc/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc}"; LDFLAGS="${LDFLAGS:--DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -static -O3 -Wall -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DAES_ASM -DBSAES_ASM -DGHASH_ASM}"; LIBPATH=for x in $LIBDEPS; do echo $x; done | sed -e 's/^ *-L//;t' -e d | uniq; LIBPATH=echo $LIBPATH | sed -e 's/ /:/g'; LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH ${LDCMD} ${LDFLAGS} -o ${APPNAME:=openssl} openssl.o verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o x509.o genrsa.o gendsa.o genpkey.o s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o pkey.o pkeyparam.o pkeyutl.o spkac.o smime.o cms.o rand.o engine.o ocsp.o prime.o ts.o srp.o ${LIBDEPS} )
/home/hf/hydraforce_project/ql-ag35-le22-gcc640-v1-toolchain/gcc/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/6.4.0/real-ld: error: cannot open crt1.o: No such file or directory
/home/hf/hydraforce_project/ql-ag35-le22-gcc640-v1-toolchain/gcc/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/6.4.0/real-ld: error: cannot open crti.o: No such file or directory
/home/hf/hydraforce_project/ql-ag35-le22-gcc640-v1-toolchain/gcc/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/6.4.0/real-ld: error: cannot open crtbeginT.o: No such file or directory
/home/hf/hydraforce_project/ql-ag35-le22-gcc640-v1-toolchain/gcc/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/6.4.0/real-ld: error: cannot find -lgcc
/home/hf/hydraforce_project/ql-ag35-le22-gcc640-v1-toolchain/gcc/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/6.4.0/real-ld: error: cannot find -lgcc_eh
/home/hf/hydraforce_project/ql-ag35-le22-gcc640-v1-toolchain/gcc/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/6.4.0/real-ld: error: cannot find -lc
/home/hf/hydraforce_project/ql-ag35-le22-gcc640-v1-toolchain/gcc/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/6.4.0/real-ld: error: cannot open crtend.o: No such file or directory
/home/hf/hydraforce_project/ql-ag35-le22-gcc640-v1-toolchain/gcc/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/6.4.0/real-ld: error: cannot open crtn.o: No such file or directory
/home/hf/hydraforce_project/ql-ag35-le22-gcc640-v1-toolchain/gcc/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/6.4.0/real-ld: error: cannot find -ldl
openssl.o:openssl.c:function lock_dbg_cb: error: undefined reference to 'fprintf'
openssl.o:openssl.c:function lock_dbg_cb: error: undefined reference to 'stderr'
openssl.o:openssl.c:function function_LHASH_COMP: error: undefined reference to 'strncmp'
openssl.o:openssl.c:function do_cmd: error: undefined reference to 'strncmp'
openssl.o:openssl.c:function do_cmd: error: undefined reference to 'strcmp'
openssl.o:openssl.c:function do_cmd: error: undefined reference to 'strcmp'
openssl.o:openssl.c:function do_cmd: error: undefined reference to 'strcmp'
openssl.o:openssl.c:function do_cmd: error: undefined reference to 'strcmp'
openssl.o:openssl.c:function do_cmd: error: undefined reference to 'stdout'
openssl.o:openssl.c:function main: error: undefined reference to 'getenv'
openssl.o:openssl.c:function main: error: undefined reference to 'getenv'
openssl.o:openssl.c:function main: error: undefined reference to 'getenv'
openssl.o:openssl.c:function main: error: undefined reference to 'fwrite'
openssl.o:openssl.c:function main: error: undefined reference to 'exit'
openssl.o:openssl.c:function main: error: undefined reference to 'signal'
openssl.o:openssl.c:function main: error: undefined reference to 'getenv'
openssl.o:openssl.c:function main: error: undefined reference to 'exit'
openssl.o:openssl.c:function main: error: undefined reference to 'qsort'
openssl.o:openssl.c:function main: error: undefined reference to 'exit'
openssl.o:openssl.c:function main: error: undefined reference to 'strlen'
openssl.o:openssl.c:function main: error: undefined reference to 'fputs'
openssl.o:openssl.c:function main: error: undefined reference to 'fflush'
openssl.o:openssl.c:function main: error: undefined reference to 'fgets'
openssl.o:openssl.c:function main: error: undefined reference to 'stderr'
openssl.o:openssl.c:function main: error: undefined reference to 'malloc'
openssl.o:openssl.c:function main: error: undefined reference to 'free'
openssl.o:openssl.c:function main: error: undefined reference to 'realloc'
openssl.o:openssl.c:function main: error: undefined reference to 'stdout'
openssl.o:openssl.c:function main: error: undefined reference to 'stdin'
verify.o:verify.c:function cb: error: undefined reference to 'putchar'
verify.o:verify.c:function cb: error: undefined reference to 'printf'
verify.o:verify.c:function cb: error: undefined reference to 'stdout'
verify.o:verify.c:function check: error: undefined reference to 'fprintf'
verify.o:verify.c:function check: error: undefined reference to 'fwrite'
verify.o:verify.c:function check: error: undefined reference to 'stdout'
verify.o:verify.c:function verify_main: error: undefined reference to 'signal'
verify.o:verify.c:function verify_main: error: undefined reference to 'abort'
verify.o:verify.c:function verify_main: error: undefined reference to 'stderr'
asn1pars.o:asn1pars.c:function asn1parse_main: error: undefined reference to 'signal'
asn1pars.o:asn1pars.c:function asn1parse_main: error: undefined reference to 'strtol'
asn1pars.o:asn1pars.c:function asn1parse_main: error: undefined reference to 'strtol'
asn1pars.o:asn1pars.c:function asn1parse_main: error: undefined reference to 'strtol'
asn1pars.o:asn1pars.c:function asn1parse_main: error: undefined reference to 'strtol'
asn1pars.o:asn1pars.c:function asn1parse_main: error: undefined reference to 'perror'
asn1pars.o:asn1pars.c:function asn1parse_main: error: undefined reference to 'stderr'
asn1pars.o:asn1pars.c:function asn1parse_main: error: undefined reference to 'stdin'
req.o:req.c:function req_main: error: undefined reference to 'signal'
req.o:req.c:function req_main: error: undefined reference to 'stdin'
req.o:req.c:function req_main: error: undefined reference to 'perror'
req.o:req.c:function req_main: error: undefined reference to 'fwrite'
req.o:req.c:function req_main: error: undefined reference to 'fwrite'
req.o:req.c:function req_main: error: undefined reference to 'fputc'
req.o:req.c:function req_main: error: undefined reference to 'perror'
req.o:req.c:function req_main: error: undefined reference to 'perror'
req.o:req.c:function req_main: error: undefined reference to 'strlen'
req.o:req.c:function req_main: error: undefined reference to 'fgets'
req.o:req.c:function req_main: error: undefined reference to 'strlen'
req.o:req.c:function req_main: error: undefined reference to 'fgets'
req.o:req.c:function req_main: error: undefined reference to 'stdin'
req.o:req.c:function check_end: error: undefined reference to 'strlen'
req.o:req.c:function set_keygen_ctx: error: undefined reference to 'strncmp'
req.o:req.c:function set_keygen_ctx: error: undefined reference to 'strchr'
dgst.o:dgst.c:function list_md_fn: error: undefined reference to 'strchr'
dh.o:dh.c:function dh_main: error: undefined reference to 'printf'
dh.o:dh.c:function dh_main: error: undefined reference to 'printf'
dh.o:dh.c:function dh_main: error: undefined reference to 'printf'
dh.o:dh.c:function dh_main: error: undefined reference to 'puts'
dh.o:dh.c:function dh_main: error: undefined reference to 'puts'
dh.o:dh.c:function dh_main: error: undefined reference to 'puts'
dh.o:dh.c:function dh_main: error: undefined reference to 'puts'
dhparam.o:dhparam.c:function dhparam_main: error: undefined reference to '__isoc99_sscanf'
enc.o:enc.c:function show_ciphers: error: undefined reference to '__ctype_b_loc'
enc.o:enc.c:function set_hex: error: undefined reference to 'memset'
enc.o:enc.c:function enc_main: error: undefined reference to 'setvbuf'
enc.o:enc.c:function enc_main: error: undefined reference to 'putchar'
enc.o:enc.c:function enc_main: error: undefined reference to 'putchar'
enc.o:enc.c:function enc_main: error: undefined reference to 'setvbuf'
enc.o:enc.c:function enc_main: error: undefined reference to 'memcmp'
enc.o:enc.c:function enc_main: error: undefined reference to 'putchar'
enc.o:enc.c:function enc_main: error: undefined reference to 'fopen'
enc.o:enc.c:function enc_main: error: undefined reference to 'fgets'
enc.o:enc.c:function enc_main: error: undefined reference to 'fclose'
passwd.o:passwd.c:function do_passwd: error: undefined reference to 'strncat'
passwd.o:passwd.c:function do_passwd: error: undefined reference to 'strncat'
passwd.o:passwd.c:function do_passwd: error: undefined reference to '__assert_fail'
passwd.o:passwd.c:function do_passwd: error: undefined reference to '__assert_fail'
passwd.o:passwd.c:function do_passwd: error: undefined reference to '__assert_fail'
passwd.o:passwd.c:function do_passwd: error: undefined reference to '__assert_fail'
passwd.o:passwd.c:function passwd_main: error: undefined reference to 'strchr'
passwd.o:passwd.c:function passwd_main: error: undefined reference to 'strchr'
gendh.o:gendh.c:function gendh_main: error: undefined reference to '__isoc99_sscanf'
errstr.o:errstr.c:function errstr_main: error: undefined reference to '__isoc99_sscanf'
ca.o:ca.c:function make_revocation_str: error: undefined reference to 'strcasecmp'
ca.o:ca.c:function make_revocation_str: error: undefined reference to 'strcasecmp'
ca.o:ca.c:function make_revocation_str: error: undefined reference to 'strcasecmp'
ca.o:ca.c:function make_revocation_str: error: undefined reference to 'strcasecmp'
ca.o:ca.c:function do_revoke: error: undefined reference to 'memcpy'
ca.o:ca.c:function old_entry_print: error: undefined reference to 'memset'
ca.o:ca.c:function ca_main: error: undefined reference to 'memcpy'
ca.o:ca.c:function ca_main: error: undefined reference to '__ctype_toupper_loc'
ca.o:ca.c:function ca_main: error: undefined reference to 'access'
ca.o:ca.c:function ca_main: error: undefined reference to 'memcpy'
ca.o:ca.c:function ca_main: error: undefined reference to 'strncmp'
ca.o:ca.c:function ca_main: error: undefined reference to 'memcpy'
rsautl.o:rsautl.c:function rsautl_main: error: undefined reference to 'exit'
dsa.o:dsa.c:function dsa_main: error: undefined reference to 'fputc'
dsaparam.o:dsaparam.c:function dsaparam_main: error: undefined reference to '__isoc99_sscanf'
ecparam.o:ecparam.c:function ecparam_print_var: error: undefined reference to '__aeabi_idivmod'
ecparam.o:ecparam.c:function ecparam_print_var: error: undefined reference to '__aeabi_idivmod'
x509.o:x509.c:function x509_main: error: undefined reference to 'time'
s_server.o:s_server.c:function sv_body: error: undefined reference to 'memset'
s_server.o:s_server.c:function sv_body: error: undefined reference to 'select'
s_server.o:s_server.c:function sv_body: error: undefined reference to 'shutdown'
s_server.o:s_server.c:function sv_body: error: undefined reference to 'close'
s_server.o:s_server.c:function sv_body: error: undefined reference to 'shutdown'
s_server.o:s_server.c:function sv_body: error: undefined reference to 'close'
s_server.o:s_server.c:function sv_body: error: undefined reference to 'shutdown'
s_server.o:s_server.c:function sv_body: error: undefined reference to 'close'
s_server.o:s_server.c:function www_body: error: undefined reference to 'sleep'
s_server.o:s_server.c:function rev_body: error: undefined reference to 'sleep'
s_server.o:s_server.c:function del_session: error: undefined reference to 'memcmp'
s_server.o:s_server.c:function get_session: error: undefined reference to 'memcmp'
s_server.o:s_server.c:function s_server_main: error: undefined reference to '__ctype_b_loc'
s_client.o:s_client.c:function s_client_main: error: undefined reference to 'memset'
s_client.o:s_client.c:function s_client_main: error: undefined reference to 'select'
s_client.o:s_client.c:function s_client_main: error: undefined reference to 'shutdown'
s_client.o:s_client.c:function s_client_main: error: undefined reference to 'close'
s_client.o:s_client.c:function s_client_main: error: undefined reference to '__errno_location'
s_client.o:s_client.c:function s_client_main: error: undefined reference to '__errno_location'
s_client.o:s_client.c:function s_client_main: error: undefined reference to '__errno_location'
s_client.o:s_client.c:function s_client_main: error: undefined reference to 'strstr'
s_client.o:s_client.c:function s_client_main: error: undefined reference to 'strstr'
s_client.o:s_client.c:function s_client_main: error: undefined reference to 'strstr'
s_client.o:s_client.c:function s_client_main: error: undefined reference to 'strstr'
s_client.o:s_client.c:function s_client_main: error: undefined reference to '__errno_location'
s_client.o:s_client.c:function s_client_main: error: undefined reference to 'getsockname'
s_client.o:s_client.c:function s_client_main: error: undefined reference to '__ctype_b_loc'
speed.o:speed.c:function speed_main: error: undefined reference to 'alarm'
speed.o:speed.c:function speed_main: error: undefined reference to 'alarm'
speed.o:speed.c:function speed_main: error: undefined reference to 'alarm'
speed.o:speed.c:function speed_main: error: undefined reference to 'alarm'
speed.o:speed.c:function speed_main: error: undefined reference to 'fprintf'
speed.o:speed.c:function speed_main: error: undefined reference to 'fprintf'
speed.o:speed.c:function speed_main: error: undefined reference to 'fputc'
speed.o:speed.c:function speed_main: error: undefined reference to 'fputc'
speed.o:speed.c:function speed_main: error: undefined reference to 'malloc'
speed.o:speed.c:function speed_main: error: undefined reference to 'pipe'
speed.o:speed.c:function speed_main: error: undefined reference to 'fflush'
speed.o:speed.c:function speed_main: error: undefined reference to 'fflush'
speed.o:speed.c:function speed_main: error: undefined reference to 'fork'
speed.o:speed.c:function speed_main: error: undefined reference to 'dup'
speed.o:speed.c:function speed_main: error: undefined reference to 'free'
speed.o:speed.c:function speed_main: error: undefined reference to 'fdopen'
speed.o:speed.c:function speed_main: error: undefined reference to 'fclose'
speed.o:speed.c:function speed_main: error: undefined reference to 'free'
speed.o:speed.c:function speed_main: error: undefined reference to 'strtod'
speed.o:speed.c:function speed_main: error: undefined reference to 'strtod'
speed.o:speed.c:function speed_main: error: undefined reference to 'strtod'
speed.o:speed.c:function speed_main: error: undefined reference to 'strtod'
s_time.o:s_time.c:function doConnection: error: undefined reference to 'select'
s_time.o:s_time.c:function s_time_main: error: undefined reference to 'time'
s_time.o:s_time.c:function s_time_main: error: undefined reference to 'time'
s_time.o:s_time.c:function s_time_main: error: undefined reference to 'fflush'
s_time.o:s_time.c:function s_time_main: error: undefined reference to 'time'
s_time.o:s_time.c:function s_time_main: error: undefined reference to '__aeabi_idiv'
s_time.o:s_time.c:function s_time_main: error: undefined reference to '__aeabi_idiv'
apps.o:apps.c:function program_name: error: undefined reference to 'strrchr'
apps.o:apps.c:function load_cert: error: undefined reference to 'setvbuf'
apps.o:apps.c:function load_key: error: undefined reference to 'setvbuf'
apps.o:apps.c:function rotate_serial: error: undefined reference to 'rename'
apps.o:apps.c:function rotate_serial: error: undefined reference to 'rename'
apps.o:apps.c:function rotate_serial: error: undefined reference to 'rename'
apps.o:apps.c:function rotate_index: error: undefined reference to 'rename'
apps.o:apps.c:function app_tminterval: error: undefined reference to 'times'
apps.o:apps.c:function app_tminterval: error: undefined reference to 'sysconf'
apps.o:apps.c:function app_isdir: error: undefined reference to '__xstat'
apps.o:apps.c:function fileno_stdin: error: undefined reference to 'fileno'
apps.o:apps.c:function fileno_stdout: error: undefined reference to 'fileno'
apps.o:apps.c:function raw_read_stdin: error: undefined reference to 'fileno'
apps.o:apps.c:function raw_read_stdin: error: undefined reference to 'read'
apps.o:apps.c:function raw_write_stdout: error: undefined reference to 'fileno'
apps.o:apps.c:function raw_write_stdout: error: undefined reference to 'write'
s_cb.o:s_cb.c:function verify_cookie_callback: error: undefined reference to 'memcmp'
s_socket.o:s_socket.c:function GetHostByName: error: undefined reference to 'gethostbyname'
s_socket.o:s_socket.c:function init_client: error: undefined reference to 'socket'
s_socket.o:s_socket.c:function init_client: error: undefined reference to 'connect'
s_socket.o:s_socket.c:function init_client: error: undefined reference to 'socket'
s_socket.o:s_socket.c:function init_client: error: undefined reference to 'setsockopt'
s_socket.o:s_socket.c:function do_server: error: undefined reference to 'socket'
s_socket.o:s_socket.c:function do_server: error: undefined reference to 'setsockopt'
s_socket.o:s_socket.c:function do_server: error: undefined reference to 'bind'
s_socket.o:s_socket.c:function do_server: error: undefined reference to 'accept'
s_socket.o:s_socket.c:function do_server: error: undefined reference to 'gethostbyaddr'
s_socket.o:s_socket.c:function do_server: error: undefined reference to 'listen'
s_socket.o:s_socket.c:function extract_host_port: error: undefined reference to 'getservbyname'
s_socket.o:s_socket.c:function extract_port: error: undefined reference to 'getservbyname'
rand.o:rand.c:function rand_main: error: undefined reference to '__ctype_b_loc'
engine.o:engine.c:function engine_main: error: undefined reference to 'strspn'
engine.o:engine.c:function engine_main: error: undefined reference to 'strspn'
ocsp.o:ocsp.c:function process_responder: error: undefined reference to 'select'
../libssl.a(s3_srvr.o):s3_srvr.c:function ssl3_send_server_key_exchange: error: undefined reference to 'strncpy'
../libssl.a(s3_srvr.o):s3_srvr.c:function ssl3_get_client_key_exchange: error: undefined reference to 'memmove'
../libssl.a(s3_clnt.o):s3_clnt.c:function ssl3_send_client_key_exchange: error: undefined reference to 'memmove'
../libssl.a(s3_enc.o):s3_enc.c:function ssl3_enc: error: undefined reference to '__aeabi_uidivmod'
../libssl.a(s3_enc.o):s3_enc.c:function ssl3_enc: error: undefined reference to 'memmove'
../libssl.a(s3_enc.o):s3_enc.c:function ssl3_enc: error: undefined reference to '__aeabi_idivmod'
../libssl.a(s3_enc.o):s3_enc.c:function ssl3_handshake_mac: error: undefined reference to '__aeabi_idiv'
../libssl.a(s3_enc.o):s3_enc.c:function n_ssl3_mac: error: undefined reference to '__aeabi_uidiv'
../libssl.a(s3_pkt.o):s3_pkt.c:function ssl3_read_n: error: undefined reference to 'memmove'
../libssl.a(s3_cbc.o):s3_cbc.c:function ssl3_cbc_copy_mac: error: undefined reference to '__aeabi_uidivmod'
../libssl.a(s3_cbc.o):s3_cbc.c:function ssl3_cbc_digest_record: error: undefined reference to '__aeabi_uidiv'
../libssl.a(s3_cbc.o):s3_cbc.c:function ssl3_cbc_digest_record: error: undefined reference to '__aeabi_uidivmod'
../libssl.a(s3_cbc.o):s3_cbc.c:function ssl3_cbc_digest_record: error: undefined reference to '__aeabi_uidiv'
../libssl.a(s3_cbc.o):s3_cbc.c:function ssl3_cbc_digest_record: error: undefined reference to '__aeabi_uidiv'
../libssl.a(s3_cbc.o):s3_cbc.c:function ssl3_cbc_digest_record: error: undefined reference to '__aeabi_uidivmod'
../libssl.a(t1_enc.o):t1_enc.c:function tls1_PRF.constprop.1: error: undefined reference to '__aeabi_idiv'
../libssl.a(t1_enc.o):t1_enc.c:function tls1_enc: error: undefined reference to '__aeabi_idivmod'
../libssl.a(d1_lib.o):d1_lib.c:function dtls1_start_timer: error: undefined reference to 'gettimeofday'
../libssl.a(d1_lib.o):d1_lib.c:function dtls1_get_timeout: error: undefined reference to 'gettimeofday'
../libssl.a(d1_lib.o):d1_lib.c:function dtls1_is_timer_expired: error: undefined reference to 'gettimeofday'
../libssl.a(d1_lib.o):d1_lib.c:function dtls1_double_timeout: error: undefined reference to 'gettimeofday'
../libssl.a(ssl_sess.o):ssl_sess.c:function ssl_get_prev_session: error: undefined reference to 'abort'
../libssl.a(ssl_conf.o):ssl_conf.c:function ssl_set_option_list: error: undefined reference to 'strncasecmp'
../libssl.a(ssl_conf.o):ssl_conf.c:function SSL_CONF_cmd: error: undefined reference to 'strncasecmp'
../libssl.a(ssl_conf.o):ssl_conf.c:function SSL_CONF_cmd_value_type: error: undefined reference to 'strncasecmp'
../libcrypto.a(cryptlib.o):cryptlib.c:function CRYPTO_thread_id: error: undefined reference to 'getpid'
../libcrypto.a(cryptlib.o):cryptlib.c:function OPENSSL_showfatal: error: undefined reference to 'vfprintf'
../libcrypto.a(cryptlib.o):cryptlib.c:function OpenSSLDie: error: undefined reference to 'abort'
../libcrypto.a(mem.o):mem.c:function CRYPTO_strdup: error: undefined reference to 'strcpy'
../libcrypto.a(mem.o):mem.c:malloc_func: error: undefined reference to 'malloc'
../libcrypto.a(mem.o):mem.c:realloc_func: error: undefined reference to 'realloc'
../libcrypto.a(mem.o):mem.c:malloc_locked_func: error: undefined reference to 'malloc'
../libcrypto.a(mem.o):mem.c:free_func: error: undefined reference to 'free'
../libcrypto.a(mem_dbg.o):mem_dbg.c:function print_leak_doall_arg: error: undefined reference to 'localtime'
../libcrypto.a(o_dir.o):o_dir.c:function OPENSSL_DIR_read: error: undefined reference to 'readdir'
../libcrypto.a(o_dir.o):o_dir.c:function OPENSSL_DIR_read: error: undefined reference to 'strncpy'
../libcrypto.a(o_dir.o):o_dir.c:function OPENSSL_DIR_read: error: undefined reference to 'calloc'
../libcrypto.a(o_dir.o):o_dir.c:function OPENSSL_DIR_read: error: undefined reference to 'opendir'
../libcrypto.a(o_dir.o):o_dir.c:function OPENSSL_DIR_end: error: undefined reference to 'closedir'
../libcrypto.a(o_names.o):o_names.c:function OBJ_NAME_do_all_sorted: error: undefined reference to 'qsort'
../libcrypto.a(bn_word.o):bn_word.c:function BN_mod_word: error: undefined reference to '__aeabi_uldivmod'
../libcrypto.a(bn_asm.o):bn_asm.c:function bn_div_words: error: undefined reference to '__aeabi_uldivmod'
../libcrypto.a(tb_asnmth.o):tb_asnmth.c:function look_str_cb: error: undefined reference to 'strncasecmp'
../libcrypto.a(bio_cb.o):bio_cb.c:function BIO_debug_callback: error: undefined reference to 'fputs'
../libcrypto.a(bss_fd.o):bss_fd.c:function fd_ctrl: error: undefined reference to 'lseek'
../libcrypto.a(bss_fd.o):bss_fd.c:function fd_ctrl: error: undefined reference to 'lseek'
../libcrypto.a(bss_fd.o):bss_fd.c:function fd_read: error: undefined reference to 'read'
../libcrypto.a(bss_fd.o):bss_fd.c:function fd_gets: error: undefined reference to 'read'
../libcrypto.a(bss_fd.o):bss_fd.c:function fd_puts: error: undefined reference to 'write'
../libcrypto.a(bss_fd.o):bss_fd.c:function fd_write: error: undefined reference to 'write'
../libcrypto.a(bss_file.o):bss_file.c:function file_read: error: undefined reference to 'fread'
../libcrypto.a(bss_file.o):bss_file.c:function file_read: error: undefined reference to 'ferror'
../libcrypto.a(bss_file.o):bss_file.c:function file_free: error: undefined reference to 'fclose'
../libcrypto.a(bss_file.o):bss_file.c:function file_ctrl: error: undefined reference to 'fopen64'
../libcrypto.a(bss_file.o):bss_file.c:function file_ctrl: error: undefined reference to 'fseek'
../libcrypto.a(bss_file.o):bss_file.c:function file_ctrl: error: undefined reference to 'feof'
../libcrypto.a(bss_file.o):bss_file.c:function file_ctrl: error: undefined reference to 'ftell'
../libcrypto.a(bss_file.o):bss_file.c:function file_ctrl: error: undefined reference to 'fclose'
../libcrypto.a(bss_file.o):bss_file.c:function BIO_new_file: error: undefined reference to 'fopen64'
../libcrypto.a(bss_sock.o):bss_sock.c:function sock_read: error: undefined reference to 'read'
../libcrypto.a(bss_sock.o):bss_sock.c:function sock_puts: error: undefined reference to 'write'
../libcrypto.a(bss_conn.o):bss_conn.c:function conn_state: error: undefined reference to 'connect'
../libcrypto.a(bss_conn.o):bss_conn.c:function conn_state: error: undefined reference to 'socket'
../libcrypto.a(bss_conn.o):bss_conn.c:function conn_state: error: undefined reference to 'setsockopt'
../libcrypto.a(b_print.o):b_print.c:function fmtint: error: undefined reference to '__aeabi_uldivmod'
../libcrypto.a(b_print.o):b_print.c:function fmtint: error: undefined reference to '__aeabi_uldivmod'
../libcrypto.a(b_sock.o):b_sock.c:function BIO_get_host_ip: error: undefined reference to 'gethostbyname'
../libcrypto.a(b_sock.o):b_sock.c:function BIO_get_port: error: undefined reference to 'getservbyname'
../libcrypto.a(b_sock.o):b_sock.c:function BIO_sock_error: error: undefined reference to 'getsockopt'
../libcrypto.a(b_sock.o):b_sock.c:function BIO_gethostbyname: error: undefined reference to 'gethostbyname'
../libcrypto.a(b_sock.o):b_sock.c:function BIO_socket_ioctl: error: undefined reference to 'ioctl'
../libcrypto.a(b_sock.o):b_sock.c:function BIO_get_accept_socket: error: undefined reference to 'bind'
../libcrypto.a(b_sock.o):b_sock.c:function BIO_get_accept_socket: error: undefined reference to 'connect'
../libcrypto.a(b_sock.o):b_sock.c:function BIO_get_accept_socket: error: undefined reference to 'setsockopt'
../libcrypto.a(b_sock.o):b_sock.c:function BIO_get_accept_socket: error: undefined reference to 'bind'
../libcrypto.a(b_sock.o):b_sock.c:function BIO_get_accept_socket: error: undefined reference to 'listen'
../libcrypto.a(b_sock.o):b_sock.c:function BIO_accept: error: undefined reference to 'accept'
../libcrypto.a(b_sock.o):b_sock.c:function BIO_socket_nbio: error: undefined reference to 'ioctl'
../libcrypto.a(bss_dgram.o):bss_dgram.c:function dgram_read: error: undefined reference to 'getsockopt'
../libcrypto.a(bss_dgram.o):bss_dgram.c:function dgram_read: error: undefined reference to 'recvfrom'
../libcrypto.a(bss_dgram.o):bss_dgram.c:function dgram_ctrl: error: undefined reference to 'getsockname'
../libcrypto.a(bss_dgram.o):bss_dgram.c:function dgram_ctrl: error: undefined reference to 'getsockopt'
../libcrypto.a(bss_dgram.o):bss_dgram.c:function dgram_ctrl: error: undefined reference to 'getsockopt'
../libcrypto.a(bss_dgram.o):bss_dgram.c:function dgram_ctrl: error: undefined reference to 'getsockname'
../libcrypto.a(bss_dgram.o):bss_dgram.c:function dgram_write: error: undefined reference to 'sendto'
../libcrypto.a(bss_dgram.o):bss_dgram.c:function dgram_puts: error: undefined reference to 'sendto'
../libcrypto.a(stack.o):stack.c:function sk_find: error: undefined reference to 'qsort'
../libcrypto.a(stack.o):stack.c:function sk_find_ex: error: undefined reference to 'qsort'
../libcrypto.a(randfile.o):randfile.c:function RAND_load_file: error: undefined reference to '__xstat'
../libcrypto.a(randfile.o):randfile.c:function RAND_load_file: error: undefined reference to 'fopen'
../libcrypto.a(randfile.o):randfile.c:function RAND_load_file: error: undefined reference to 'fread'
../libcrypto.a(randfile.o):randfile.c:function RAND_load_file: error: undefined reference to 'fread'
../libcrypto.a(randfile.o):randfile.c:function RAND_write_file: error: undefined reference to '__xstat'
../libcrypto.a(randfile.o):randfile.c:function RAND_write_file: error: undefined reference to 'open'
../libcrypto.a(randfile.o):randfile.c:function RAND_write_file: error: undefined reference to 'fdopen'
../libcrypto.a(randfile.o):randfile.c:function RAND_write_file: error: undefined reference to 'chmod'
../libcrypto.a(randfile.o):randfile.c:function RAND_write_file: error: undefined reference to 'fopen'
../libcrypto.a(rand_egd.o):rand_egd.c:function RAND_query_egd_bytes: error: undefined reference to 'connect'
../libcrypto.a(err.o):err.c:function ERR_load_ERR_strings: error: undefined reference to 'strerror'
../libcrypto.a(err.o):err.c:function ERR_load_ERR_strings: error: undefined reference to 'strncpy'
../libcrypto.a(evp_key.o):evp_key.c:function EVP_set_pw_prompt: error: undefined reference to 'strncpy'
../libcrypto.a(x_name.o):x_name.c:function x509_name_canon.part.0: error: undefined reference to '__ctype_tolower_loc'
../libcrypto.a(asn1_gen.o):asn1_gen.c:function parse_tagging: error: undefined reference to 'strtoul'
../libcrypto.a(asn1_gen.o):asn1_gen.c:function bitstr_cb: error: undefined reference to 'strtoul'
../libcrypto.a(a_strnid.o):a_strnid.c:function ASN1_STRING_set_default_mask_asc: error: undefined reference to 'strtoul'
../libcrypto.a(by_dir.o):by_dir.c:function get_cert_by_subject: error: undefined reference to '__xstat'
../libcrypto.a(x509_vpm.o):x509_vpm.c:function X509_VERIFY_PARAM_set1_host: error: undefined reference to 'memchr'
../libcrypto.a(x509_vpm.o):x509_vpm.c:function X509_VERIFY_PARAM_add1_host: error: undefined reference to 'memchr'
../libcrypto.a(v3_utl.o):v3_utl.c:function string_to_hex: error: undefined reference to '__ctype_tolower_loc'
../libcrypto.a(v3_utl.o):v3_utl.c:function string_to_hex: error: undefined reference to '__ctype_tolower_loc'
../libcrypto.a(v3_utl.o):v3_utl.c:function X509_check_host: error: undefined reference to 'memchr'
../libcrypto.a(v3_utl.o):v3_utl.c:function X509_check_host: error: undefined reference to 'memchr'
../libcrypto.a(v3_alt.o):v3_alt.c:function i2v_GENERAL_NAME: error: undefined reference to 'strcat'
../libcrypto.a(v3_alt.o):v3_alt.c:function i2v_GENERAL_NAME: error: undefined reference to 'strcat'
../libcrypto.a(conf_mod.o):conf_mod.c:function CONF_modules_load: error: undefined reference to 'strrchr'
../libcrypto.a(ocsp_ht.o):ocsp_ht.c:function OCSP_REQ_CTX_nbio: error: undefined reference to 'strtoul'
../libcrypto.a(ui_openssl.o):ui_openssl.c:function write_string: error: undefined reference to 'fputs'
../libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'sigaction'
../libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'feof'
../libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'sigaction'
../libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'tcsetattr'
../libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'tcsetattr'
../libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'ferror'
../libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string: error: undefined reference to 'fputs'
../libcrypto.a(ui_openssl.o):ui_openssl.c:function open_console: error: undefined reference to 'fopen'
../libcrypto.a(ui_openssl.o):ui_openssl.c:function open_console: error: undefined reference to 'tcgetattr'
../libcrypto.a(ts_rsp_sign.o):ts_rsp_sign.c:function TS_RESP_create_response: error: undefined reference to 'gmtime'
../libcrypto.a(ts_rsp_verify.o):ts_rsp_verify.c:function TS_RESP_verify_response: error: undefined reference to 'strcat'
../libcrypto.a(e_aep.o):e_aep.c:function aep_get_connection: error: undefined reference to 'getpid'
../libcrypto.a(e_cswift.o):e_cswift.c:function cswift_rand_bytes: error: undefined reference to 'sprintf'
../libcrypto.a(e_cswift.o):e_cswift.c:function cswift_rand_bytes: error: undefined reference to 'sprintf'
../libcrypto.a(e_cswift.o):e_cswift.c:function cswift_mod_exp_dh: error: undefined reference to 'sprintf'
../libcrypto.a(e_cswift.o):e_cswift.c:function cswift_mod_exp_dh: error: undefined reference to 'sprintf'
../libcrypto.a(gost_pmeth.o):gost_pmeth.c:function pkey_gost_ctrl01_str: error: undefined reference to '__ctype_toupper_loc'
../libcrypto.a(gost_pmeth.o):gost_pmeth.c:function pkey_gost_ctrl01_str: error: undefined reference to '__ctype_toupper_loc'
../libcrypto.a(gost_pmeth.o):gost_pmeth.c:function pkey_gost_ctrl94_str: error: undefined reference to '__ctype_toupper_loc'
../libcrypto.a(uid.o):uid.c:function OPENSSL_issetugid: error: undefined reference to 'getuid'
../libcrypto.a(uid.o):uid.c:function OPENSSL_issetugid: error: undefined reference to 'geteuid'
../libcrypto.a(uid.o):uid.c:function OPENSSL_issetugid: error: undefined reference to 'getgid'
../libcrypto.a(uid.o):uid.c:function OPENSSL_issetugid: error: undefined reference to 'getegid'
../libcrypto.a(o_time.o):o_time.c:function OPENSSL_gmtime: error: undefined reference to 'gmtime_r'
../libcrypto.a(armcap.o):armcap.c:function ill_handler: error: undefined reference to 'siglongjmp'
../libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigfillset'
../libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigdelset'
../libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigdelset'
../libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigdelset'
../libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigdelset'
../libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigprocmask'
../libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigaction'
../libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to '__sigsetjmp'
../libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigaction'
../libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigprocmask'
../libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to '__sigsetjmp'
../libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to '__sigsetjmp'
../libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to '__sigsetjmp'
../libcrypto.a(md_rand.o):md_rand.c:function ssleay_rand_bytes: error: undefined reference to 'getpid'
../libcrypto.a(rand_unix.o):rand_unix.c:function RAND_poll: error: undefined reference to 'getpid'
../libcrypto.a(rand_unix.o):rand_unix.c:function RAND_poll: error: undefined reference to 'open'
../libcrypto.a(rand_unix.o):rand_unix.c:function RAND_poll: error: undefined reference to 'getuid'
../libcrypto.a(rand_unix.o):rand_unix.c:function RAND_poll: error: undefined reference to '__fxstat'
../libcrypto.a(rand_unix.o):rand_unix.c:function RAND_poll: error: undefined reference to 'poll'
../libcrypto.a(asn_mime.o):asn_mime.c:function mime_hdr_new: error: undefined reference to '__ctype_tolower_loc'
../libcrypto.a(asn_moid.o):asn_moid.c:function oid_module_init: error: undefined reference to 'strrchr'
../libcrypto.a(dso_dlfcn.o):dso_dlfcn.c:function dlfcn_globallookup: error: undefined reference to 'dlopen'
../libcrypto.a(dso_dlfcn.o):dso_dlfcn.c:function dlfcn_globallookup: error: undefined reference to 'dlsym'
../libcrypto.a(dso_dlfcn.o):dso_dlfcn.c:function dlfcn_globallookup: error: undefined reference to 'dlclose'
../libcrypto.a(dso_dlfcn.o):dso_dlfcn.c:function dlfcn_merger: error: undefined reference to 'strcpy'
../libcrypto.a(dso_dlfcn.o):dso_dlfcn.c:function dlfcn_merger: error: undefined reference to 'strcpy'
../libcrypto.a(dso_dlfcn.o):dso_dlfcn.c:function dlfcn_merger: error: undefined reference to 'strcpy'
../libcrypto.a(dso_dlfcn.o):dso_dlfcn.c:function dlfcn_bind_func: error: undefined reference to 'dlsym'
../libcrypto.a(dso_dlfcn.o):dso_dlfcn.c:function dlfcn_bind_func: error: undefined reference to 'dlerror'
../libcrypto.a(dso_dlfcn.o):dso_dlfcn.c:function dlfcn_bind_var: error: undefined reference to 'dlsym'
../libcrypto.a(dso_dlfcn.o):dso_dlfcn.c:function dlfcn_bind_var: error: undefined reference to 'dlerror'
../libcrypto.a(dso_dlfcn.o):dso_dlfcn.c:function dlfcn_load: error: undefined reference to 'dlopen'
../libcrypto.a(dso_dlfcn.o):dso_dlfcn.c:function dlfcn_load: error: undefined reference to 'dlclose'
../libcrypto.a(dso_dlfcn.o):dso_dlfcn.c:function dlfcn_load: error: undefined reference to 'dlerror'
../libcrypto.a(dso_dlfcn.o):dso_dlfcn.c:function dlfcn_pathbyaddr: error: undefined reference to 'dladdr'
../libcrypto.a(dso_dlfcn.o):dso_dlfcn.c:function dlfcn_pathbyaddr: error: undefined reference to 'dlerror'
../libcrypto.a(dso_dlfcn.o):dso_dlfcn.c:function dlfcn_unload: error: undefined reference to 'dlclose'
collect2: error: ld returned 1 exit status
make[2]: *** [../Makefile.shared:164: link_app.] Error 1
make[2]: Leaving directory '/home/hf/hydraforce_project/openvpn/openssl-1.0.2j/apps'
make[1]: *** [Makefile:157: openssl] Error 2
make[1]: Leaving directory '/home/hf/hydraforce_project/openvpn/openssl-1.0.2j/apps'
make: *** [Makefile:293: build_apps] Error 1

@pexes123
Copy link

pexes123 commented Mar 30, 2025

Static libcapng required for building with OpenVPN 2.6.*:

#libCAP-NG
cd /home/source
wget https://github.com/stevegrubb/libcap-ng/archive/refs/tags/v0.8.5.tar.gz
tar xvzf v0.8.5.tar.gz
cd libcap-ng-0.8.5
./autogen.sh
./configure --prefix=/home/openvpn --enable-static --target=arm-linux-gnueabi --host=arm-linux-gnueabi
make
make install

#OpenVPN 2.6.x add/replace following
./configure ... LIBCAPNG_CFLAGS="-I/home/openvpn/include" LIBCAPNG_LIBS="-L/home/openvpn/lib -lcap-ng ..."
make LIBS="-all-static -lcap-ng"

you can get rid of

checking for LIBCAPNG... no
configure: error: libcap-ng package not found. Is the development package and pkg-config installed?

with sudo apt install libcap-ng-dev, but cannot avoid make LIBS="-all-static" to fail with

/home/source/openvpn-2.6.13/src/openvpn/platform.c:246: undefined reference to `capng_clear'
/usr/bin/ld: /home/source/openvpn-2.6.13/src/openvpn/platform.c:247: undefined reference to `capng_update'
/usr/bin/ld: /home/source/openvpn-2.6.13/src/openvpn/platform.c:257: undefined reference to `capng_change_id'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:670: openvpn] Error 1
make[3]: Leaving directory '/home/source/openvpn-2.6.13/src/openvpn'
make[2]: *** [Makefile:439: all-recursive] Error 1
make[2]: Leaving directory '/home/source/openvpn-2.6.13/src'
make[1]: *** [Makefile:617: all-recursive] Error 1
make[1]: Leaving directory '/home/source/openvpn-2.6.13'
make: *** [Makefile:505: all] Error 2

refer: OpenVPN/openvpn#586

@enricosuardi
Copy link

I managed to succesfully build OpenVPN 2.6.14 for MIPS architecture on a clean Debian 12 machine
The final binary can be found at /work/vpn_compile/sbin/openvpn

apt update
apt install -y wget git net-tools build-essential autoconf pkg-config libtool gcc-mips-linux-gnu bison flex

mkdir /work
cd /work


# OpenSSL
wget https://github.com/openssl/openssl/releases/download/openssl-3.0.17/openssl-3.0.17.tar.gz
tar -xvf openssl-3.0.17.tar.gz
cd openssl-3.0.17

./Configure gcc -static -no-shared --prefix=/work/vpn_compile --cross-compile-prefix=mips-linux-gnu-
make -j24
make install_sw

cd ..


# LZO
wget http://www.oberhumer.com/opensource/lzo/download/lzo-2.09.tar.gz
tar -xvf lzo-2.09.tar.gz
cd lzo-2.09

./configure --prefix=/work/vpn_compile --enable-static --disable-shared --target=mips-linux-gnu --host=mips-linux-gnu --disable-debug
make -j24
make install

cd ..


# LZ4
wget https://github.com/lz4/lz4/archive/v1.9.2.tar.gz
tar xvzf v1.9.2.tar.gz
cd lz4-1.9.2

make BUILD_STATIC=yes CC=mips-linux-gnu-gcc DLLTOOL=mips-linux-gnu-dlltool OS=mips-linux-gnu -j24
PREFIX=/work/vpn_compile make install

cd ..

# libcap-ng
wget https://github.com/stevegrubb/libcap-ng/archive/refs/tags/v0.8.5.tar.gz
tar xvzf v0.8.5.tar.gz
cd libcap-ng-0.8.5

./autogen.sh
./configure --prefix=/work/vpn_compile --enable-static --disable-shared --target=mips-linux-gnu --host=mips-linux-gnu
make -j24
make install

cd ..


# libnl-3 (641cd0e77761ed44f1d19dd073766c99732ddd5a)
git clone https://github.com/thom311/libnl
cd libnl

./autogen.sh
./configure --prefix=/work/vpn_compile --enable-static --disable-shared --target=mips-linux-gnu --host=mips-linux-gnu
make -j24
make install

cd ..


# OpenVPN
wget https://swupdate.openvpn.org/community/releases/openvpn-2.6.14.tar.gz
tar -xvf openvpn-2.6.14.tar.gz
cd openvpn-2.6.14

./configure --target=mips-linux-gnu --host=mips-linux-gnu --prefix=/work/vpn_compile --enable-static --disable-shared --disable-debug --disable-plugins OPENSSL_LIBS="-L/work/vpn_compile/lib -lssl" OPENSSL_CFLAGS="-I/work/vpn_compile/include" OPENSSL_CRYPTO_LIBS="-L/work/vpn_compile/lib -lcrypto" OPENSSL_CRYPTO_CFLAGS="-I/work/vpn_compile/include" LZO_CFLAGS="-I/work/vpn_compile/include" LZO_LIBS="-L/work/vpn_compile/lib -llzo2" LZ4_CFLAGS="-I/work/vpn_compile/include" LZ4_LIBS="-L/work/vpn_compile/lib -llz4" LIBNL_GENL_CFLAGS="-I/work/vpn_compile/include" LIBNL_GENL_LIBS="-L/work/vpn_compile/lib -lnl-genl-3" LIBCAPNG_CFLAGS="-I/work/vpn_compile/include" LIBCAPNG_LIBS="-L/work/vpn_compile/lib -lcap-ng" CPPFLAGS="-I/work/vpn_compile/include/libnl3"

make LIBS="-L/work/vpn_compile/lib -all-static -lssl -lcrypto -llzo2 -llz4 -lcap-ng -lnl-3 -lnl-genl-3" -j24
make install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment