Closed superkuh closed 8 years ago
--enable-static
means to build static library of libshadowsocks, not link statically with other libraries./path/to/openssl-static/lib
/path/to/openssl-static/include
./configure --with-openssl=/path/to/openssl-static
BTW, here is an example of openssl-static
:
├── include
│ └── openssl
│ ├── aes.h
│ ├── asn1.h
│ ├── asn1_mac.h
│ ├── asn1t.h
│ ├── bio.h
│ ├── blowfish.h
│ ├── bn.h
│ ├── buffer.h
│ ├── camellia.h
│ ├── cast.h
│ ├── cmac.h
│ ├── cms.h
│ ├── comp.h
│ ├── conf.h
│ ├── conf_api.h
│ ├── crypto.h
│ ├── des.h
│ ├── des_old.h
│ ├── dh.h
│ ├── dsa.h
│ ├── dso.h
│ ├── dtls1.h
│ ├── e_os2.h
│ ├── ebcdic.h
│ ├── ec.h
│ ├── ecdh.h
│ ├── ecdsa.h
│ ├── engine.h
│ ├── err.h
│ ├── evp.h
│ ├── hmac.h
│ ├── idea.h
│ ├── krb5_asn.h
│ ├── kssl.h
│ ├── lhash.h
│ ├── md4.h
│ ├── md5.h
│ ├── mdc2.h
│ ├── modes.h
│ ├── obj_mac.h
│ ├── objects.h
│ ├── ocsp.h
│ ├── opensslconf.h
│ ├── opensslv.h
│ ├── ossl_typ.h
│ ├── pem.h
│ ├── pem2.h
│ ├── pkcs12.h
│ ├── pkcs7.h
│ ├── pqueue.h
│ ├── rand.h
│ ├── rc2.h
│ ├── rc4.h
│ ├── ripemd.h
│ ├── rsa.h
│ ├── safestack.h
│ ├── seed.h
│ ├── sha.h
│ ├── srp.h
│ ├── srtp.h
│ ├── ssl.h
│ ├── ssl2.h
│ ├── ssl23.h
│ ├── ssl3.h
│ ├── stack.h
│ ├── symhacks.h
│ ├── tls1.h
│ ├── ts.h
│ ├── txt_db.h
│ ├── ui.h
│ ├── ui_compat.h
│ ├── whrlpool.h
│ ├── x509.h
│ ├── x509_vfy.h
│ └── x509v3.h
└── lib
└── libcrypto.a
You can also try
./configure <blahblah> LIBS="<full-path-to-dot-a-file>"
You may use the openssl static library please try ./config no-share
Thanks for the quick responses, madeye in particular. My problem was that I had libcrypto.a in ./openssl instead of in ./openssl/lib . When I created a ./openssl/lib folded and copied it there everything compiled and shadowsocks linked statically with openssl 1.0.2g.
This didn't fix the problem and socks5 proxying still won't work but at least I know it's not an openssl problem. Issue closed.
What version of shadowsocks-libev are you using?
shadowsocks-libev 2.5.1
What operating system are you using?
Ubuntu 10.04 and Ubuntu 14.04
What I'm trying to do and how it's failing.
I'm trying to use shadowsocks-libev on my Ubuntu 10.04 machine with openssl 0.9.8 but instead of linking to system openssl I'd like to link to a compiled version of openssl 1.0.2g which I built with shared enabled.
I've used this copy of openssl for static linking with Tor before so I know it works. I copied this folder openssl/ (containing openssl1.0.2g) to my shadowsocks-libev directory to use for compilation and set up the configure like so,
But after I compiled it this way with static linked openssl libs of a newer vintage it still would not work. It runs, it binds to the port locally, but it doesn't act as a socks5 proxy connecting to the remote ss-server,
test.conf
With this exact same configuration file using ss-local compiled on Ubuntu 14.04 using /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 it works fine. It should work with static linked openssl 1.0.2g on Ubuntu 10.04 but the configure options don't seem to have an effect. It still links to the system 0.9.8,
libcrypto.so.0.9.8! So my question is, how to I configure and compile shadowsocks-libev to use static provided openssl libs. Or even better, how can I get shadowsocks to be more verbose about it's errors or actually log to disk somewhere?
skyroveRR on freenode ##networking suggested manually editing the Makefile to force static libs and paths,
So I edited my autogenerated makefile like so,
Makefile
But even doing this lsof still reports ss-local is using /lib/libcrypto.so.0.9.8 and it still doesn't actually work.
I am a bit confused a the LDFLAGS path that --with-openssl=/home/superkuh/app_installs/shadowsocks-libev/openssl generated,
My openssl path/directory doesn't actually have a openssl/lib, it just has the library .so files in the main dir like,
So I figure the correct LDFLAGS -L path is the above stated but with -static to force static linking,
But even when I compile it like this is still only links dynamically to the system openssl 0.9.8
What is the proper what to configure shadowsocks-libev to compile and link with static openssl? How do I get ./configure to actually implement the openssl selection and static linking?