Search Postgresql Archives

Re: Linker errors while creating a PostgreSQL C extension function.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks, that did the trick. But now I'm getting this
g++ -Wl,--no-undefined -shared -o seal_diff_cpp.so seal_diff_cpp.o
-L/usr/pgsql-10/lib   -L/usr/lib64 -Wl,--as-needed
-Wl,-rpath,'/usr/pgsql-10/lib',--enable-new-dtags -L/usr/local/lib -lseal
-pthread
/usr/bin/ld: /usr/lib64/libseal.a(bigpoly.cpp.o): relocation R_X86_64_32
against `.rodata.str1.1' can not be used when making a shared object;
recompile with -fPIC
/usr/bin/ld: /usr/lib64/libseal.a(biguint.cpp.o): relocation R_X86_64_32
against symbol `__pthread_key_create@@GLIBC_2.2.5' can not be used when
making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib64/libseal.a(ciphertext.cpp.o): relocation R_X86_64_32
against symbol `__pthread_key_create@@GLIBC_2.2.5' can not be used when
making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib64/libseal.a(context.cpp.o): relocation R_X86_64_32
against symbol `__pthread_key_create@@GLIBC_2.2.5' can not be used when
making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib64/libseal.a(encoder.cpp.o): relocation R_X86_64_32S
against symbol `_ZTVN4seal14IntegerEncoderE' can not be used when making a
shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib64/libseal.a(encryptionparams.cpp.o): relocation
R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared
object; recompile with -fPIC
/usr/bin/ld: /usr/lib64/libseal.a(evaluator.cpp.o): relocation R_X86_64_32
against `.rodata.str1.8' can not be used when making a shared object;
recompile with -fPIC
/usr/bin/ld: /usr/lib64/libseal.a(plaintext.cpp.o): relocation R_X86_64_32
against symbol `__pthread_key_create@@GLIBC_2.2.5' can not be used when
making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib64/libseal.a(randomgen.cpp.o): relocation R_X86_64_32S
against symbol `_ZTVN4seal21StandardRandomAdapterISt13random_deviceEE' can
not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib64/libseal.a(smallmodulus.cpp.o): relocation
R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared
object; recompile with -fPIC
/usr/bin/ld: /usr/lib64/libseal.a(baseconverter.cpp.o): relocation
R_X86_64_32 against symbol `__pthread_key_create@@GLIBC_2.2.5' can not be
used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib64/libseal.a(globals.cpp.o): relocation R_X86_64_32
against `.bss' can not be used when making a shared object; recompile with
-fPIC
/usr/bin/ld: /usr/lib64/libseal.a(hash.cpp.o): relocation R_X86_64_32
against symbol `_ZN4seal4util12HashFunction17sha3_round_constsE' can not be
used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib64/libseal.a(mempool.cpp.o): relocation R_X86_64_32S
against symbol `_ZTVN4seal4util12MemoryPoolSTE' can not be used when making
a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib64/libseal.a(modulus.cpp.o): relocation R_X86_64_32
against symbol `__gxx_personality_v0@@CXXABI_1.3' can not be used when
making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib64/libseal.a(smallntt.cpp.o): relocation R_X86_64_32
against symbol `__pthread_key_create@@GLIBC_2.2.5' can not be used when
making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/lib64/libseal.a(uintarith.cpp.o): relocation R_X86_64_32S
against `.rodata' can not be used when making a shared object; recompile
with -fPIC
/usr/bin/ld: /usr/lib64/libseal.a(uintarithsmallmod.cpp.o): relocation
R_X86_64_32 against `.bss' can not be used when making a shared object;
recompile with -fPIC
/usr/bin/ld: /usr/lib64/libseal.a(uintcore.cpp.o): relocation R_X86_64_32
against `.rodata.str1.1' can not be used when making a shared object;
recompile with -fPIC

Do I have to replace my -shared in the link command with -fPIC?



--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux