5

Normally I search a lot and read a lot to fix my issues, but for this particular problem, it has been pretty unproductive.

I am running a 64bit Ubuntu Linux server on which I installed LAMP stack, and had problem with libcurl not having SSL support, while the OS binary does have SSL support. The PHP just cannot read it. When I searched for solutions and tried doing the following to enable ssl support while installing PHP, I got the problem..

./configure .... --with-openssl
...
....
/usr/bin/ld: ext/standard/.libs/info.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
ext/standard/.libs/info.o: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [libphp5.la] Error 1

So, it quit suddenly. I tried doing --enable-shared --without-pic arguments to no avail.

8
  • Assuming you've already got ssl in your lib64 directory, --with-libdir=lib64 Commented Aug 7, 2013 at 8:46
  • No SSL is under /usr/local/ssl, usr/local/ssl/include/openssl Commented Aug 7, 2013 at 8:49
  • The is it a 64-bit OpenSSL? Commented Aug 7, 2013 at 8:52
  • No, there wasn't a 32 or 64 bit distinction in the downloads. The one I downloaded from openss.org works fine in 32 bit systems. Commented Aug 7, 2013 at 8:54
  • did you get the ssl devel package? Commented Aug 7, 2013 at 8:56

3 Answers 3

5

Okay, sorry for not search properly in SO itself. One of the related topics had an answer to this problem. relocation R_X86_64_32 against a local symbol' error

All I had to do was do a fresh install of openssl this time with enable-shared option during configure

./config enable-shared

Then I had to do a fresh install of cURL

./configure --with-ssl=/usr/local/ssl --with-zlib

Then I had to do a fresh install of PHP

./configure .... --with-openssl --with-curl ....

..and that did it. The PHP cURL extension has SSL support.

Sign up to request clarification or add additional context in comments.

Comments

3

As a more generic answer, one typically runs into this problem when the library you are trying to compile is looking for a shared library of a dependency, but the dependency itself was built with only static library support.

The way to fix the problem would be to recompile the dependency with shared library support, usually done by specifying the --enable-shared flag to the configure script.

Comments

1

also execute the command,

make clean

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.