Compile OpenSSL with the 'shared' option?
Same problem here, BUT usually Makefiles will consider environment variables for compiler or linker options.
So, if you place the -fPIC
option before calling the configure script, it should take care of it. You can do it with:
CFLAGS=-fPIC ./config shared --prefix=/your/path
or
export CFLAGS=-fPIC./config shared --prefix=/your/path
It worked for me.
Compiling openssl
Download your openssl tarball, unzip, and then ensure that the install directory is named
openssl
.I placed mine in /usr/local/openssl, so I'll use that in my example.
sudo mv openssl-1.0.2u /usr/local/openssl && cd /usr/local/openssl
sudo make distclean
sudo ./config -fPIC -shared
sudo make && sudo install
Now, add the openssl shared library to your PATH.
vim ~/.profile Go export PATH="/usr/local/openssl/lib:$PATH" :wq