0

I have this error message while building the curl library:

libssl.a(s2_clnt.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC

I tried to use the -fPIC switch - nothing helps. The openssl library was before compiled without any error. make check passed as well.

Info: I am compiling curl against another version of glibc - the include path is provided in ./configure with the $CPPFLAGS and $LDFLAGS == -L/usr/glibc-2.22/lib [== this is the path to the new glibc version]

This error is thrown only when I compile it with the new glibc version.

Peter VARGA
  • 4,780
  • 3
  • 39
  • 75

2 Answers2

1

You get this kind of error when one object is built with hidden symbols and another one isn't.

Since I see you're trying to link a .a archive file aka static library, I assume that static library was built with different hidden symbol options than what you're using with curl.

I think that you can also get this when one object is using PIC and the other one isn't. To fix that compile the static library and curl with the same PIC settings.

Zan Lynx
  • 53,022
  • 10
  • 79
  • 131
0

Here is the solution for the issue collection I had in the past days: several make issues...

Community
  • 1
  • 1
Peter VARGA
  • 4,780
  • 3
  • 39
  • 75