[oe] gobject-introspection: pkg-config does not honor `PKG_CONFIG_SYSROOT_DIR` (was: Preferred handling of pkg-config in cross compile environments.)

Paul Menzel paulepanter at users.sourceforge.net
Sun Oct 10 22:16:28 UTC 2010


Am Sonntag, den 10.10.2010, 11:11 -0700 schrieb Chris Larson:
> On Sun, Oct 10, 2010 at 10:38 AM, Paul Menzel wrote:
> 
> > Am Sonntag, den 10.10.2010, 10:09 -0700 schrieb Chris Larson:
> > > On Sun, Oct 10, 2010 at 10:05 AM, Paul Menzel wrote:

[…]

> > Secondly I am having a similar problem with `gobject-introspection`
> > where [1]
> >
> >        gir/Makefile.am:GLIB_INCLUDEDIR=$(shell pkg-config --variable=includedir glib-2.0)/glib-2.0
> >        gir/Makefile.am:GLIB_LIBDIR=$(shell pkg-config --variable=libdir glib-2.0)
> >
> > returns the wrong path.
> >
> >        Making all in gir
> >        make[2]: Entering directory
> > `/oe/build-minimal-libc/minimal-dev/work/armv7a-oe-linux-gnueabi/gobject-introspection-0.9.12-r0/gobject-introspection-0.9.12/gir'
> >        make[2]: *** No rule to make target
> > `/usr/lib/glib-2.0/include/glibconfig.h', needed by `GLib-2.0.gir'.  Stop.
> >        make[2]: Leaving directory
> > `/oe/build-minimal-libc/minimal-dev/work/armv7a-oe-linux-gnueabi/gobject-introspection-0.9.12-r0/gobject-introspection-0.9.12/gir'
> >        make[1]: *** [all-recursive] Error 1
> 
> /usr/{lib,include} paths are mangled by pkg-config using
> PKG_CONFIG_SYSROOT_DIR.  If that's not happening here, that's a bug that
> should be investigated, but I fail to see how setting PKG_CONFIG is going to
> magically fix it.

Unfortunately I could not figure out, what is going on. My suspicion is,
that the function `shell` of the Makefile does not honor the environment
variables.

I tried to change the syntax to

        GLIB_INCLUDEDIR := `$(PKG_CONFIG) --variable=includedir glib-2.0`/glib-2.0
        GLIB_LIBDIR := `$(PKG_CONFIG) --variable=libdir glib-2.0`

(`git grep PKG_CONFIG` to see that this is used in some places) or

        GLIB_INCLUDEDIR=$(shell /oe/build-minimal-libc/minimal-dev/sysroots/i686-linux/usr/bin/pkg-config --variable=includedir glib-2.0)/glib-2.0
        GLIB_LIBDIR := $(shell /oe/build-minimal-libc/minimal-dev/sysroots/i686-linux/usr/bin/pkgconfig --variable=libdir glib-2.0)

but although the second one worked on the command line, it did not work
and did not return any path at all. (I edited `Makefile` in `work` and
executed `run.do_compile.…` manually.)

I also looked at the changes of pkg-config [1] after 0.23, but could not
find anything applicable to this problem.


Thanks,

Paul


[1] http://cgit.freedesktop.org/pkg-config/tree/NEWS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20101011/3301cbc7/attachment-0002.sig>


More information about the Openembedded-devel mailing list