On Thu, Feb 28, 2019 at 06:46:41PM +0100, Andrea Bolognani wrote:
On Thu, 2019-02-28 at 15:52 +0000, Daniel P. Berrangé wrote:
> On Tue, Feb 26, 2019 at 07:04:16PM +0100, Andrea Bolognani wrote:
[...]
> > > + i686:
> > > + package_arch: i386
> > > + abi: i686-linux-gnu
> > > + cross_gcc: gcc-i686-linux-gnu
> >
> > The value of 'abi' doesn't look right: based on eg.
> >
> >
https://packages.debian.org/sid/i386/libglib2.0-dev/filelist
> >
> > it should be 'i386-linux-gnu' instead.
>
> The 'abi' is what is prefixed on the toolchain binaries,
> and so for this purpose i686-linux-gnu is actually correct:
>
>
https://packages.debian.org/sid/amd64/gcc-i686-linux-gnu/filelist
Okay, so I guess you need to have cross_target=i686-linux-gnu for
ENV CONFIGURE_OPTS "--host={cross_target} \
--target={cross_target}"
to work; however, that will cause issues for
ENV PKG_CONFIG_LIBDIR "/usr/lib/{cross_target}/pkgconfig"
because as shown above paths look like
/usr/lib/i386-linux-gnu/pkgconfig/glib-2.0.pc
and so on. What an inconsistent mess! Does it mean we need to
carry around both? :(
... Actually, it doesn't look like it: I just tried cross-building
for i686 (on sid/x86_64) by simply passing
--host=i686-linux-gnu --target=i686-linux-gnu
and the build system was able to locate all necessary dependencies
despite not having set $PKG_CONFIG_LIBDIR in the environment!
This seems to be thanks to i686-linux-gnu-pkg-config, which is a
symlink to /usr/share/pkg-config-crosswrapper, being picked up and
invoked instead of the native one.
Interesting. I'll have to check this again. In my previous versions
of this series, pkgconfig was mistakenly finding the native .pc
files, and PKG_CONFIG_LIBDIR was needed to fix it. So that can't have
been using the i686-linux-gnu-pkg-config binary before. I'll try and
see what changed..
Regards,
Daniel
--
|:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|:
https://libvirt.org -o-
https://fstop138.berrange.com :|
|:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|