[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:35:10 CET 2020

On 2020-02-02 13:02, Alexandre Janniaux wrote:
>> (Though we might still need SB to make actual installable .deb's ?)
>> 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.
> In this case, you probably need a custom pkg-config script
> eventually anyway (I have one with two sysroot because
> contribs path is not written with the correct prefix and
> bot the variables and pc_sysrootdir are wrong then, and
> I didn't have time to write a proper fix for all contribs).
> But as you mentioned, it needs configuration.

Cross-compiling for a Linux target is tricky in any case as we 
dynamically link to the libraries we assume are installed. If you run 
the cross compiled build on a slightly different system configuration 
(even the same distro) it will not work.

So you have to know exactly what will be on your target system and deal 
with that. That includes tweaking where pkg-config finds its packages 
for that one particular target. As long as we use that tweaked one 
(either a custom PKG_CONFIG or a custom PKG_CONFIG_LIBDIR or both).

More information about the vlc-devel mailing list