All of lore.kernel.org
 help / color / mirror / Atom feed
* Preferred handling of pkg-config in cross compile environments.
@ 2010-10-10 17:05 Paul Menzel
  2010-10-10 17:09 ` Chris Larson
  0 siblings, 1 reply; 10+ messages in thread
From: Paul Menzel @ 2010-10-10 17:05 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

Dear OE folks,


I stumbled upon several programs who call plain `pkg-config` [1][2].

Is the following statement correct?

To be able to cross compile programs correctly, the build files are
supposed to use the environment variable `PKG_CONFIG` and only call
pkg-config directly if `PKG_CONFIG` is empty.

        if test -z "${PKG_CONFIG}"; then
            PKG_CONFIG="pkg-config"

If you agree I would note that somewhere in the Wiki, so that upstream
can be pointed to some documentation and search the Web will result in
some useful results.


Thanks,

Paul


[1] http://git.gnome.org/browse/gobject-introspection/tree/gir/Makefile.am?id=b89a110fdd9f6a0c4c0291a6016cb154bb715b0a

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Preferred handling of pkg-config in cross compile environments.
  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
  0 siblings, 1 reply; 10+ messages in thread
From: Chris Larson @ 2010-10-10 17:09 UTC (permalink / raw)
  To: openembedded-devel

On Sun, Oct 10, 2010 at 10:05 AM, Paul Menzel <
paulepanter@users.sourceforge.net> wrote:

> I stumbled upon several programs who call plain `pkg-config` [1][2].
>
> Is the following statement correct?
>
> To be able to cross compile programs correctly, the build files are
> supposed to use the environment variable `PKG_CONFIG` and only call
> pkg-config directly if `PKG_CONFIG` is empty.
>
>        if test -z "${PKG_CONFIG}"; then
>            PKG_CONFIG="pkg-config"
>
> If you agree I would note that somewhere in the Wiki, so that upstream
> can be pointed to some documentation and search the Web will result in
> some useful results.
>

Can you explain why running just 'pkg-config' is a problem?  It seems to
work just fine..
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Preferred handling of pkg-config in cross compile environments.
  2010-10-10 17:09 ` Chris Larson
@ 2010-10-10 17:38   ` Paul Menzel
  2010-10-10 18:11     ` Chris Larson
  0 siblings, 1 reply; 10+ messages in thread
From: Paul Menzel @ 2010-10-10 17:38 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 2119 bytes --]

Am Sonntag, den 10.10.2010, 10:09 -0700 schrieb Chris Larson:
> On Sun, Oct 10, 2010 at 10:05 AM, Paul Menzel <
> paulepanter@users.sourceforge.net> wrote:
> 
> > I stumbled upon several programs who call plain `pkg-config` [1][2].
> >
> > Is the following statement correct?
> >
> > To be able to cross compile programs correctly, the build files are
> > supposed to use the environment variable `PKG_CONFIG` and only call
> > pkg-config directly if `PKG_CONFIG` is empty.
> >
> >        if test -z "${PKG_CONFIG}"; then
> >            PKG_CONFIG="pkg-config"
> >
> > If you agree I would note that somewhere in the Wiki, so that upstream
> > can be pointed to some documentation and search the Web will result in
> > some useful results.
> >
> 
> Can you explain why running just 'pkg-config' is a problem?  It seems to
> work just fine..

Do you have a minimal build host. Some problems do not surface if some
files are installed locally on the build host.

Please take a look at [2] I forgot to add in my original message. I have
no clue why the staged(?) pkg-config behaves differently than the local
installed one. Does it search the paths in a different order?

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


Thanks,

Paul


[2] http://lists.linuxtogo.org/pipermail/openembedded-devel/2010-August/023029.html

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Preferred handling of pkg-config in cross compile environments.
  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
  0 siblings, 2 replies; 10+ messages in thread
From: Chris Larson @ 2010-10-10 18:11 UTC (permalink / raw)
  To: openembedded-devel

On Sun, Oct 10, 2010 at 10:38 AM, Paul Menzel <
paulepanter@users.sourceforge.net> wrote:

> Am Sonntag, den 10.10.2010, 10:09 -0700 schrieb Chris Larson:
> > On Sun, Oct 10, 2010 at 10:05 AM, Paul Menzel <
> > paulepanter@users.sourceforge.net> wrote:
> >
> > > I stumbled upon several programs who call plain `pkg-config` [1][2].
> > >
> > > Is the following statement correct?
> > >
> > > To be able to cross compile programs correctly, the build files are
> > > supposed to use the environment variable `PKG_CONFIG` and only call
> > > pkg-config directly if `PKG_CONFIG` is empty.
> > >
> > >        if test -z "${PKG_CONFIG}"; then
> > >            PKG_CONFIG="pkg-config"
> > >
> > > If you agree I would note that somewhere in the Wiki, so that upstream
> > > can be pointed to some documentation and search the Web will result in
> > > some useful results.
> > >
> >
> > Can you explain why running just 'pkg-config' is a problem?  It seems to
> > work just fine..
>
> Do you have a minimal build host. Some problems do not surface if some
> files are installed locally on the build host.
>
> Please take a look at [2] I forgot to add in my original message. I have
> no clue why the staged(?) pkg-config behaves differently than the local
> installed one. Does it search the paths in a different order?
>

pkgconfig-native searches its own built in path (the one in the native
sysroot) along with the paths in PKG_CONFIG_PATH.  None of those are outside
of the sysroots.

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.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Preferred handling of pkg-config in cross compile environments.
  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
  1 sibling, 0 replies; 10+ messages in thread
From: Paul Menzel @ 2010-10-10 18:36 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 2917 bytes --]

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 <
> > > paulepanter@users.sourceforge.net> wrote:
> > >
> > > > I stumbled upon several programs who call plain `pkg-config` [1][2].
> > > >
> > > > Is the following statement correct?
> > > >
> > > > To be able to cross compile programs correctly, the build files are
> > > > supposed to use the environment variable `PKG_CONFIG` and only call
> > > > pkg-config directly if `PKG_CONFIG` is empty.
> > > >
> > > >        if test -z "${PKG_CONFIG}"; then
> > > >            PKG_CONFIG="pkg-config"
> > > >
> > > > If you agree I would note that somewhere in the Wiki, so that upstream
> > > > can be pointed to some documentation and search the Web will result in
> > > > some useful results.
> > > >
> > >
> > > Can you explain why running just 'pkg-config' is a problem?  It seems to
> > > work just fine..
> >
> > Do you have a minimal build host. Some problems do not surface if some
> > files are installed locally on the build host.
> >
> > Please take a look at [2] I forgot to add in my original message. I have
> > no clue why the staged(?) pkg-config behaves differently than the local
> > installed one. Does it search the paths in a different order?
> 
> pkgconfig-native searches its own built in path (the one in the native
> sysroot) along with the paths in PKG_CONFIG_PATH.  None of those are outside
> of the sysroots.

Well obviously something is not working then, since the bug is there as
documented in [2].

> > 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.

I do not see it either. But Khem’s patch helped [2].


Thanks,

Paul

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* gobject-introspection: pkg-config does not honor `PKG_CONFIG_SYSROOT_DIR` (was: Preferred handling of pkg-config in cross compile environments.)
  2010-10-10 18:11     ` Chris Larson
  2010-10-10 18:36       ` Paul Menzel
@ 2010-10-10 22:16       ` Paul Menzel
  2010-10-10 22:47         ` Frederik Sdun
  1 sibling, 1 reply; 10+ messages in thread
From: Paul Menzel @ 2010-10-10 22:16 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 2473 bytes --]

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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: gobject-introspection: pkg-config does not honor `PKG_CONFIG_SYSROOT_DIR` (was: Preferred handling of pkg-config in cross compile environments.)
  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
  0 siblings, 1 reply; 10+ messages in thread
From: Frederik Sdun @ 2010-10-10 22:47 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 3177 bytes --]

* 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.
> 
> 
> 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@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 --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* gobject-introspection: pkg-config does not pick correct paths (was: pkg-config does not honor `PKG_CONFIG_SYSROOT_DIR`)
  2010-10-10 22:47         ` Frederik Sdun
@ 2010-10-10 23:02           ` Paul Menzel
  2010-10-11  1:35             ` Frederik Sdun
  0 siblings, 1 reply; 10+ messages in thread
From: Paul Menzel @ 2010-10-10 23:02 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 3650 bytes --]

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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: gobject-introspection: pkg-config does not pick correct paths (was: pkg-config does not honor `PKG_CONFIG_SYSROOT_DIR`)
  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
  2010-10-11 19:34               ` Frederik Sdun
  0 siblings, 1 reply; 10+ messages in thread
From: Frederik Sdun @ 2010-10-11  1:35 UTC (permalink / raw)
  To: openembedded-devel

[-- 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 --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: gobject-introspection: pkg-config does not pick correct paths (was: pkg-config does not honor `PKG_CONFIG_SYSROOT_DIR`)
  2010-10-11  1:35             ` Frederik Sdun
@ 2010-10-11 19:34               ` Frederik Sdun
  0 siblings, 0 replies; 10+ messages in thread
From: Frederik Sdun @ 2010-10-11 19:34 UTC (permalink / raw)
  To: openembedded-devel


[-- Attachment #1.1: Type: text/plain, Size: 4553 bytes --]

Am Montag, den 11.10.2010, 03:35 +0200 schrieb Frederik Sdun:
> * 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
> 
> 

Here's a diff of my current status. 


[-- Attachment #1.2: introspection.tar.gz --]
[-- Type: application/x-compressed-tar, Size: 2157 bytes --]

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-10-11 19:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2010-10-11 19:34               ` Frederik Sdun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.