[FFmpeg-devel] [PATCH] Use pkgconfig for dirac libs
Måns Rullgård
mans
Wed Oct 22 12:34:51 CEST 2008
Diego 'Flameeyes' Petten? wrote:
> M?ns Rullg?rd <mans at mansr.com> writes:
>
>>>> Use of pkgconfig is discouraged; it creates more problems than it
>>>> solves, especially when cross-compiling.
>>>
>>> How so?
>>
>> It tries to link with /usr/lib/libfoo.so instead of
>> /usr/arm-unknown-linux-gnueabi/usr/lib/libfoo.so. I'm sure you
>> understand why that doesn't work too well.
>
> Are you using the command as "pkg-config" ? pkg-config is a tool that,
> akin to gcc, ld and others, have a CTARGET as well as a CHOST; this
> means that you should have an arm-unknown-linux-gnueabi-pkg-config
> command that looks in /usr/arm-unknown-linux-gnueabi/usr/lib/pkgconfig
> rather than in /usr/lib/pkgconfig .
It *does* look there; that's not the problem. The problem is that the
pkgconfig files installed there point to /usr. Go figure.
> I'm sure of what I say because I _did_ engineer a crosscompiling
> toolchain for work two years ago and I had pkg-config working perfectly
> fine that way...
>
> I just checked the configure and it uses pkg-config directly; instead it
> should use "${cross_prefix}pkg-config", and then it wouldn't "lie" to you
> anymore. Yes I know it's no the most intuitive of things, but if you
> think a bit about how crosscompiling is done it does fit in.
The more I think, the more useless pkgconfig seems. The compiler is
already configured to look in the cross-root. It's pkgconfig that
sends it elsewhere.
> I know it's like asking a poisoned person to look up a digitalis flower,
> but if you check pkg.m4 or the output of an autoconf ./configure that
> uses pkg-config, it looks for $host-pkg-config before checking for
> pkg-config itself.
I'm not talking about the ffmpeg configure script. I'm talking about
supposedly kosher autohell-generated scripts in various packages,
including gnu coreutils.
If I don't use pkgconfig, everything works as expected; if I do use it,
all hell breaks loose. Hence, I won't use it unless forced to.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list