I am writing a Python C extension which uses libsodium. When trying to compile my Python module I am getting the following error:
/usr/bin/ld: /usr/local/lib/libsodium.a(libsodium_la-randombytes.o): relocation R_X86_64_PC32 against symbol `randombytes_sysrandom_implementation' can not be used when making a shared object; recompile with `-fPIC`
I re-compiled libsodium with ./configure --with-pic, but it didn't help. Any ideas how to compile libsodium with the -fPIC flag?
Hello,
I am writing a Python C extension which uses
libsodium
. When trying to compile my Python module I am getting the following error:I re-compiled
libsodium
with./configure --with-pic
, but it didn't help. Any ideas how to compilelibsodium
with the-fPIC
flag?