QA issues with pkgconfig files
-----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@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@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@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-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Koen Kooi schreef:
Quoted 13 lines
Possible solutions:
1) set
PKG_CONFIG_PATHto ${STAGING_LIBDIR}/pkgconfig
+easy fix
-requires to re-rundo_pupulate_stagingfor 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
Quoted 1 line
Do you have any other solutions, and if not, which solution do you prefer?
4) have pkgconfig.bbclass sed _every_ .pc file in staging each run.
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFF3MrrMkyGM64RGpERAhy+AKCZIduV69i0NBVTtPgSRejWPxuuOwCdGMfN 5ZLOhkb6HKJEs+jzJ6o1nNI=
=w7yI
-----END PGP SIGNATURE-----
Hello Koen,
Quoted 18 lines · you
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Koen Kooi schreef:
Quoted 13 lines
Possible solutions:
1) set
PKG_CONFIG_PATHto ${STAGING_LIBDIR}/pkgconfig
+easy fix
-requires to re-rundo_pupulate_stagingfor 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
Quoted 3 lines
Quoted 1 line
Do you have any other solutions, and if not, which solution do you prefer?
4) have pkgconfig.bbclass sed _every_ .pc file in staging each run.
Why staging? Shouldn't we add sanitize_XXX(filename) where XXX is
any type of file insane.bbclass checks for, and call it around do_install? Plus, add sanitize_XXX_recursive() for lazy folks, who will search for broken stuff in install dir itself - just like insane currently does, except it will fix it on spot ;-)
Quoted 1 line
regards,
Signature · 2 lines
Best regards, Paul mailto:[email protected]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Paul Sokolovsky schreef:
Quoted 22 lines
Hello Koen,
Quoted 18 lines · you
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Koen Kooi schreef:
Quoted 13 lines
Possible solutions:
1) set
PKG_CONFIG_PATHto ${STAGING_LIBDIR}/pkgconfig
+easy fix
-requires to re-rundo_pupulate_stagingfor 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
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Do you have any other solutions, and if not, which solution do you prefer?
4) have pkgconfig.bbclass sed _every_ .pc file in staging each run.
Why staging?
Because the problem only manifests itself in staging. Have a look at pkgconfig.bbclass and you can see why.
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFF3UqRMkyGM64RGpERAhAqAJ9SaJ4nGMeadURDP9Ag2WRlLxbmcgCeJIWI 6KoDZcJ8JlnwqYGq8d7wb84=
=bwuZ
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Koen Kooi schreef:
Quoted 5 lines
Possible solutions:
2) symlink one dir to the other
+fixes hardcoded paths
-requires manual intervention to fixup files present and/or complete rebuild
No go, symlinks don't work well when using install -d...
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFF3VdAMkyGM64RGpERAn2gAJ4nBfGTPmPQ+smsH5nx51NIRdMTngCfY1S8 w6Hp2BL7SbVi3lMoj+3K3c4=
=cH6f
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Koen Kooi schreef:
Quoted 5 lines
Possible solutions:
1) set
PKG_CONFIG_PATHto ${STAGING_LIBDIR}/pkgconfig +easy fix
-requires to re-rundo_pupulate_stagingfor all packages
This seems to fix it in a clean way. Any objections to this going in today? Holger, can we disable the insane check for .pc files as well since pkgconfig.bbclass already sanitizes them?
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFF3X2LMkyGM64RGpERApCrAJ0bOZrPqRZvEYd2L7GfCNUaxy+dXgCffOlE LQ7SMuVhiEr2c5372pIWA1M=
=u4NS
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Koen Kooi schreef:
Quoted 9 lines
Koen Kooi schreef:
Quoted 5 lines
Possible solutions:
1) set
PKG_CONFIG_PATHto ${STAGING_LIBDIR}/pkgconfig +easy fix
-requires to re-rundo_pupulate_stagingfor all packagesThis seems to fix it in a clean way. Any objections to this going in today?
Speak now or be silent forever....
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFF3bM0MkyGM64RGpERAj+6AKCMDxx8a7wKvUTT90kr84En2R4HXQCgqfkX YnxlmEKeyQBQ8stwIVw/YHs=
=ZvIf
-----END PGP SIGNATURE-----
Am 22.02.2007 um 16:13 schrieb Koen Kooi:
Quoted 1 line
Speak now or be silent forever....
"now or be be silent forever...."
gotta love group thinking, why did I say this?
h.