I am trying to build a custom yocto recipe, which involves compiling a small C program. During the build -
$ bitbake -f interface-configuration
...
ERROR: QA Issue: non debug package contains .debug directory: interface-configuration path /work/cortexa9hf-vfp-poky-linux-gnueabi/interface-configuration/0.1-r0/packages-split/interface-configuration/etc/interfaces/bin/.debug/set
ERROR: QA run found fatal errors. Please consider fixing them.
ERROR: Function failed: do_package_qa
ERROR: Logfile of failure stored in: /home/git/poky/build-atmel/tmp/work/cortexa9hf-vfp-poky-linux-gnueabi/interface-configuration/0.1-r0/temp/log.do_package.28986
ERROR: Task 10 (/home/git/poky/meta-atmel/recipes-intelli/interface-configuration/interface-configuration_0.1.bb, do_package) failed with exit code '1'
I was wondering if anyone on here know how to either disable debug info or remove the QA check. Google search for the error has proven fruitless so far.
Cheers
Update with interface-configuration.bb
DESCRIPTION = "Interface configuration files and tools"
SECTION = "examples"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
SRC_URI = "file://interface-configuration-0.1.tar.gz"
do_compile() {
install -vd ${D}/
${CC} -g0 set.c -o set
# CC is arm-poky-linux-gnueabi-gcc -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mtune=cortex-a9 --sysroot=/home/git/poky/build-atmel/tmp/sysroots/sama5d3xek
}
do_install() {
cp -r ${S}/etc ${D}/etc
install -vd ${D}/etc/interfaces/bin
install -vm 0755 set ${D}/etc/interfaces/bin/
}
do_install_append() {
# I added this to try to remove the error - it doesn't work
rm -rf ${D}/etc/interfaces/bin/.debug
}
FILES_${PN} += "/etc/interfaces/MANIFEST \
/etc/interfaces/conf/A \
/etc/interfaces/conf/B \
/etc/interfaces/conf/C \
/etc/interfaces/conf/D \
/etc/interfaces/template/A \
/etc/interfaces/template/B \
/etc/interfaces/template/C \
/etc/interfaces/template/D \
/set.c"
Yocto/OE generate a .debug
-directory under the directory where the binary is placed. You use a non default directory for a binary (install -vm 0755 set ${D}/etc/interfaces/bin
). You need to declare that .debug goes to the -dbg
package.
You have two options now. First use of standard directory like ${D}/usr/bin
or second you add .debug to dbg - packages like this:
FILES_${PN}-dbg += "/etc/interfaces/bin/.debug"
You can remove your do_install_append
because the .debug
is created after do_install
.
If you use the second option you have to need to configure your gdb with set debug-file-directory directories
option in gdb to debug you binary. Read more here
The .debug directory is automatically generated as part of the split_and_strip_files
function in meta/classes/package.bbclass
.
This function takes the files resulting from do_install
and splits them up into multiple packages: ${PN}
containing the base files and stripped binaries, ${PN}-dbg
with debug symbols, etc.
You can suppress split_and_strip_files
by adding the following to your .bb
file:
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
INHIBIT_PACKAGE_STRIP = "1"
I think you also want to simplify the list of packages generated from your .bb
to:
PACKAGES = "${PN}"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With