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 1oCUdc-0005p9-EZ for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Jul 2022 23:22:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oCUdb-0006M7-AS for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Jul 2022 23:22:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oCUdb-0006IV-1g for pgsql-bugs@lists.postgresql.org; Fri, 15 Jul 2022 23:22:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oCUdV-0000c3-Vm for pgsql-bugs@lists.postgresql.org; Fri, 15 Jul 2022 23:22:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 26FNMCcI3529037; Fri, 15 Jul 2022 19:22:12 -0400 From: Tom Lane To: Andres Freund cc: Alvaro Herrera , Andy Bailey , 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: <20220715202558.smkr2bwy6g3fxdnx@awork3.anarazel.de> References: <20220715161357.rezc6eohze3ebaya@akamai.com> <20220715183817.32d2hu67bwswmbwe@alvherre.pgsql> <20220715202558.smkr2bwy6g3fxdnx@awork3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Fri, 15 Jul 2022 13:25:58 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3529035.1657927332.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 15 Jul 2022 19:22:12 -0400 Message-ID: <3529036.1657927332@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund 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 mixe= d >> 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 share= d > libraries", which typically is either in the library search path via sys= tem > 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=3D/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