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 ....

link|improve this question

78% accept rate
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
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.