Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1frSkp-0008BN-I8 for pgsql-general@arkaria.postgresql.org; Sun, 19 Aug 2018 18:48:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1frSkn-0004eM-Tj for pgsql-general@arkaria.postgresql.org; Sun, 19 Aug 2018 18:48:45 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1frSkn-0004eE-I6 for pgsql-general@lists.postgresql.org; Sun, 19 Aug 2018 18:48:45 +0000 Received: from n3.nabble.com ([162.255.23.22]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1frSkg-0001h3-2X for pgsql-general@postgresql.org; Sun, 19 Aug 2018 18:48:43 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id C6F19EA493E5 for ; Sun, 19 Aug 2018 11:48:36 -0700 (MST) Date: Sun, 19 Aug 2018 11:48:36 -0700 (MST) From: TalGloz To: pgsql-general@postgresql.org Message-ID: <1534704516779-0.post@n3.nabble.com> In-Reply-To: <2455c526-58ab-4f2b-a9c0-f2b2890ca365@manitou-mail.org> References: <1534676183995-0.post@n3.nabble.com> <1534680422044-0.post@n3.nabble.com> <2455c526-58ab-4f2b-a9c0-f2b2890ca365@manitou-mail.org> Subject: Re: Linker errors while creating a PostgreSQL C extension function. MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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