[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Deps of -dev packages with pkg-config .pc file: Policy Change?



On Mon, 13 Dec 2021 at 22:46:43 +0100, Alexander Traud wrote:
> Let us assume 'bar.pc' would create a dependency in Debian, then the 
> question arises: Why does the Debian maintainer not transform it to 
> 'Libs.private', not upstream but via a Debian patch? That would avoid 
> such .pc-file*only* dependencies.

Libs.private does not follow interdependencies between .pc files, so
converting Requires.private into Libs.private would require copying all
the recursive dependencies of the required library, not just the required
library itself.

For example, if you depend on glib-2.0.pc (-lglib-2.0), converting
Requires.private: glib-2.0 into Libs.private requires you to know (or more
likely, find out at configure time) that it depends on libpcre.

This doesn't scale well, and a previously-correct .pc file can become
retroactively incorrect as a result of a lower-level library changing
an implementatation detail. For example, if GLib moves from libpcre to
libpcre2, as has been requested, then a GLib-dependent library having
-lglib-2.0 -lpcre in Libs.private will no longer be sufficient for
static linking.

> Just to repeat: libunbound-dev works great without nettle-dev and 
> libevent-dev

With the change you are asking for, libunbound-dev would work *for dynamic
linking* without those.

If you're linking statically, you need to be able to satisfy the recursive
dependencies of libunbound (regardless of whether you are using pkg-config
or not), so, no, you will need nettle-dev and libevent-dev either way.

    smcv


Reply to: