Preferred handling of pkg-config in cross compile environments.
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
Quoted 8 lines · Paul Menzel
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_CONFIGand only call pkg-config directly ifPKG_CONFIGis empty.
Quoted 7 lines
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..
Signature · 5 lines
Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics
Am Sonntag, den 10.10.2010, 10:09 -0700 schrieb Chris Larson:
Quoted 14 lines
Quoted 11 lines · Paul Menzel
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_CONFIGand only call pkg-config directly ifPKG_CONFIGis empty.if test -z "${PKG_CONFIG}"; then PKG_CONFIG="pkg-config"
Quoted 7 lines
Quoted 4 lines
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
Quoted 23 lines · Paul Menzel
Am Sonntag, den 10.10.2010, 10:09 -0700 schrieb Chris Larson:
Quoted 14 lines
Quoted 11 lines · Paul Menzel
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_CONFIGand only call pkg-config directly ifPKG_CONFIGis empty.if test -z "${PKG_CONFIG}"; then PKG_CONFIG="pkg-config"Quoted 7 lines
Quoted 4 lines
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..
Quoted 7 lines
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
Quoted 9 lines
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=libdirglib-2.0)
returns the wrong path.
Quoted 8 lines
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 byGLib-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.
Signature · 5 lines
Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics
Am Sonntag, den 10.10.2010, 11:11 -0700 schrieb Chris Larson:
Quoted 28 lines · Paul Menzel
Quoted 27 lines
Am Sonntag, den 10.10.2010, 10:09 -0700 schrieb Chris Larson:
Quoted 14 lines
Quoted 11 lines · Paul Menzel
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_CONFIGand only call pkg-config directly ifPKG_CONFIGis empty.if test -z "${PKG_CONFIG}"; then PKG_CONFIG="pkg-config"Quoted 7 lines
Quoted 4 lines
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.
Quoted 7 lines
Quoted 3 lines
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].
Quoted 19 lines
Quoted 10 lines
Secondly I am having a similar problem with
gobject-introspectionwhere [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=libdirglib-2.0)
returns the wrong path.
Quoted 8 lines
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 byGLib-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
Quoted 4 lines
/usr/{lib,include}paths are mangled by pkg-config usingPKG_CONFIG_SYSROOT_DIR. If that's not happening here, that's a bug that should be investigated, but I fail to see how settingPKG_CONFIGis going to magically fix it.
I do not see it either. But Khem’s patch helped [2].
Thanks,
Paul
gobject-introspection: pkg-config does not honor `PKG_CONFIG_SYSROOT_DIR` (was: Preferred handling of pkg-config in cross compile environments.)
In reply to Chris LarsonAm Sonntag, den 10.10.2010, 11:11 -0700 schrieb Chris Larson:
Quoted 4 lines · Paul Menzel
Quoted 3 lines
Am Sonntag, den 10.10.2010, 10:09 -0700 schrieb Chris Larson:
Quoted 1 line · Paul Menzel
[…]
Quoted 17 lines
Quoted 8 lines
Secondly I am having a similar problem with
gobject-introspectionwhere [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.
Quoted 8 lines
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 byGLib-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
Quoted 4 lines
/usr/{lib,include}paths are mangled by pkg-config usingPKG_CONFIG_SYSROOT_DIR. If that's not happening here, that's a bug that should be investigated, but I fail to see how settingPKG_CONFIGis 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
Re: gobject-introspection: pkg-config does not honor `PKG_CONFIG_SYSROOT_DIR` (was: Preferred handling of pkg-config in cross compile environments.)
Quoted 52 lines · Paul Menzel
Am Sonntag, den 10.10.2010, 11:11 -0700 schrieb Chris Larson:
Quoted 4 lines · Paul Menzel
Quoted 3 lines
Am Sonntag, den 10.10.2010, 10:09 -0700 schrieb Chris Larson:
Quoted 1 line · Paul Menzel
[…]
Quoted 17 lines
Quoted 8 lines
Secondly I am having a similar problem with
gobject-introspectionwhere [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.
Quoted 8 lines
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 byGLib-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 1Quoted 4 lines
/usr/{lib,include}paths are mangled by pkg-config usingPKG_CONFIG_SYSROOT_DIR. If that's not happening here, that's a bug that should be investigated, but I fail to see how settingPKG_CONFIGis going to magically fix it.Unfortunately I could not figure out, what is going on. My suspicion is, that the function
shellof theMakefiledoes 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_CONFIGto see that this is used in some places) orGLIB_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
Makefileinworkand executedrun.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.
Quoted 6 lines
Thanks,
Paul
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
Quoted 4 lines
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Signature · 3 lines
IRC: playya @ Freenode, Gimpnet xmpp: [email protected] identi.ca: playya
gobject-introspection: pkg-config does not pick correct paths (was: pkg-config does not honor `PKG_CONFIG_SYSROOT_DIR`)
Am Montag, den 11.10.2010, 00:47 +0200 schrieb Frederik Sdun:
Quoted 52 lines · Paul Menzel
Quoted 50 lines
Am Sonntag, den 10.10.2010, 11:11 -0700 schrieb Chris Larson:
Quoted 4 lines · Paul Menzel
Quoted 3 lines
Am Sonntag, den 10.10.2010, 10:09 -0700 schrieb Chris Larson:
Quoted 1 line · Paul Menzel
[…]
Quoted 17 lines
Quoted 8 lines
Secondly I am having a similar problem with
gobject-introspectionwhere [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.
Quoted 8 lines
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 byGLib-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 1Quoted 4 lines
/usr/{lib,include}paths are mangled by pkg-config usingPKG_CONFIG_SYSROOT_DIR. If that's not happening here, that's a bug that should be investigated, but I fail to see how settingPKG_CONFIGis going to magically fix it.Unfortunately I could not figure out, what is going on. My suspicion is, that the function
shellof theMakefiledoes 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_CONFIGto see that this is used in some places) orGLIB_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
Makefileinworkand executedrun.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.
Quoted 6 lines
Quoted 1 line
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/libor
$ 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/libThanks,
Paul
Re: gobject-introspection: pkg-config does not pick correct paths (was: pkg-config does not honor `PKG_CONFIG_SYSROOT_DIR`)
Quoted 68 lines · Paul Menzel
Am Montag, den 11.10.2010, 00:47 +0200 schrieb Frederik Sdun:
Quoted 52 lines · Paul Menzel
Quoted 50 lines
Am Sonntag, den 10.10.2010, 11:11 -0700 schrieb Chris Larson:
Quoted 4 lines · Paul Menzel
Quoted 3 lines
Am Sonntag, den 10.10.2010, 10:09 -0700 schrieb Chris Larson:
Quoted 1 line · Paul Menzel
[…]
Quoted 17 lines
Quoted 8 lines
Secondly I am having a similar problem with
gobject-introspectionwhere [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.
Quoted 8 lines
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 byGLib-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 1Quoted 4 lines
/usr/{lib,include}paths are mangled by pkg-config usingPKG_CONFIG_SYSROOT_DIR. If that's not happening here, that's a bug that should be investigated, but I fail to see how settingPKG_CONFIGis going to magically fix it.Unfortunately I could not figure out, what is going on. My suspicion is, that the function
shellof theMakefiledoes 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_CONFIGto see that this is used in some places) orGLIB_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
Makefileinworkand executedrun.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.
Quoted 6 lines
Quoted 1 line
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 flagsThat 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/libor
Quoted 7 lines
$ 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/libThanks,
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?
Quoted 4 lines
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Signature · 3 lines
IRC: playya @ Freenode, Gimpnet xmpp: [email protected] identi.ca: playya
Re: gobject-introspection: pkg-config does not pick correct paths (was: pkg-config does not honor `PKG_CONFIG_SYSROOT_DIR`)
Am Montag, den 11.10.2010, 03:35 +0200 schrieb Frederik Sdun:
Quoted 73 lines · Paul Menzel
Quoted 72 lines
Am Montag, den 11.10.2010, 00:47 +0200 schrieb Frederik Sdun:
Quoted 52 lines · Paul Menzel
Quoted 50 lines
Am Sonntag, den 10.10.2010, 11:11 -0700 schrieb Chris Larson:
Quoted 4 lines · Paul Menzel
Quoted 3 lines
Am Sonntag, den 10.10.2010, 10:09 -0700 schrieb Chris Larson:
Quoted 1 line · Paul Menzel
[…]
Quoted 17 lines
Quoted 8 lines
Secondly I am having a similar problem with
gobject-introspectionwhere [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.
Quoted 8 lines
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 byGLib-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 1Quoted 4 lines
/usr/{lib,include}paths are mangled by pkg-config usingPKG_CONFIG_SYSROOT_DIR. If that's not happening here, that's a bug that should be investigated, but I fail to see how settingPKG_CONFIGis going to magically fix it.Unfortunately I could not figure out, what is going on. My suspicion is, that the function
shellof theMakefiledoes 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_CONFIGto see that this is used in some places) orGLIB_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
Makefileinworkand executedrun.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.
Quoted 6 lines
Quoted 1 line
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 flagsThat 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/libor
$ 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
Quoted 14 lines
Quoted 3 lines
Thanks,
Paul
I added some prints to
dumper.pyfrom 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?Quoted 4 lines
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Here's a diff of my current status.