3
/usr/bin/ld: libcrypto.a(x86_64-gcc.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
libcrypto.a(x86_64-gcc.o): could not read symbols: Bad value'

I got this error while trying to compile and make openssl.

I have tried

export CFLAGS=-fPIC

But still no luck in solving the error. Please advise.

2

I also face same problem. so I solved it the following way:
First uninstall that file and download new version like openssl-1.0.2-latest.tar.gz

  1. untar this file using command tar -xf openssl-1.0.2-latest.tar.gz
  2. export CFLAGS=-fPIC
  3. ./config shared --prefix=/your/path
  4. make
  5. make install
  • this works.......... – Roshan Feb 2 '16 at 7:54
2

I got this error, after first doing ./config without shared, then getting aware that I need shared libraries, and running

./config shared ...
make

The problem disappeared with make clean and then doing from the beginning

./config shared ...
make
make test
make install
  • make clean did the trick for me!!!! – Farzan Feb 5 '18 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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