Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am compiling PHP 5.3.8 like this:

./configure --with-openssl=/usr/local/openssl

OpenSSL is compiled as follows:

./configure --prefix=/usr/local/openssl -fPIC

When I do make of PHP, I get this error, I have no idea how to fix it:

/usr/bin/ld: /usr/local/openssl/lib/libcrypto.a(x86_64cpuid.o): relocation R_X86_64_PC32 against symbol `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: *** [libphp5.la] Error 1

Can anybody help with this ? Thanks in advance ....

share|improve this question
Why not complie with -fPIC as recommended?? –  mailq Oct 1 '11 at 20:03
That's what I am doing, but doesn't work. –  Frodik Oct 2 '11 at 4:50
Try compiling with -fno-exceptions. I believe this is a GCC bug and that flag will work around it. –  David Schwartz Oct 2 '11 at 5:49
try compiling openssl with -shared instead of -fPIC –  user99256 Oct 28 '11 at 11:44

1 Answer 1

Have you compiled openssl yourself? Try to recompile openssl with -fPIC (./config -fPIC)

share|improve this answer
Do you not see that he already did that! –  Michael Hampton Nov 20 '13 at 18:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.