Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1j7PRZ-0002cM-PI for pgsql-general@arkaria.postgresql.org; Thu, 27 Feb 2020 20:07:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j7PRX-0002Zr-Ek for pgsql-general@arkaria.postgresql.org; Thu, 27 Feb 2020 20:07:35 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1j7PRX-0002Zk-58 for pgsql-general@lists.postgresql.org; Thu, 27 Feb 2020 20:07:35 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j7PRU-0007vl-VP for pgsql-general@postgresql.org; Thu, 27 Feb 2020 20:07:34 +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 01RK7T4K013024; Thu, 27 Feb 2020 15:07:29 -0500 From: Tom Lane To: Kevin Brannen cc: Postgres General Subject: Re: trouble making PG use my Perl In-reply-to: References: Comments: In-reply-to Kevin Brannen message dated "Thu, 27 Feb 2020 19:58:19 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <13022.1582834049.1@sss.pgh.pa.us> Date: Thu, 27 Feb 2020 15:07:29 -0500 Message-ID: <13023.1582834049@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Kevin Brannen writes: > The issue is that I've not been able to make Pg use our Perl (in > /opt/perl) instead of the system one (in /usr). plperl.so will typically have a more or less hard-coded path to libperl.so, eg $ ldd ...installdir.../lib/plperl.so linux-vdso.so.1 => (0x00007ffc613cf000) libperl.so => /usr/lib64/perl5/CORE/libperl.so (0x00007fa315d48000) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa315b11000) libc.so.6 => /lib64/libc.so.6 (0x00007fa31577d000) libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fa315563000) libnsl.so.1 => /lib64/libnsl.so.1 (0x00007fa315349000) libdl.so.2 => /lib64/libdl.so.2 (0x00007fa315145000) libm.so.6 => /lib64/libm.so.6 (0x00007fa314ec1000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fa314c89000) libutil.so.1 => /lib64/libutil.so.1 (0x00007fa314a86000) /lib64/ld-linux-x86-64.so.2 (0x000055646d09b000) libfreebl3.so => /lib64/libfreebl3.so (0x00007fa314883000) You might be able to override that with LD_LIBRARY_PATH, but it's a pain, and it will certainly not work if your homebrew libperl isn't 100% ABI-compatible with the system one. Personally I'd build plperl against the Perl you want to use it with. The rest of PG isn't dependent on Perl, so you could use the community install for the rest of it if you like. regards, tom lane