[Vorbis] libvorbisfile dynamic linkage with pkg-config - inter-library dependencies?
Ralph Giles
giles at thaumas.net
Tue Aug 12 14:40:23 PDT 2014
On 2014-08-12 1:51 PM, Richard Ash wrote:
> In the short term I will get Audacity to explicitly link to both
> libraries by altering the pkg-config request (because this is the line
> of least resistance), but I would be interested to know which of these
> was the upstream developers intentions.
vorbisfile is a convenience wrapper around libvorbis (and libogg) for
file decoding. So it calls libvorbis directly and can't function without it.
vorbisenc is similar. It calls into libvorbis directly, and
Requires.private vorbis in its pkg-config file.
I suspect the intention was that casual users of _just_ vorbisfile be
able to -lvorbisfile and have everything work. Of course if you also
want to call libvorbis directly you should -lvorbis as well. From that
point of view gentoo's patch is wrong. All three libraries are built
from the same source, so there shouldn't be problems with re-exports.
You could argue that implicit so dependencies are wrong and confusing,
and everyone should '-lvorbisfile -lvorbis -logg' explicitly. From that
point of view the gentoo patch is helpful and Requires.private is the
wrong approach.
I don't feel strongly about it, and there's precedent for both with
theora impelmenting the second approach. Patching audacity to ask
pkg-config is what you need to do to work with the current vorbis
release, however.
-r
More information about the Vorbis
mailing list