1

I am trying to follow the image build instructions as described in Yocto. I did the exact same things, plus I freed up to 150GB of storage space for the image build. However, when I run bitbake imx-image-core I got the error below:

Initialising tasks: 100% |##################################################| Time: 0:00:03
Sstate summary: Wanted 2482 Found 0 Missed 2482 Current 82 (0% match, 3% complete)
NOTE: Executing Tasks
NOTE: Setscene tasks completed
WARNING: bjam-native-1.71.0-r0 do_fetch: Failed to fetch URL https://dl.bintray.com/boostorg/release/1.71.0/source/boost_1_71_0.tar.bz2, attempting MIRRORS if available
WARNING: cwautomacros-native-20110201-r0 do_fetch: Failed to fetch URL https://downloads.sourceforge.net/cwautomacros.berlios/cwautomacros-20110201.tar.bz2, attempting MIRRORS if available
WARNING: socat-1.7.3.3-r0 do_fetch: Failed to fetch URL http://www.dest-unreach.org/socat/download/socat-1.7.3.3.tar.bz2, attempting MIRRORS if available
WARNING: linux-imx-headers-5.4-r0 do_fetch: Failed to fetch URL git://source.codeaurora.org/external/imx/linux-imx.git;protocol=https;branch=imx_5.4.70_2.3.0, attempting MIRRORS if available
WARNING: llvm-project-source-9.0.1-9.0.1-r0 do_fetch: Failed to fetch URL git://github.com/llvm/llvm-project;protocol=https;branch=release/9.x, attempting MIRRORS if available
ERROR: llvm-project-source-9.0.1-9.0.1-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; unset _PYTHON_SYSCONFIGDATA_NAME; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"; export SSH_AGENT_PID="1974"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export PATH="/home/sami/edm_yocto/sources/poky/scripts:/home/sami/edm_yocto/build-xwayland/tmp/work-shared/llvm-project-source-9.0.1-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/home/sami/edm_yocto/build-xwayland/tmp/work-shared/llvm-project-source-9.0.1-r0/recipe-sysroot/usr/bin/crossscripts:/home/sami/edm_yocto/build-xwayland/tmp/work-shared/llvm-project-source-9.0.1-r0/recipe-sysroot-native/usr/sbin:/home/sami/edm_yocto/build-xwayland/tmp/work-shared/llvm-project-source-9.0.1-r0/recipe-sysroot-native/usr/bin:/home/sami/edm_yocto/build-xwayland/tmp/work-shared/llvm-project-source-9.0.1-r0/recipe-sysroot-native/sbin:/home/sami/edm_yocto/build-xwayland/tmp/work-shared/llvm-project-source-9.0.1-r0/recipe-sysroot-native/bin:/home/sami/edm_yocto/sources/poky/bitbake/bin:/home/sami/edm_yocto/build-xwayland/tmp/hosttools"; export HOME="/home/sami"; LANG=C git -c core.fsyncobjectfiles=0 clone --bare --mirror https://github.com/llvm/llvm-project /home/sami/edm_yocto/downloads//git2/github.com.llvm.llvm-project --progress failed with exit code 128, output:
Cloning into bare repository '/home/sami/edm_yocto/downloads//git2/github.com.llvm.llvm-project'...
remote: Enumerating objects: 5546825, done.        
remote: Counting objects: 100% (2383/2383), done.        
remote: Compressing objects: 100% (1430/1430), done.        
error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

ERROR: llvm-project-source-9.0.1-9.0.1-r0 do_fetch: Fetcher failure for URL: 'git://github.com/llvm/llvm-project;protocol=https;branch=release/9.x'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /home/sami/edm_yocto/build-xwayland/tmp/work-shared/llvm-project-source-9.0.1-r0/temp/log.do_fetch.22673
ERROR: Task (/home/sami/edm_yocto/sources/meta-clang/recipes-devtools/clang/llvm-project-source.bb:do_fetch) failed with exit code '1'
ERROR: linux-imx-headers-5.4-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; unset _PYTHON_SYSCONFIGDATA_NAME; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"; export SSH_AGENT_PID="1974"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export PATH="/home/sami/edm_yocto/sources/poky/scripts:/home/sami/edm_yocto/build-xwayland/tmp/work/aarch64-mx8mm-poky-linux/linux-imx-headers/5.4-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/home/sami/edm_yocto/build-xwayland/tmp/work/aarch64-mx8mm-poky-linux/linux-imx-headers/5.4-r0/recipe-sysroot/usr/bin/crossscripts:/home/sami/edm_yocto/build-xwayland/tmp/work/aarch64-mx8mm-poky-linux/linux-imx-headers/5.4-r0/recipe-sysroot-native/usr/sbin:/home/sami/edm_yocto/build-xwayland/tmp/work/aarch64-mx8mm-poky-linux/linux-imx-headers/5.4-r0/recipe-sysroot-native/usr/bin:/home/sami/edm_yocto/build-xwayland/tmp/work/aarch64-mx8mm-poky-linux/linux-imx-headers/5.4-r0/recipe-sysroot-native/sbin:/home/sami/edm_yocto/build-xwayland/tmp/work/aarch64-mx8mm-poky-linux/linux-imx-headers/5.4-r0/recipe-sysroot-native/bin:/home/sami/edm_yocto/sources/poky/bitbake/bin:/home/sami/edm_yocto/build-xwayland/tmp/hosttools"; export HOME="/home/sami"; LANG=C git -c core.fsyncobjectfiles=0 clone --bare --mirror https://source.codeaurora.org/external/imx/linux-imx.git /home/sami/edm_yocto/downloads//git2/source.codeaurora.org.external.imx.linux-imx.git --progress failed with exit code 128, output:
Cloning into bare repository '/home/sami/edm_yocto/downloads//git2/source.codeaurora.org.external.imx.linux-imx.git'...
remote: Enumerating objects: 24, done.        
remote: Counting objects: 100% (24/24), done.        
remote: Compressing objects: 100% (22/22), done.        
error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

