pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Andy Bailey <bailey@akamai.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Makefile.global will override configure parameters if "pgsql" and "postgres" appear anywhere in the source path name
Date: Fri, 15 Jul 2022 19:22:12 -0400
Message-ID: <3529036.1657927332@sss.pgh.pa.us> (raw)
In-Reply-To: <20220715202558.smkr2bwy6g3fxdnx@awork3.anarazel.de>
References: <20220715161357.rezc6eohze3ebaya@akamai.com>
	<20220715183817.32d2hu67bwswmbwe@alvherre.pgsql>
	<20220715202558.smkr2bwy6g3fxdnx@awork3.anarazel.de>

Andres Freund <andres@anarazel.de> writes:
> On 2022-07-15 20:38:17 +0200, Alvaro Herrera wrote:
>> Right.  See commit 984b0b4df83f and its discussion at [1].  The working
>> theory (as I remember it) is that if the installation is already
>> postgres-specific (because the user has made it so by having "pgsql" or
>> "postgres" in the argument to --prefix), then we don't need to add
>> another level of postgres-specificity to it; but otherwise we add
>> "/postgresql" to the path so that the resulting files don't end up mixed
>> with files installed by unrelated packages.

> I think the current approach isn't great.

> E.g., putting extension .so's into the same directories as "normal shared
> libraries", which typically is either in the library search path via system
> configuration, or in the library search path due to rpath, strikes me as quite
> wrongheaded.

Well, we don't, with a normal not-PG-specific install path.
What I get with --prefix=/home/tgl/testversion is

$ ls ~/testversion/lib
libecpg.a         libecpg_compat.so@      libpgtypes.so@      libpq.so.5@
libecpg.so@       libecpg_compat.so.3@    libpgtypes.so.3@    libpq.so.5.5*
libecpg.so.6@     libecpg_compat.so.3.4*  libpgtypes.so.3.3*  postgresql/
libecpg.so.6.4*   libpgport.a             libpq.a
libecpg_compat.a  libpgtypes.a            libpq.so@

$ ls ~/testversion/lib/postgresql 
ascii_and_mic.so*       pgxs/                  utf8_and_gb18030.so*
cyrillic_and_mic.so*    plperl.so*             utf8_and_gbk.so*
dict_snowball.so*       plpgsql.so*            utf8_and_iso8859.so*
euc2004_sjis2004.so*    utf8_and_ascii.so*     utf8_and_iso8859_1.so*
euc_cn_and_mic.so*      utf8_and_big5.so*      utf8_and_johab.so*
euc_jp_and_sjis.so*     utf8_and_cyrillic.so*  utf8_and_sjis.so*
euc_kr_and_mic.so*      utf8_and_euc2004.so*   utf8_and_sjis2004.so*
euc_tw_and_big5.so*     utf8_and_euc_cn.so*    utf8_and_uhc.so*
latin2_and_win1250.so*  utf8_and_euc_jp.so*    utf8_and_win.so*
latin_and_mic.so*       utf8_and_euc_kr.so*
libpqwalreceiver.so*    utf8_and_euc_tw.so*

which seems perfectly sane from here.  The issue is that if the
install directory path already has "postgres" somewhere in it,
you get a different layout where the PG-specific subdir is smashed
together with the user libraries.

I tend to agree with the OP that that case isn't great, but we've
had it like this for so long that I'm not sure we can change it.
OTOH, the issue probably only affects PG developers, so maybe
we could?

> Nor do we really allow the user to opt in/out of us changing the
> user-specified install locations.

Yeah, you'd have to resort to editing Makefile.global after
configuring, which is annoying.

			regards, tom lane





view thread (5+ messages)  latest in thread

Message-ID: <3529036.1657927332@sss.pgh.pa.us>
Permalink:  ../3529036.1657927332@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3529036.1657927332@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, alvherre@alvh.no-ip.org, bailey@akamai.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: Makefile.global will override configure parameters if "pgsql" and "postgres" appear anywhere in the source path name
  In-Reply-To: <3529036.1657927332@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox