From: Frederik Sdun <frederik.sdun@googlemail.com>
To: openembedded-devel@lists.openembedded.org
Subject: Re: gobject-introspection: pkg-config does not pick correct paths (was: pkg-config does not honor `PKG_CONFIG_SYSROOT_DIR`)
Date: Mon, 11 Oct 2010 03:35:25 +0200 [thread overview]
Message-ID: <20101011013524.GB20158@thinky> (raw)
In-Reply-To: <1286751753.9764.4.camel@mattotaupa>
[-- Attachment #1: Type: text/plain, Size: 4355 bytes --]
* Paul Menzel <paulepanter@users.sourceforge.net> [11.10.2010 01:03]:
> Am Montag, den 11.10.2010, 00:47 +0200 schrieb Frederik Sdun:
> > * Paul Menzel <paulepanter@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.
>
> > > [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
>
> That is a good idea. But remember that the staged package config files
> have the full path included already.
>
> $ /oe/build-minimal-libc/minimal-dev/sysroots/i686-linux/usr/bin/pkg-config --variable=libdir glib-2.0
> /oe/build-minimal-libc/minimal-dev/sysroots/i686-linux/usr/lib
>
> or
>
> $ PKG_CONFIG_DIR="/home/paul/oe/build-minimal-libc/minimal-dev/sysroots/armv7a-oe-linux-gnueabi/usr/lib/pkgconfig" ~/oe/build-minimal-libc/minimal-dev/sysroots/i686-linux/usr/bin/pkg-config --variable=libdir glib-2.0
> /oe/build-minimal-libc/minimal-dev/sysroots/i686-linux/usr/lib
>
>
> Thanks,
>
> Paul
I added some prints to dumper.py from gobject-introspection and it seems
that pkg-config doesn't provide the correct -L flags, even if I specify
--libs-only-L. Any ideas how to fix this?
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
--
IRC: playya @ Freenode, Gimpnet
xmpp: playya@draugr.de
identi.ca: playya
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
next prev parent reply other threads:[~2010-10-11 1:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-10 17:05 Preferred handling of pkg-config in cross compile environments Paul Menzel
2010-10-10 17:09 ` Chris Larson
2010-10-10 17:38 ` Paul Menzel
2010-10-10 18:11 ` Chris Larson
2010-10-10 18:36 ` Paul Menzel
2010-10-10 22:16 ` gobject-introspection: pkg-config does not honor `PKG_CONFIG_SYSROOT_DIR` (was: Preferred handling of pkg-config in cross compile environments.) Paul Menzel
2010-10-10 22:47 ` Frederik Sdun
2010-10-10 23:02 ` gobject-introspection: pkg-config does not pick correct paths (was: pkg-config does not honor `PKG_CONFIG_SYSROOT_DIR`) Paul Menzel
2010-10-11 1:35 ` Frederik Sdun [this message]
2010-10-11 19:34 ` Frederik Sdun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101011013524.GB20158@thinky \
--to=frederik.sdun@googlemail.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox