compile statically with LZO and SSL support?
Hi,
perhaps anybody could give me a hint who to statically compile openvpn with LZO and SSL? I want it to run on a system where the "on-board" SSL is very limited in case of supported ciphers and where is no possibility to install LZO.
I already found this topic:
http://article.gmane.org/gmane.network.openvpn.devel/558/match=static and changed my Makefile according but this doesn´t seem to work for lzo - when runing openvpn on the system without lzo theres an error complaining about missing LZO (./openvpn: error while loading shared libraries: liblzo.so.1:
cannot open shared object file: No such file or directory).
How has the Makefile (...what else?) to be modified for LZO? Is "LDADD = -static -lssl -lcrypto -lzo" correct?
Besides, if I use statically compiled SSL support, does this override the already present SSL?
Thanks for any hint!
regards
Dirk
Quoted 2 lines · Dirk Tronienne
How has the
Makefile(...what else?) to be modified for LZO? Is "LDADD = -static -lssl -lcrypto -lzo" correct?
If you're using static libfoo, etc. then you don't use "-lfoo"; instead you add "/path/to/libfoo.a" to the link command.
Quoted 8 lines · Charles Duffy <cduffy <at> spamcop.net> writes:
Quoted 2 lines · Dirk Tronienne
How has the
Makefile(...what else?) to be modified for LZO? Is "LDADD = -static -lssl -lcrypto -lzo" correct?If you're using static libfoo, etc. then you don't use "-lfoo"; instead you add "/path/to/libfoo.a" to the link command.
Thanks for help but this doesn´t seem to work for me. There has to be another problem. I tried OpenVPN_beta14 on SuSE 9.1
Here is what I tried:
1. ./configure --enable-lzo
2. Edit the Makefile: ADD "LDADD = -static /usr/lib/liblzo.a"
3. After starting "make" I get the following error messages:
---snip---
sig.o socket.o socks.o ssl.o status.o thread.o tun.o work.o -static/usr/lib/liblzo.a -lssl -lcrypto -llzo
/root/openvpn-2.0_beta14/misc.c:108: warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc-lib/i586-suse-linux/3.3.3/../../../libcrypto.a(b_sock.o) (text.unlikely+0x5c3): In function `BIO_get_port':: warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc-lib/i586-suse-linux/3.3.3/../../../libcrypto.a(dso_dlfcn.o) (text.unlikely+0x183): In function `dlfcn_bind_func':
: undefined reference to `dlsym'
---snap---
Seems that there is a problem with "libc2?
I got no clue....
Perhaps any of you already has compiled openVPN with statically linked LZO (and OpenSLL)?
Thank you,
Dirk
Instead of adding /usr/lib/liblzo.a, you should *replace* the -llzo with it. Also, according to the error (the other two messages were warnings), you need access to the dynamic linker (-ldl or /usr/lib/libdl.a on my system) so the OpenSSL libraries can access getservbyname() at runtime.
Quoted 6 lines · Charles Duffy <cduffy <at> spamcop.net> writes:
Instead of adding
/usr/lib/liblzo.a, you should *replace* the -llzo with it. Also, according to the error (the other two messages were warnings), you need access to the dynamic linker (-ldl or/usr/lib/libdl.aon my system) so the OpenSSL libraries can accessgetservbyname()at runtime.
Quoted 6 lines
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
Thanks a lot!
It worked, I got my openvpn binary with lzo and openssl up and running. I added the following in the Makefile:
"LDADD= -static /usr/lib/liblzo.a /usr/lib/libcrypto.a \/usr/lib/libssl.a /usr/lib/libdl.a /usr/lib/libc.a"
Quoted 1 line
Instead of adding
/usr/lib/liblzo.a, you should *replace* the -llzo with
That "-llzo" was somewhere else in the Makefile. Again thank you very much for your help!
Dirk