Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cXJGA-0000OQ-Ei for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Jan 2017 03:01:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cXJG9-0007CC-W0 for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Jan 2017 03:01:02 +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.84_2) (envelope-from ) id 1cXJEi-0005Ym-1M for pgsql-hackers@postgresql.org; Sat, 28 Jan 2017 02:59:32 +0000 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cXJEZ-0002pk-9Q for pgsql-hackers@postgresql.org; Sat, 28 Jan 2017 02:59:31 +0000 Received: by mail-pg0-x242.google.com with SMTP id 204so26350023pge.2 for ; Fri, 27 Jan 2017 18:59:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=T3h0zQD1lR9nuVGsNmIpScVdYEiBnWVpA3PwAqpm0mY=; b=fQZItRE3WPRor4e6Nh/qda2DS36q6rzRfzpDDhbNMO9bZB7Gl0S8Qz3+12cGxF1MDx ls2ErhaZ6PBqDUBE9F7vdw1XbvED8pZggaDxqtbbKlP0qnSQ584npyY8UydsoRiXUJk8 8UFSvkt3uxSvIFNPFfW6RnTy/Hydk5OldBZYg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=T3h0zQD1lR9nuVGsNmIpScVdYEiBnWVpA3PwAqpm0mY=; b=RO33kD1mAMNcbTiL+aiBkQp5RzyDTPmZ4dFmb/w539pXoXqFFK0WIbVhwQvQ9MV+4H StvUywB7wWJgK0UGQ3ese0DhfUEV+dL5xMGljErL9pPs5ITRhozNvchmNn1+YNfoZLU5 aSTrXDFLtIb0lsdMunn22gLhAv5EqWgwY/hvVyuj9ByPX1kUFshZdGD2MZlnHnLe7RIT xkY1htU8v5xhzV65Y7VN6aQjjQCjgpdeG61h3Jh4Px/AD3McJo/KnEuQ7kQG8ViN/0fn AA89tiUrYFexsntZlXY/juvZ589t6SHFGYW/xXubJWxAAO2Rnu4s/HyQGSknnikBHHUa 3Www== X-Gm-Message-State: AIkVDXL2g0ZHYYBIosxtyDWWXkWtKtONRukmot3Rgfk/4H3rLMyocw2iBHPG8J4B7APZuA== X-Received: by 10.98.90.196 with SMTP id o187mr12313567pfb.30.1485572360635; Fri, 27 Jan 2017 18:59:20 -0800 (PST) Received: from tornado.leadboat.com (c-98-248-47-228.hsd1.ca.comcast.net. [98.248.47.228]) by smtp.gmail.com with ESMTPSA id g70sm14298280pfb.50.2017.01.27.18.59.18 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 27 Jan 2017 18:59:19 -0800 (PST) Date: Sat, 28 Jan 2017 02:59:17 +0000 From: Noah Misch To: Tom Lane Cc: pgsql-hackers@postgreSQL.org Subject: Re: Removing link-time cross-module refs in contrib Message-ID: <20170128025917.GA714552@tornado.leadboat.com> References: <2652.1475512158@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Bn2rw/3z4jIqBvZU" Content-Disposition: inline In-Reply-To: <2652.1475512158@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) X-Pg-Spam-Score: -2.0 (--) 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 --Bn2rw/3z4jIqBvZU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Oct 03, 2016 at 12:29:18PM -0400, Tom Lane wrote: > Pursuant to Andres' suggestion in > https://www.postgresql.org/message-id/20161002223927.57xns3arkdg4hu6x@alap3.anarazel.de > attached is a draft patch that gets rid of link-time references > from hstore_plpython to both hstore and plpython. I've verified > that this allows "LOAD 'hstore_plpython'" to succeed in a fresh > session without having loaded the prerequisite modules first. I like how that turned out. However, ... > *** a/contrib/hstore_plpython/Makefile > --- b/contrib/hstore_plpython/Makefile > --- 23,40 ---- > include $(top_srcdir)/contrib/contrib-global.mk > endif > > ! # We must link libpython explicitly > ifeq ($(PORTNAME), aix) > rpathdir = $(pkglibdir):$(python_libdir) ... adding $(pkglibdir) to rpath is obsolete, now that this ceased to link to hstore explicitly. > ! SHLIB_LINK += $(python_libspec) $(python_additional_libs) > ! else > ifeq ($(PORTNAME), win32) > ! # ... see silliness in plpython Makefile ... > ! SHLIB_LINK += $(sort $(wildcard ../../src/pl/plpython/libpython*.a)) > ! else > ! rpathdir = $(python_libdir) > ! SHLIB_LINK += $(python_libspec) For consistency with longstanding src/pl/plpython practice, $(python_libspec) should always have an accompanying $(python_additional_libs). This matters on few configurations. I propose to clean up both points as attached. Tested on AIX, which ceases to be a special case. --Bn2rw/3z4jIqBvZU Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="no-link-xmodule-code-review-v1.patch" diff --git a/contrib/hstore_plperl/Makefile b/contrib/hstore_plperl/Makefile index 41d3435..34e1e13 100644 --- a/contrib/hstore_plperl/Makefile +++ b/contrib/hstore_plperl/Makefile @@ -24,10 +24,6 @@ include $(top_srcdir)/contrib/contrib-global.mk endif # We must link libperl explicitly -ifeq ($(PORTNAME), aix) -rpathdir = $(pkglibdir):$(perl_archlibexp)/CORE -SHLIB_LINK += $(perl_embed_ldflags) -else ifeq ($(PORTNAME), win32) # these settings are the same as for plperl override CPPFLAGS += -DPLPERL_HAVE_UID_GID -Wno-comment @@ -37,7 +33,6 @@ else rpathdir = $(perl_archlibexp)/CORE SHLIB_LINK += $(perl_embed_ldflags) endif -endif # As with plperl we need to make sure that the CORE directory is included # last, probably because it sometimes contains some header files with names diff --git a/contrib/hstore_plpython/Makefile b/contrib/hstore_plpython/Makefile index a55c9a1..7ff787a 100644 --- a/contrib/hstore_plpython/Makefile +++ b/contrib/hstore_plpython/Makefile @@ -24,17 +24,12 @@ include $(top_srcdir)/contrib/contrib-global.mk endif # We must link libpython explicitly -ifeq ($(PORTNAME), aix) -rpathdir = $(pkglibdir):$(python_libdir) -SHLIB_LINK += $(python_libspec) $(python_additional_libs) -else ifeq ($(PORTNAME), win32) # ... see silliness in plpython Makefile ... SHLIB_LINK += $(sort $(wildcard ../../src/pl/plpython/libpython*.a)) else rpathdir = $(python_libdir) -SHLIB_LINK += $(python_libspec) -endif +SHLIB_LINK += $(python_libspec) $(python_additional_libs) endif REGRESS_OPTS += --load-extension=hstore diff --git a/contrib/ltree_plpython/Makefile b/contrib/ltree_plpython/Makefile index c45b7c2..bc7502b 100644 --- a/contrib/ltree_plpython/Makefile +++ b/contrib/ltree_plpython/Makefile @@ -24,17 +24,12 @@ include $(top_srcdir)/contrib/contrib-global.mk endif # We must link libpython explicitly -ifeq ($(PORTNAME), aix) -rpathdir = $(pkglibdir):$(python_libdir) -SHLIB_LINK += $(python_libspec) $(python_additional_libs) -else ifeq ($(PORTNAME), win32) # ... see silliness in plpython Makefile ... SHLIB_LINK += $(sort $(wildcard ../../src/pl/plpython/libpython*.a)) else rpathdir = $(python_libdir) -SHLIB_LINK += $(python_libspec) -endif +SHLIB_LINK += $(python_libspec) $(python_additional_libs) endif REGRESS_OPTS += --load-extension=ltree --Bn2rw/3z4jIqBvZU Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers --Bn2rw/3z4jIqBvZU--