[oe] QA issues with pkgconfig files
Koen Kooi
koen at dominion.kabel.utwente.nl
Wed Feb 21 22:27:54 UTC 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I was trying to fix some of the problems insane.bbclass reported and noticed that the
problem was somewhere else. Lets look at the following:
NOTE: QA checking staging
ERROR: QA issue: xproto.pc failed sanity test (reference to /usr/include or workdir)
So, let's find the file .pc file, bitbake.conf says export PKG_CONFIG_PATH =
"${STAGING_DATADIR}/pkgconfig":
koen at bitbake:/data/build/koen/OE/build/tmp/angstrom/staging/powerpc-angstrom-linux$ cat
./share/pkgconfig/xproto.pc
prefix=/data/build/koen/OE/build/tmp/angstrom/staging/powerpc-angstrom-linux/lib/..
exec_prefix=/data/build/koen/OE/build/tmp/angstrom/staging/powerpc-angstrom-linux/lib/..
libdir=/data/build/koen/OE/build/tmp/angstrom/staging/powerpc-angstrom-linux/lib
includedir=/data/build/koen/OE/build/tmp/angstrom/staging/powerpc-angstrom-linux/include
includex11dir=/data/build/koen/OE/build/tmp/angstrom/staging/powerpc-angstrom-linux/include/X11
Name: Xproto
Description: Xproto headers
Version: 7.0.5
Cflags: -I${includedir}
Weird, that looks ok, why is insane.bbclass complaining? Lets search some more:
oen at bitbake:/data/build/koen/OE/build/tmp/angstrom/staging/powerpc-angstrom-linux$ find .
- -name xproto.pc
./lib/pkgconfig/xproto.pc
./share/pkgconfig/xproto.pc
Aha! xproto doesn't honour PKG_CONFIG_PATH and installs it in ${libdir}/pkgconfig. Lets
look at that file:
koen at bitbake:/data/build/koen/OE/build/tmp/angstrom/staging/powerpc-angstrom-linux$ cat
./lib/pkgconfig/xproto.pc
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib
includedir=/usr/include
includex11dir=/usr/include/X11
Name: Xproto
Description: Xproto headers
Version: 7.0.5
Cflags: -I${includedir}
Gotcha! That's the culprit! Now, how should we fix this mess?
Possible solutions:
1) set PKG_CONFIG_PATH to ${STAGING_LIBDIR}/pkgconfig
+easy fix
-requires to re-run do_pupulate_staging for all packages
2) symlink one dir to the other
+fixes hardcoded paths
-requires manual intervention to fixup files present and/or complete rebuild
3) have pkgconfig.bbclass delete one dir each run
-requires every packages that has .pc files to inherit pkgconfig
-ugly
-error-prone
Do you have any other solutions, and if not, which solution do you prefer?
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFF3MdqMkyGM64RGpERArytAKCGbcHVcRSzYG8v/mxH0mNdtkIIJgCfTpZA
VO3zSiJekWoJWe8DDWFmtRw=
=FvI8
-----END PGP SIGNATURE-----
More information about the Openembedded-devel
mailing list