Re: Boris Kolpackov > The Libs.private field in libpq.pc lists the following libraries: > > -lpgcommon -lpgport -lssl -lgssapi_krb5 -lm -lldap > > If we install libpq-dev and then try to link libpq.a respecting its .pc > file information, we get:
Hi, the situation with pkgconfig files and static linking is complicated. See the thread starting at https://www.postgresql.org/message-id/flat/aCHScGj9_dAo-gOM%40msg.df7cb.de#f9d62d87e51b148072f4125631c75f31 > I am not sure if those libraries are unnecessary, should be unnecessary > (at least -lpgcommon -lpgport, by means of being included in libpq.a), or > libpq-dev should depend on the packages that contain these libraries (like > it does on libssl-dev). In most cases involving libpq-dev, the extra -dev packages are not required. Static linking is a special case that Debian tends to avoid anyway, so I don't think we should deviate from the upstream file here. The PG18 patch is already bad enough (and moving in the wrong direction of what you are asking for anyway): https://salsa.debian.org/postgresql/postgresql/-/blob/18/debian/patches/libpq.pc-no-libcurl?ref_type=heads Christoph

