Saturday, May 5, 2012

Compile Error: trouble compiling Net-SSLeay

I'm having a trouble compiling Net-SSLeay. Got an error when doing make
rm -f blib/arch/auto/Net/SSLeay/SSLeay.so
LD_RUN_PATH="/usr/lib" cc  -shared -O2 -L/usr/local/lib -fstack-protector SSLeay.o  -o blib/arch/auto/Net/SSLeay/SSLeay.so      \
           -L/usr/local/ssl -L/usr/local/ssl/lib -lssl -lcrypto -lz     \

/usr/bin/ld: /usr/local/ssl/lib/libcrypto.a(x86_64cpuid.o): relocation R_X86_64_PC32 against `OPENSSL_cpuid_setup' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/Net/SSLeay/SSLeay.so] Error 1
I found that I need to recompile openssl with shared attributes (./config shared). After recompiling openssl with shared attributes, I was able to compile perl module Net-SSLeay successfully. BTW, I'm using 64bit CentOS 5.6

No comments:

Post a Comment