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.89) (envelope-from ) id 1j3h1B-000317-FL for pgsql-bugs@arkaria.postgresql.org; Mon, 17 Feb 2020 14:05:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j3h19-0008W2-WB for pgsql-bugs@arkaria.postgresql.org; Mon, 17 Feb 2020 14:04:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j3h19-0008Vu-KN for pgsql-bugs@lists.postgresql.org; Mon, 17 Feb 2020 14:04:59 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j3h17-0005ei-9e for pgsql-bugs@postgresql.org; Mon, 17 Feb 2020 14:04:58 +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 01HE4qgs032417; Mon, 17 Feb 2020 09:04:53 -0500 From: Tom Lane To: Pyry Kontio cc: pgsql-bugs@postgresql.org Subject: Re: Adding libpgcommon and libpgcore to libpq pkg-config's Requires.private In-reply-to: References: Comments: In-reply-to Pyry Kontio message dated "Mon, 17 Feb 2020 19:37:49 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32415.1581948292.1@sss.pgh.pa.us> Date: Mon, 17 Feb 2020 09:04:52 -0500 Message-ID: <32416.1581948292@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Pyry Kontio writes: > I recently investigated a build with statically linked libpq > that broke on update to PostgreSQL 12.0. > The problem was that starting from 12.0, libpq doesn't > include some required files via symlinks anymore, > and needs to be linked against libpgcommon and > libpgcore. (When dynamically linking, this problem > doesn't manifest.) Correct. > However, the pkg-config file for libpq doesn't reflect that fact. > I think that this should be considered as a bug; We do not support statically-linked libpq, so this is not a bug. If you are going to distribute a statically-linked libpq, you can distribute a modified pkg-config file alongside it, but please make clear to your users that such a configuration is not standard Postgres and is not supported or approved by upstream. The primary reason why I'm pushing back so hard against this is that in the configuration you suggest, there's no way to avoid exposing all the cruft in libpgcommon and libpgport to client applications. That's a horrible situation and will inevitably lead to ABI problems. Which we will *NOT* acknowledge as being our bug to deal with, and we are not going to be happy that you made it possible. regards, tom lane