On CentOS 5.4, OpenSSL compiles fine without \'shared\' option. But when I passed that option the compilation fails with:
/usr/bin/ld: libcrypto.a(x86
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.