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 1frTBm-00018a-Tm for pgsql-general@arkaria.postgresql.org; Sun, 19 Aug 2018 19:16:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1frTBl-0008K1-Fr for pgsql-general@arkaria.postgresql.org; Sun, 19 Aug 2018 19:16:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1frTBl-0008Ju-76 for pgsql-general@lists.postgresql.org; Sun, 19 Aug 2018 19:16:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1frTBi-0003r2-AN for pgsql-general@postgresql.org; Sun, 19 Aug 2018 19:16:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w7JJGVDU030249; Sun, 19 Aug 2018 15:16:31 -0400 From: Tom Lane To: TalGloz cc: pgsql-general@postgresql.org Subject: Re: Linker errors while creating a PostgreSQL C extension function. In-reply-to: <1534704516779-0.post@n3.nabble.com> References: <1534676183995-0.post@n3.nabble.com> <1534680422044-0.post@n3.nabble.com> <2455c526-58ab-4f2b-a9c0-f2b2890ca365@manitou-mail.org> <1534704516779-0.post@n3.nabble.com> Comments: In-reply-to TalGloz message dated "Sun, 19 Aug 2018 11:48:36 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <30247.1534706191.1@sss.pgh.pa.us> Date: Sun, 19 Aug 2018 15:16:31 -0400 Message-ID: <30248.1534706191@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk TalGloz writes: > Thanks, that did the trick. But now I'm getting this > /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 Ugh, I was wondering if that was really going to work or not. Your copy of libseal.a has been built without relocation capability, so it can't be included in a .so library. In principle, if you have the source code for libseal, you could recompile it with -fpic or -fPIC and continue to link against the .a form of the library. But it might be better to turn it into a .so in its own right. regards, tom lane