Bitbake - non debug package contains .debug directory - linux

I need to create a .ipk package from Bitbake script. My bb file:
...
PR = "r0"
PACKAGES = "${PN}"
SRC_URI = " \
file://mypackage \
file://mypackage-startup \
"
do_install() {
install -m 0775 -d ${D}/userdata/costume
install -m 0744 ${WORKDIR}/mypackage ${D}/userdata/costume/mypackage
install -m 0644 ${WORKDIR}/mypackage-startup ${D}/userdata/costume/mypackage-startup
}
FILES_${PN} += "/userdata/costume"
FILES_${PN}-dbg += "/userdata/costume/.debug"
...
But I receive the next error:
ERROR: QA Issue with mypackage: non debug package contains .debug
directory: mypackage path
/work/.../mypackage-1.0-r0/packages-split/mypackage/userdata/costume/.debug/mypackage
FATAL: QA run found fatal errors. Please consider fixing them. ERROR:
Error in executing python function in:
/home/nickname/build/mypackage.bb ERROR:
Exception: Message:1 ERROR: Printing the
environment of the function ERROR: Function do_package_qa failed
ERROR: TaskFailed event exception, aborting ERROR: Build of
/home/nickname/build/mypackage.bb do_package failed
Line with FILES_${PN}-dbg was added after net surfing. But this fix not helped in my situation.

