Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YnCAy-0002xA-EP for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Apr 2015 20:32:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YnCAx-0001iR-Kb for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Apr 2015 20:32:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YnCAw-0001iJ-31 for pgsql-hackers@postgresql.org; Tue, 28 Apr 2015 20:32:14 +0000 Received: from mout.gmx.net ([212.227.15.18]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YnCAm-00013i-EO for pgsql-hackers@postgresql.org; Tue, 28 Apr 2015 20:32:12 +0000 Received: from auth1-smtp.messagingengine.com ([66.111.4.227]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0LnPSg-1ZE0c80pzC-00hdDQ for ; Tue, 28 Apr 2015 22:32:02 +0200 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailauth.nyi.internal (Postfix) with ESMTP id 8A5DE20B2D for ; Tue, 28 Apr 2015 16:32:00 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Tue, 28 Apr 2015 16:32:00 -0400 X-Sasl-enc: YJAND02gvo/wAf3Ux3z9zGxn1yeDxUCPZbWjBtf5iG+v 1430253120 Received: from [192.168.1.117] (unknown [204.145.120.11]) by mail.messagingengine.com (Postfix) with ESMTPA id E3FB46800E3; Tue, 28 Apr 2015 16:31:59 -0400 (EDT) Message-ID: <553FEE3F.2040408@gmx.net> Date: Tue, 28 Apr 2015 16:31:59 -0400 From: Peter Eisentraut User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Tom Lane , Alvaro Herrera CC: pgsql-hackers Subject: shared_libperl, shared_libpython References: <20150427172712.GX4369@alvh.no-ip.org> <1602.1430193947@sss.pgh.pa.us> In-Reply-To: <1602.1430193947@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:mrQMoDGcl6SihHVDzN75+FynKtMALq35FM4Twz9Qal/PPr9HO/Z S6UTKkfXbe/LfLqKYCP6tYpi/Cun1XlZ+QJ5QMjtntyTbJAHDMvuZrNnL0Z6tKtMclZdgnW 1Y9UBhUskdmIOYfE4ZUMStiimLBJHvYOJmowoQYMrG48bIottDPA2V8Y0GVb3G/K3E0meaB Q7WpKw2FPeQJOI04ooduw== X-UI-Out-Filterresults: notjunk:1; X-Pg-Spam-Score: -2.1 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 4/28/15 12:05 AM, Tom Lane wrote: > Yeah. Even more specifically, olinguito does have --with-python in its > configure flags, but then the plpython Makefile skips the build because > libpython isn't available as a shared library. But the contrib test is > (I assume, haven't looked) conditional only on the configure flag. > > I'm not real sure now why we felt that was a good approach. The general > project policy is that if you ask for a feature in the configure flags, > we'll build it or die trying; how come this specific Python issue gets > special treatment contrary to that policy? > > So I'd vote for changing that to put the shared-library test in configure, > or at least make it a build failure later on, not "silently don't build > what was asked for". That would mean olinguito's configure flags would > have to be adjusted. > > Plan B would require propagating the shared-libpython test into the > contrib makefiles, which seems pretty unpalatable even if you're willing > to defend the status quo otherwise. I had tried plan B prime, moving the shared_libpython etc. detection into Makefile.global. But that doesn't work because contrib/pgxs makefiles require setting all variables *before* including the global makefiles. So you can't decide whether you want to build something before you have told it everything you want to build. The reason for the current setup is actually that when plperl and later plpython was added, we still had Perl and Python client modules in our tree (Pg.pm and pygresql), and configure --with-perl and --with-python were meant to activate their build primarily. Also, in those days, having a shared libperl or libpython was rare. But we didn't want to fail the frontend interface builds because of that. So we arrived at the current workaround. My preference would be to rip all that out and let the compiler or linker decide when it doesn't want to link something. The alternative would be creating a configure check that mirrors the current logic. Arguably, however, the current logic is quite unworthy of a configure check, because it's just a collection of on-this-platform-do-that, instead of a real test. Then again, a real test would require building and loading a shared library in configure, and we are not set up for that. Preferences? -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers