[vlc-devel] [PATCH] contrib: add a bootstrap option to allow using prebuilt packages when cross-compiling
Steve Lhomme
robux4 at ycbcr.xyz
Mon Feb 3 09:02:32 CET 2020
On 2020-02-02 13:13, Rémi Denis-Courmont wrote:
> Le dimanche 2 février 2020, 14:02:16 EET Alexandre Janniaux a écrit :
>>> There are no valid reasons to disable pkg-config if it is correctly set
>>> (i.e., to the correct platform/directories). It won't find what's nowhere
>>> to be found. To take the extreme, if you wanted to compile VLC for bare
>>> (which won't work as is), you would anyway have the dedicated
>>> arm-none-... triplets, and you wouldn't hit any "wrong" packages.
>>
>> For instance, I build for (linaro-)aarch64-linux-gnu which
>> might become the same triplet name as raspberry one day,
>> and have /usr/aarch64-linux-gnu/ on my machine.
>
> And then what? If you need a different SDK with the same triplet, you have th
> same cross-tool names, so you need a different directories prefix. pkg-config
> makes no difference here: first and foremost, you need to point to the correct C
> compiler and C headers and run-time libraries.
>
> Just like if you *natively* build for a different distro.
>
> Point being, this has nothing to do with pkg-config and nothing to do with
> cross-compilation, and thus I don't see why there should be a cross-
> compilation-specific pkg-config-specific flag for that.
Are you suggesting to use TRIPLET-pkg-config even when not cross
compiling ? That could work (with the same fallback to pkg-config +
custom PKG_CONFIG_LIBDIR if not found).
We should also make sure we use the same PKG_CONFIG (and its
environment) between the contribs and VLC, as said earlier in the
thread. For example as I mentioned autotools uses
x86_64-w64-mingw32-pkg-config when cross compiling for Win64. Except,
this pkg-config doesn't work and will never find anything on the system.
It would have been better to use a working pkg-config with proper
PKG_CONFIG_LIBDIR, if the user wants to provide pre-compiled things.
More information about the vlc-devel
mailing list