Re: [poky] Error while bitbaking core-image-minimal using Poky 5.0.9 (Scarthgap) on VMware
Quentin Schulz <[email protected]> Thu, 15 May 2025 14:39:47 +0200
| Newsgroups | org.yoctoproject.lists.poky |
|---|---|
| Message-ID | <[email protected]> |
Hi, On 5/15/25 1:02 PM, srivamsi_malladi via lists.yoctoproject.org wrote: > You don't often get email from [email protected]. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification> > Hello all, > > TL;DR: I ran into a couple of errors and fixed them with the help of Gemini. I would like to know if there are any better solutions to solve these errors. > > I am absolutely new to the Yocto project and Poky, so I thought I will so a 'hello world' kind of thing with Poky. For that, I setup a VMware with Ubuntu 22.04 LTS and with 27.7GB RAM and 16 cores hardware config. My host computer is a i9-13th gen with 32GB RAM running Windows. I chose the really high (max actually) RAM and cores thinking I would have a really fast VM, but due to the problems I ran into, I realized more RAM, mores cores != more performance. So, following is the problem I ran into. > > When I bitbake core-image-minimal in terminal, I got an error saying do_compile failed on gcc 13.0.1 and when I looked at the log, it said error x86_64-poky-linux-g++: fatal error: Killed signal terminated program cc1plus. > After spending some time on Google and some forums, I found that my VM might be fighting with my host PC for resources and in this process, the tasks that bitbake wants to run (compiling gcc in this case) are not able to get enough PC resources due to which cc1plus got terminated which is needed in the process. > I tried reducing the RAM to 16GB and cores to 8 and then to 4, the error still remained. After reducing the RAM to 8GB and cores to 2, gcc could finally compile, but I ran into another error. > > > When I run bitbake core-image-minimal, I get an error and following are the contents of the corresponding log file > > DEBUG: Executing python function extend_recipe_sysroot > > NOTE: Direct dependencies are ['/home/ubuntu2204/work/poky/meta/recipes-devtools/quilt/quilt-native_0.67.bb:do_populate_sysroot'] This highlights that quilt-native is already a dependency. > > NOTE: Installed into sysroot: [] > > NOTE: Skipping as already exists in sysroot: ['quilt-native'] This highlights that quilt-native is already available in the native sysroot of your recipe I believe. > > DEBUG: Python function extend_recipe_sysroot finished > > DEBUG: Executing python function do_patch > > DEBUG: Executing python function patch_do_patch > > DEBUG: Searching for 0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch in paths: > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/createrepo-c-1.0.4/poky > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/createrepo-c/poky > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/files/poky > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/createrepo-c-1.0.4/ > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/createrepo-c/ > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/files/ > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/createrepo-c-1.0.4/x86-64 > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/createrepo-c/x86-64 > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/files/x86-64 > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/createrepo-c-1.0.4/ > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/createrepo-c/ > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/files/ > > DEBUG: Using /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch for 0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch > > DEBUG: Searching for 0001-include-rpm-rpmstring.h.patch in paths: > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/createrepo-c-1.0.4/poky > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/createrepo-c/poky > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/files/poky > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/createrepo-c-1.0.4/ > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/createrepo-c/ > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/files/ > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/createrepo-c-1.0.4/x86-64 > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/createrepo-c/x86-64 > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/files/x86-64 > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/createrepo-c-1.0.4/ > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/createrepo-c/ > > /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/files/ > > DEBUG: Using /home/ubuntu2204/work/poky/meta/recipes-devtools/createrepo-c/createrepo-c/0001-include-rpm-rpmstring.h.patch for 0001-include-rpm-rpmstring.h.patch > > NOTE: Applying patch '0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch' (../meta/recipes-devtools/createrepo-c/createrepo-c/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch) > > ERROR: Applying patch '0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch' on target directory '/home/ubuntu2204/work/poky/build/tmp/work/x86_64-linux/createrepo-c-native/1.0.4/git' > > CmdError('quilt --quiltrc /home/ubuntu2204/work/poky/build/tmp/work/x86_64-linux/createrepo-c-native/1.0.4/recipe-sysroot-native/etc/quiltrc push', 0, 'stdout: > > stderr: /bin/sh: 1: quilt: not found > > ') > > DEBUG: Python function patch_do_patch finished > > DEBUG: Python function do_patch finished > > I asked Gemini about the error and it suggested installing quilt. But it was already installed. > Then I gave it the whole log file and then it explained that quilt-native is available in sysroot but not in PATH and so asked me to create a new layer with do_patch:prepend()where I should add the bindir (which should be /usr/bin in the sysroot) to PATH. > This fixed the error. > Any chance this happened with the sstate-cache/build directory of your OOM'ed bitbake run? Maybe it's in an inconsistent state? I would remove your own new layer and do bitbake -c cleansstate createrepo-c followed by bitbake createrepo-c and see if you can reproduce. > Now my questions are > 1. Regarding the first error, I had to decrease the RAM to 8GB and cores to 2 which cured the error but increased the build time. Is there a better way to handle this without compromising on the build time? You can limit the number of cores to use for one recipe (or even a task), see PARALLEL_MAKE for example. If I remember correctly, we used to recommend to have at least twice the amount of CPUs in free RAM. We also know that above a certain number of CPUs, it doesn't scale anymore. But 16 cores should be under that limit if I remember correctly. You may want to have a look into the pressure variables (BB_PRESSURE_* in https://docs.yoctoproject.org/bitbake/bitbake-user-manual/bitbake-user-manual-ref-variables.html) that should allow to limit parallel tasks when the CPU/IO/DRAM is already under heavy load. > 2. Regarding the second error, did this occur because of some problems in my system? Or is this a known error with Poky Scarthgap? > I would say the former. Cheers, Quentin