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

Re: Bug#622931: libav: pkg-config files implies possible static linkage

On Mon, 18 Apr 2011 09:22:09 -0700
Fabian Greffrath <fabian@greffrath.com> wrote:

> Am 17.04.2011 12:43, schrieb Reinhard Tartler:
> > Neil, thank you very much for your insightful summary of the matter. Now
> > it seems pretty clear that this issue cannot be handled in the libav
> > package, but needs to be solved at the pkg-config level. I'm therefore
> > reassigning this bug to pkg-config.
> Couldn't we simply drop the *.private fields in the .pc files to 
> signalize we don't support static linking?

It's the dependency of the dependency of one of the Requires fields
which causes the breakage, not the Requires.private. i.e. the
Requires.private can be right but the static linkage can still fail.

Lack of Requires.private is no indicator of a lack of support for
--static. There are many libraries which could link statically but
which have no need for any data in Requires.private.

Dropping the Requires.private in libav doesn't signify anything - it
merely hides the real problem in the dependency chain. (A problem which
does not necessarily *have* a fix because static linkage is a corner

I appreciate that pkg-config and libav can both document this issue a
bit more usefully but nobody in this thread has so far given a robust
use case for changes in the code for either libav or pkg-config.

The original package (libav) doesn't link statically - fine, it isn't
explicitly supported so it doesn't have to work and the only problem
that has been described lies outside the remit of the libav package

Equally, pkg-config is not the place to go around checking whether the
supplied configuration actually works. pkg-config makes no pretence at
being the "one-stop-solution" for all your linking requirements,
although it can do most of the work most of the time - even for dynamic
linking there are times when it's not just the lack of a .pc file which
causes developers to need to add other stuff to the output of

The problem simply has to lie with the build system which is trying to
generate a static linkage. i.e. the problem isn't in libav, it isn't
in pkg-config. Those two can *document* possible reasons why static
linkage might not work in all cases but it isn't their problem when it
does fail.

Static just isn't universally supported / supportable. That puts the
burden firmly on those who want to link statically. There will be hacks
and changes needed in the build system of whatever is trying to
generate a static build and that is where these problems need to be
fixed. Maybe those hacks will include parsing the output of pkg-config
--static to make allowances for those dependencies which cannot link
statically. It won't be the last time that's going to be needed.


Neil Williams

Attachment: pgpbyCCyOPNfL.pgp
Description: PGP signature

Reply to: