[igt-dev] [PATCH i-g-t 1/2] Alter arm64 cross compile pkg-config library selections

Petri Latvala petri.latvala at intel.com
Tue Oct 19 08:37:39 UTC 2021


On Mon, Oct 18, 2021 at 09:55:37AM -0700, Lucas De Marchi wrote:
> On Mon, Oct 18, 2021 at 02:21:34PM +0300, Petri Latvala wrote:
> > On Fri, Oct 15, 2021 at 01:32:37PM -0700, Casey Bowman wrote:
> > > Specifies to use 'aarch64-linux-gnu-pkg-config' as the
> > > pkg-config binary to use, as the normal /usr/bin/pkg-config
> > > binary will be used on a host system. If we use this binary
> > > we will observe that the shared object libraries will be
> > > pulled from the x86_64 libraries instead of the aarch64 ones.
> > 
> > PKG_CONFIG_PATH can also be set accordingly, as is done in
> > .gitlab-ci.yml
> 
> is this something generally not setup in all distros?  using
> arch + -pkg-config matches the documentation at
> https://mesonbuild.com/Machine-files.html

Indeed, I stand corrected and setting the pkg-config binary is the
correct way to use it for cross-compiling! I was taken astray by the
gitlab-CI "just working", and the Debian packaging where a cross
wrapper does a good deal of the correct setup.

> 
> Indeed, checking my archlinux installation it seems I don't have a
> aarch64-linux-gnu-pkg-config and nothing provides it (even though there
> is a aarch64 crosscompiler). It looks like I even mentioned this issue
> in the past for another project at https://politreco.com/2019/09/side-load-on-embedded-linux-with-buildroot/
> 
> I wonder if we could rather set pkg_config_libdir like mentioned in
> https://mesonbuild.com/Cross-compilation.html and be compatible out of
> the box with more distros.

I don't understand the implications of this sentence:

  Since 0.54.0 The pkg_config_libdir property may point to a list of
  path used internally by Meson to set the PKG_CONFIG_LIBDIR
  environment variable for pkg-config.

We currently require meson >= 0.47.2. Does that sentence mean the
property isn't used at all, or is it a warning for meson versions >=
0.54?

Is arch an outlier with the lack of aarch64-linux-gnu-pkg-config btw?
I only know what's done with Debian based distros.


-- 
Petri Latvala


More information about the igt-dev mailing list