ERROR: linux-imx-headers-5.4-r0 do_fetch: Fetcher failure for URL: 'git://source.codeaurora.org/external/imx/linux-imx.git;protocol=https;branch=imx_5.4.70_2.3.0'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /home/sami/edm_yocto/build-xwayland/tmp/work/aarch64-mx8mm-poky-linux/linux-imx-headers/5.4-r0/temp/log.do_fetch.5664
ERROR: Task (/home/sami/edm_yocto/sources/meta-imx/meta-bsp/recipes-kernel/linux/linux-imx-headers_5.4.bb:do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3098 tasks of which 945 didn't need to be rerun and 2 failed.

Summary: 2 tasks failed:
  /home/sami/edm_yocto/sources/meta-clang/recipes-devtools/clang/llvm-project-source.bb:do_fetch
  /home/sami/edm_yocto/sources/meta-imx/meta-bsp/recipes-kernel/linux/linux-imx-headers_5.4.bb:do_fetch
Summary: There were 7 WARNING messages shown.
Summary: There were 4 ERROR messages shown, returning a non-zero exit code.

I see that the error come from cloning this repo : git://source.codeaurora.org/external/imx/linux-imx.git;protocol=https;branch=imx_5.4.70_2.3.0

when i cloned this repo manually I worked fine, but when I run the bitbake it generate the same error again and again. How can I fix this issue? and is this actually from this repo?

Thanks

Sami
  • 341
  • 7
  • 22

1 Answers1

1

The issue in the build comes from fetch (cloning) failure of 2 git-repositories llvm-project and linux-imx-headers. There are multiple solutions proposed in answers before:

  1. Make sure that all the requirements mentioned in Install required host packages section here is installed in your host and that you are running on either Ubuntu18 or Ubuntu20 as mentioned. (If you are running on different versions you can face such unexpected issues).

  2. It could be a problem with missing openssl package (git error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function)

    sudo apt update && sudo apt install openssl curl gnutls-bin

  3. You may need to upgrade the http post buffer, check The remote end hung up unexpectedly while git cloning

  4. It can be just a bad network connection like in repo sync stuck at 99% because of frequent internet disconnections

One last thing, when you try building again try to cleansstate cache first by adding the option -c cleansstate to the bitbake build command to be as follows:

bitbake -c cleansstate imx-image-core

then execute your normal build command again

bitbake imx-image-core
  • Thanks for your answer. I have tried each and every solution as mentioned but I am still getting the same error, this time only with linux-imx-headers_5.4.bb. The error is more specific to linux-imx-headers_5.4.bb file. How to solve that? – Sami Sep 27 '21 at 12:42
  • can you remove the cloned git repository /home/sami/edm_yocto/downloads//git2/source.codeaurora.org.external.imx.linux-imx.git, then do cleansstate as mentioned above and retry to build again? I think since it is solved for the llvm project, it should be solved also for the linux-imx-headers. – Mohammed Osama Sep 27 '21 at 14:22
  • when I tried that and re-ran bitbake, it installed the linux-imx-headers again showing the same type of error. can the bitbake be performed without the limux-imx-headers? – Sami Sep 29 '21 at 04:46
  • in another words, if I installed linux-imx-headers manually. how to tell bitbake that this packages already exist? – Sami Sep 29 '21 at 12:38
  • @SamiArja According to the [fetch script](http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/bitbake/lib/bb/fetch2/git.py?id=d88d62c20d7d8da85f02edb170dae0280624ad7e#n345) in yocto line 345, you can skip cloning if the git repo already exists in the same path. So you need to execute the following command: `git -c core.fsyncobjectfiles=0 clone --bare --mirror https://source.codeaurora.org/external/imx/linux-imx.git /home/sami/edm_yocto/downloads//git2/source.codeaurora.org.external.imx.linux-imx.git --progress` – Mohammed Osama Sep 29 '21 at 14:27
  • This will create the directory "source.codeaurora.org.external.imx.linux-imx.git" under edm_yocto/downloads/git2/ which will make the fetch script skip cloning since directory already exists. – Mohammed Osama Sep 29 '21 at 14:30