You set PACKAGES = "${PN}" which means the debug package is never created (the default value of PACKAGES does contain ${PN}-dbg).
Either remove the PACKAGES line (if you didn't have a good reason for it) or use
PACKAGES = "${PN}-dbg ${PN}"

Related

Cannot add C file to Yocto Layer using bitbake

I have a C file binary to add as custom layer in the yocto and run in qemu. I have created layer using bitbake-layers create-layer meta-custLayer and added using bitbake-layers add-layer meta-custLayer. The file tree of meta-custLayer is as:
The example_0.1.bb file has the following:
SUMMARY = "bitbake-layers recipe"
DESCRIPTION = "Recipe created by bitbake-layers"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "file://threading.c"
S = "${WORKDIR}"
TARGET_CC_ARCH += "${LDFLAGS}"
do_compile(){
$(CC) threading.c -o threads -lpthreads
}
do_install(){
install -d ${D}${bindir}
install -m 0755 threads
${D}${bindir}s
}
When the command bitbake example is executed, this is the output:
ERROR: example-0.1-r0 do_compile: Execution of '/home/sajil/edm_yocto/sources/poky/build/tmp/work/core2-64-poky-linux/example/0.1-r0/temp/run.do_compile.1806553' failed with exit code 127:
/home/sajil/edm_yocto/sources/poky/build/tmp/work/core2-64-poky-linux/example/0.1-r0/temp/run.do_compile.1806553: 99: CC: not found
/home/sajil/edm_yocto/sources/poky/build/tmp/work/core2-64-poky-linux/example/0.1-r0/temp/run.do_compile.1806553: 99: threading.c: not found
WARNING: exit code 127 from a shell command.
when bitbake core-image-minimal is executed, terminal shows that threads is unbuildable and runs into error:
ERROR: Nothing RPROVIDES 'threads' (but /home/sajil/edm_yocto/sources/poky/meta/recipes-core/images/core-image-minimal.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'threads' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['threads']
ERROR: Required build target 'core-image-minimal' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-minimal', 'threads']
I checked the path of the custom layer directory, being correct. I am clueless about the errors I am confronting.
For now my task is to run the C-file (adding it as a layer) on QEMU. I am unable to build the image for the same.
I would appreciate some help and insights!
There is multiple issues on your recipe:
Your do_compile command does not indicate where to find your .c file
You should use ${CC} instead of $(CC)
lpthread does not end with and s
do_compile() {
${CC} ${S}/threading.c -o ${S}/threads -lpthread
}
Your do_install does not provide the correct path to your binary:
do_install() {
install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/threads ${D}${bindir}
}
At the end you should populate the packages:
FILES_${PN} = "${bindir}"
Edit about threads unbuildable:
threads is unbuildable because the recipe does not mention that the package is threads.
Here you have some options:
Rename your recipe to threads_0.1.bb (I recommend you to use a less generic name)
use the PACKAGES variable in your recipe. You will need to modify the FILES_* variable too. (a bit complicated if you are new to Yocto)
Use the current recipe name, and change the IMAGE_INSTALL += "threads" to IMAGE_INSTALL += "example"

Rust: substrate node template build error

I have been following these instructions:
https://substrate.dev/docs/en/knowledgebase/getting-started/
https://substrate.dev/docs/en/tutorials/create-your-first-substrate-chain/setup
I get the following error after trying to run this code:
cd substrate-node-template
# NOTE: you should always use the `--release` flag
cargo build --release
# ^^ this will take a while!
This is the error, any idea what's happening?:
Downloaded approx v0.3.2
Downloaded parity-db v0.2.3
error: failed to parse manifest at /Users/ilyssaevans/.cargo/registry/src/github.com-1ecc6299db9ec823/parity-db-0.2.3/Cargo.toml
Caused by:
failed to parse the version requirement `0.11 ` for dependency `parking_lot`
Caused by:
expected comma after minor version number, found '\t'
zsh: command not found: #
run
cargo update -p parity-db
If this doesn't help please clear cargo cache and reinstall

trying to use the gstreamer-player rust crate, I get this pkg-config error

This is the full log
error: failed to run custom build command for `glib-sys v0.10.1`
Caused by:
process didn't exit successfully: `C:\Users\Wu\Documents\RustProjects\mechanical\target\debug\build\glib-sys-b6b5049ea9ffd484\build-script-build` (exit code: 1)
--- stdout
cargo:rerun-if-env-changed=GLIB_2.0_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=GLIB_2.0_STATIC
cargo:rerun-if-env-changed=GLIB_2.0_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-msvc
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_msvc
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-msvc
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_msvc
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-msvc
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_msvc
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
--- stderr
Failed to run `"pkg-config" "--libs" "--cflags" "glib-2.0" "glib-2.0 >= 2.42"`: The system cannot find the file specified. (os error 2)
warning: build failed, waiting for other jobs to finish...
error: build failed
I have this error when I try to build my project (it's empty but it's using the gstreamer-player crate
I was told to install pkg-config (I'm on windows) so I used MSYS2 to install it with pacman -S mingw-w64-x86_64-pkg-config
The error persisted so I added the environment variable PKG_CONFIG_PATH = H:\MSYS2\usr\lib\pkgconfig, and I added H:\MSYS2\usr\lib\pkgconfig to the path variable
The error still persists, anyone has any idea of what I could do or what am I doing wrong? Any help appreciated

Disable do_package_qa during bitbake

Is there any way to disable do_package_qa step during bitbake
Actually I have a precompiled binary which I want to copy to my rootfs. I have tried install as well as cp in the do_install section of my recipe.
In both the cases, I am getting QA issue which complains about libQt5Qml.so and libQt5Quick.so not being found in RDEPENDS.
I have tried INSANE_SKIP_${PN} , RDEPENDS_${PN} and DEPENDS to suppress the errors but I am not able to do so.
Is there any way with which I can compile my recipe ?
Recipe
DESCRIPTION = "..."
LICENSE = "CLOSED"
RDEPENDS_${PN} = "qtbase"
SRC_URI = "file://hello.c \
file://basic \
"
S = "${WORKDIR}"
do_compile() {
${CC} hello.c -o hello
}
do_install() {
install -d ${D}/opt/mybin/
install -m 0755 hello ${D}/opt/mybin/
install -m 0755 basic ${D}/opt/mybin/
}
FILES_${PN} = "/opt/mybin/"
INSANE_SKIP_${PN} = "ldflags"
Error
ERROR: my-binary-1.0-r0 do_package_qa: QA Issue: /opt/mybin/basic contained in package my-binary requires libQt5Qml.so.5(Qt_5), but no providers found in RDEPENDS_my-binary? [file-rdeps]
ERROR: my-binary-1.0-r0 do_package_qa: QA Issue: /opt/mybin/basic contained in package my-binary requires libQt5Quick.so.5(Qt_5), but no providers found in RDEPENDS_my-binary? [file-rdeps]
INSANE_SKIP_${PN} = "file-rdeps" might help to fix the error.
Reported issue is something similar to below link
Errors including shared prebuilt libraries in petalinux
Maybe adding
RDEPENDS_${PN} += " libQt5Qml.so.5(Qt_5) libQt5Quick.so.5(Qt_5)"
to your recipe it will solve the QA issue. Lets try.

conflicting requests error while building SDK

I got the following conflicting requests error while building SDK
I am using sumo branch , and generic core-intel-i7-64 machine configuration.
Running the following command: bitbake -c populate_sdk core-image-minimal
Fails at the last step with the following error.
ERROR: core-image-minimal-1.0-r0 do_populate_sdk: Could not invoke dnf. Command '/home/jamal/repotest1/yocto_intel_build/tmp/work/intel_corei7_64-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/bin/dnf -y -c /home/jamal/repotest1/yocto_intel_build/tmp/work/intel_corei7_64-poky-linux/core-image-minimal/1.0-r0/sdk/image/opt/poky/2.5/sysroots/corei7-64-poky-linux/etc/dnf/dnf.conf --setopt=reposdir=/home/jamal/repotest1/yocto_intel_build/tmp/work/intel_corei7_64-poky-linux/core-image-minimal/1.0-r0/sdk/image/opt/poky/2.5/sysroots/corei7-64-poky-linux/etc/yum.repos.d --repofrompath=oe-repo,/home/jamal/repotest1/yocto_intel_build/tmp/work/intel_corei7_64-poky-linux/core-image-minimal/1.0-r0/oe-sdk-repo --installroot=/home/jamal/repotest1/yocto_intel_build/tmp/work/intel_corei7_64-poky-linux/core-image-minimal/1.0-r0/sdk/image/opt/poky/2.5/sysroots/corei7-64-poky-linux --setopt=logdir=/home/jamal/repotest1/yocto_intel_build/tmp/work/intel_corei7_64-poky-linux/core-image-minimal/1.0-r0/temp --nogpgcheck install lib32-dpkg lib32-libstdc++6 lib32-packagegroup-core-standalone-sdk-target lib32-libx11-6 lib32-ncurses lib32-libgcc1 lib32-libgnutls30 lib32-libfreetype6 lib32-libc6 run-postinsts libgnutls30 dpkg kernel-devsrc packagegroup-core-standalone-sdk-target packagegroup-core-boot target-sdk-provides-dummy' returned 1:
Added oe-repo repo from /home/jamal/repotest1/yocto_intel_build/tmp/work/intel_corei7_64-poky-linux/core-image-minimal/1.0-r0/oe-sdk-repo
Last metadata expiration check: 0:00:02 ago on Thu 18 Oct 2018 01:12:30 PM UTC.
Error:
Problem: conflicting requests
- nothing provides /usr/bin/python needed by kernel-devsrc-1.0-r0.intel_corei7_64
ERROR: core-image-minimal-1.0-r0 do_populate_sdk: Function failed: do_populate_sdk
ERROR: Logfile of failure stored in: /home/jamal/repotest1/yocto_intel_build/tmp/work/intel_corei7_64-poky-linux/core-image-minimal/1.0-r0/temp/log.do_populate_sdk.11307
ERROR: Task (/home/jamal/repotest1/sources/poky/meta/recipes-core/images/core-image-minimal.bb:do_populate_sdk) failed with exit code '1'
I found similar error in yocto mailing list, but unable to understand.. Can you please help me to resolve this issue.. Thanks for your time
https://lists.yoctoproject.org/pipermail/yocto/2018-February/039941.html
I have /usr/bin/python in my system
Add RDEPENDS to your kernel-devsrc.bb
RDEPENDS_${PN} = "bc python flex bison ${TCLIBC}-utils"
RDEPENDS_${PN} += "openssl-dev util-linux"
RDEPENDS_${PN} += "${#bb.utils.contains('ARCH', 'x86', 'elfutils', '', d)}"
https://lists.yoctoproject.org/pipermail/yocto/2018-October/042908.html

Resources