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

Frederik Sdun frederik.sdun at googlemail.com
Sun Oct 10 22:47:32 UTC 2010


* Paul Menzel <paulepanter at users.sourceforge.net> [11.10.2010 00:17]:
> 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
I think the problem is, that pkg-config --variable is used here, which
doesn't expand the paths.
I try to provide a patch, which make it possible to specify the sysroot
and uses pkg-config --cflags-only-I for the flags


> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel


-- 
IRC: playya @ Freenode, Gimpnet
xmpp: playya at draugr.de
identi.ca: playya
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20101011/a2fe8c20/attachment-0002.sig>


More information about the Openembedded-devel mailing list