Hi, I was trying to add debuginfod support to gdb-cross-canadian_10.1 similar to [1] and stumbled across a possible issue with cross-canadian.bbclass. [1]: https://docs.yoctoproject.org/3.3.3/dev-manual/common-tasks.html#using-the-debuginfod-server-method This can be reproduced with the default configuration from hardknott-3.3.3. I use a Debian 10 build host. Add the following package config options to local.conf: PACKAGECONFIG_append_pn-nativesdk-elfutils = " libdebuginfod" PACKAGECONFIG_append_pn-gdb-cross-canadian-x86-64 = " debuginfod tui" Create gdb-cross-canadian_10.1.bbappend in a custom layer with: FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" PACKAGECONFIG[debuginfod] = "--with-debuginfod,--without-debuginfod,nativesdk-elfutils" Building gdb-cross-canadian fails with the following configuration error: $ bitbake gdb-cross-canadian-x86-64 ... checking for libdebuginfod >= 0.179... no configure: error: "--with-debuginfod was given, but libdebuginfod is missing or unusable." make[1]: *** [Makefile:9368: configure-gdb] Error 1 Which should not happen since libdebuginfod is installed in the recipe sysroot: root@yocto-build-host:~/work/poky/build/tmp/work/x86_64-nativesdk-pokysdk-linux/gdb-cross-canadian-x86-64/10.1-r0/gdb-10.1# find ../ -name libdebuginfod* ../recipe-sysroot/opt/poky/3.3.3/sysroots/x86_64-pokysdk-linux/usr/lib/libdebuginfod.so ../recipe-sysroot/opt/poky/3.3.3/sysroots/x86_64-pokysdk-linux/usr/lib/libdebuginfod.so.1 ../recipe-sysroot/opt/poky/3.3.3/sysroots/x86_64-pokysdk-linux/usr/lib/libdebuginfod-0.183.so ../recipe-sysroot/opt/poky/3.3.3/sysroots/x86_64-pokysdk-linux/usr/lib/pkgconfig/libdebuginfod.pc The configure script uses pkg-config to locate libdebuginfod, pkg-config relies on the environment variable ${PKG_CONFIG_PATH} to find the pc files. However the value of ${PKG_CONFIG_PATH} contains an un-expanded variable ${layout_bindir}: root@yocto-build-host:~/work/poky/build/tmp/work/x86_64-nativesdk-pokysdk-linux/gdb-cross-canadian-x86-64/10.1-r0/gdb-10.1# echo $PKG_CONFIG_PATH /home/user/work/poky/build/tmp/work/x86_64-nativesdk-pokysdk-linux/gdb-cross-canadian-x86-64/10.1-r0/recipe-sysroot${layout_libdir}/pkgconfig:/home/user/work/poky/build/tmp/work/x86_64-nativesdk-pokysdk-linux/gdb-cross-canadian-x86-64/10.1-r0/recipe-sysroot/opt/poky/3.3.3/sysroots/x86_64-pokysdk-linux/usr/share/pkgconfig The gdb-cross-canadian recipe inherits cross-canadian.bbclass where the PKG_CONFIG_PATH is set and the ${layout_bindir} variable is introduced (on line 158). I cannot find where ${layout_bindir} is supposed to be set, but when I assign it in the append file, the build succeeds and the cross gdb in the sdk has debuginfod support. meta-custom/recipes-devtools/gdb/gdb-cross-canadian_10.1.bbappend: FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" layout_libdir = "${exec_prefix}/lib" PACKAGECONFIG[debuginfod] = "--with-debuginfod,--without-debuginfod,nativesdk-elfutils" I'm fairly new to Yocto and not sure whether this is a mistake in cross-canadian.bbclass or I'm just missing something. Kind regards, Dennis.
This is a hardknott specific issue and doesn't occur in honister. I think we need http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=7c4d502c7417de5182caa52a9ab2baa7f90710cb in hardknott to fix this. To make debuginfod work there I also found I needed OE-Core revs: 4a985ff0dd13c455dadf85f4ad35a0a42f4bd9f1: bitbake.conf: enable debuginfod in native/nativesdk e6035099772a0ccbb4835c0c782317c19527876c: libmicrohttpd: add a recipe from meta-oe 024c88c82791a113b614abf61ffd82e097bf21d1: default-distrovars.inc: add debuginfod to default DISTRO_FEATURES b903f250a7bbf04d5853f537b7565a80fb7ce1f3: gdb-cross: enable debuginfod Assign to Anuj as maintainer of hardknott for the missing patch.
The fix has been merged in hardknott. https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=hardknott&id=e3db5c70da5448a1491e2e4823869811f0e1ec6e