[vlc-devel] [PATCH] contrib: add a bootstrap option to allow using prebuilt packages when cross-compiling

Alexandre Janniaux ajanni at videolabs.io
Mon Feb 3 18:17:22 CET 2020


Hi,

On Sun, Feb 02, 2020 at 02:13:48PM +0200, 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.

Sure for the headers and run-time. Then using the /usr/ARCH
directory by default means that you're using the given arch
libraries for the same distribution...

> Just like if you *natively* build for a different distro.

...which means that yes, (when the distribution is different
for example) you theoretically need to provide your own SDK
path if you want to use a different SDK.

I don't want to imply the opposite.

> 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.

Like you mentioned, need_pkg=1 in cross builds was enforced
because it was using system libraries on a badly configured
build environment. So I don't really see why it wouldn't
extend to cross-distrib/SDK cross-build environments and why
it wouldn't concern neither cross-compilation nor pkg-config.

However, defining CC/sysroot (for libc and compiler) has
nothing to do with this patch, as it changes nothing for it.

I do understand that you don't like it and don't want it
though. As I said, if you're confident and Steve still want
to merge his first patch, let's just merge it right now.

I'll be fine and it will allow me to come back with a better
issue description if there is really an issue, without
bothering the mailing list.

Regards,
--
Alexandre Janniaux
Videolabs


More information about the vlc-devel mailing list