Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVAf7-0003XR-3N for pgsql-general@arkaria.postgresql.org; Sun, 03 May 2020 09:11:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jVAeZ-0004FL-Th for pgsql-general@arkaria.postgresql.org; Sun, 03 May 2020 09:11:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVAeZ-0004F4-MB for pgsql-general@lists.postgresql.org; Sun, 03 May 2020 09:11:15 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVAeT-0002Mo-Ac for pgsql-general@postgresql.org; Sun, 03 May 2020 09:11:15 +0000 Received: from [192.168.127.1] (port=40348 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtp (Exim 4.92.3 (FreeBSD)) (envelope-from ) id 1jVAeQ-0000zx-Cx; Sun, 03 May 2020 09:11:06 +0000 Received: from localhost ([127.0.0.1]:48012 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.93.0.4 (FreeBSD)) (envelope-from ) id 1jVAeQ-0000Q7-0R; Sun, 03 May 2020 09:11:06 +0000 From: Andrew Gierth To: TalGloz Cc: pgsql-general@postgresql.org Subject: Re: Compiling C Extension Functions against PostgreSQL 12 In-Reply-To: <1588460637089-0.post@n3.nabble.com> (TalGloz's message of "Sat, 2 May 2020 16:03:57 -0700 (MST)") Message-ID: <87imhd2z1n.fsf@news-spur.riddles.org.uk> References: <1588447687198-0.post@n3.nabble.com> <4edd59f3-4d95-c41c-6839-7d022946f8d4@aklaver.com> <1588448354769-0.post@n3.nabble.com> <1b0a4606-2964-48ef-0736-ff51db2d2e1d@aklaver.com> <1588449802471-0.post@n3.nabble.com> <1588450167090-0.post@n3.nabble.com> <9443e9f9-1eec-d4f5-eb19-fb6d1da9c587@aklaver.com> <1588452776591-0.post@n3.nabble.com> <1610.1588454290@sss.pgh.pa.us> <1588460637089-0.post@n3.nabble.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (berkeley-unix) Date: Sun, 03 May 2020 10:11:05 +0100 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "TalGloz" == TalGloz writes: TalGloz> Which is good, my seal_mean_cxx_v2.so being created and copied TalGloz> to /usr/pgsql-12/lib/. But right after that I get this and it TalGloz> doesn't seem to effect my seal_mean_cxx_v2.so library: What's happening here is that it's attempting to build LLVM bitcode files for your library for the benefit of the JIT compiler that exists in recent postgres versions - without these files, your extension functions cannot be inlined into generated code. This requires that your code be compilable using clang (as well as gcc if that's what was used to build PG itself), and there's clearly some disagreement going on between clang and your system header files that's causing the failure. I didn't see an easy way of disabling bitcode emission for a module, though I think that has been discussed before. -- Andrew (irc:RhodiumToad)