64 bit Linux/Ubuntu and openssl issue (could not read symbols: Bad value)

11,153

Solution 1

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.

Solution 2

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.

Solution 3

also execute the command,

make clean
Share:
11,153
Vijay Kumar Kanta
Author by

Vijay Kumar Kanta

Linux bigot here. Programming is my daily routine with the system. Be it a script or a complete application, it excites me more than anything else.

Updated on June 04, 2022

Comments

  • Vijay Kumar Kanta
    Vijay Kumar Kanta almost 2 years

    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.