[linux-yocto] how to add recipe-sysroot-native to PKG_CONFIG_PATH for linux-yocto
Tong Chen
yihect at gmail.com
Tue May 14 02:06:14 PDT 2019
Hi all:
I'm adding some kernel extensions to poky. In summary, I need to extend
kallsyms, and the new functionality depends on glib-2.0.
So I added pkg-confi in the ./scripts/Makefile:
HOSTCFLAGS_kallsyms.o := $(shell pkg-config --cflags glib-2.0)
-I$(srctree)/scripts
HOSTLDLIBS_kallsyms := $(shell pkg-config --libs glib-2.0) -ldw
But when compiling with bitbake, the following error occurs:
| Package glib-2.0 was not found in the pkg-config search path.
| Perhaps you should add the directory containing `glib-2.0.pc'
| to the PKG_CONFIG_PATH environment variable
| No package 'glib-2.0' found
Extrat the setting of PKG_CONFIG_PATH from temp/run.do_compile:
Export
PKG_CONFIG_PATH="/home/hchan/code/poky_new/poky/build_ctd/tmp/work/qemux86_64-poky-linux/linux-yocto/5.0.7+gitAUTOINC+d26eec23cf_891531d68e-r0/recipe-sysroot/usr/lib/pkgconfig
:/home/hchan/code/poky_new/poky/build_ctd/tmp/work/qemux86_64-poky-linux/linux-yocto/5.0.7+gitAUTOINC+d26eec23cf_891531d68e-r0/recipe-sysroot/usr/share/pkgconfig"
Look at the recipe-sysroot directory, where there is no corresponding
glib-2.0.pc file, but in the recipe-sysroot-native directory, there is:
./recipe-sysroot-native/usr/lib/pkgconfig/glib-2.0.pc
So my question is how to insert recipe-sysroot-native directory to
PKG_CONFIG_PATH variable?
I am not particularly familiar with poky/bitbake at the moment. By
searching, I found these assignments. But not sure where to add it, and how
to add:
Hchan at hchan-ThinkPad:~/code/poky_new/poky$ grep --color -rnH 'export
PKG_CONFIG_PATH=' ./meta*
./meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-native.in:3:export
PKG_CONFIG_PATH="@PATH_NATIVE@"
./meta/recipes-devtools/qemu/qemu.inc:85: export
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
./meta/classes/toolchain-scripts.bbclass:49: echo 'export
PKG_CONFIG_PATH=$SDKTARGETSYSROOT'"$libdir"'/pkgconfig:$SDKTARGETSYSROOT'"$prefix"'/share/pkgconfig'
>> $script
./meta/classes/toolchain-scripts.bbclass:72: echo 'export
PKG_CONFIG_PATH=${PKG_CONFIG_PATH}' >> $script
--
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/linux-yocto/attachments/20190514/6c731b0e/attachment.html>
More information about the linux-yocto
mailing list