Libhailort yocto build fails with HAILORT_OFFLINE_BUILD_ENABLE = "1"

i downloaded the latest Hailo meta layers (4.18) for Kirkstone and started to build it.

When building without the build offline flags everything works well and is built. When I add the HAILORT_OFFLINE_BUILD_ENABLE flag the build fails (so i will be able to export the download to my offline machine)

the build fails when trying to clone protobuf . When I try to clone it manually from the same location and the same settings I am able to clone.
also when running the failed command from protobuf-populate.dir/build.make it is successful.

  1. cd build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/git/hailort/external
  2. /workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/usr/bin/cmake -P build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/git/hailort/external/protobuf-subbuild/protobuf-populate-prefix/tmp/protobuf-populate-gitclone.cmake

when continuing the build after manually cloning the protobuf the next external fails with the same error of network clone failure

if someone knows why all the external clones seem to fail as if the network is disabled.
Thanks

Ran

Hey @ran.greenberg

Welcome to the Hailo Community!

When building with HAILORT_OFFLINE_BUILD_ENABLE=1, you’re encountering issues cloning external dependencies. This flag is designed for offline builds, where all required sources should already be locally available. The build process won’t download any dependencies when this flag is active.

To resolve this:

  1. Pre-download all sources: Run a normal build (with network access) first to ensure all dependencies, including protobuf, are downloaded locally.
  2. Verify DL_DIR: Ensure this directory is correctly set up and contains all necessary source tarballs.
  3. Use prepare_hailort_external_dependencies: Run this task to package all required sources into a .tar file in your DL_DIR before attempting an offline build.

These steps should help you successfully perform an offline build by ensuring all required dependencies are available locally before enabling the offline build flag.

Hey Omria
thanks for the response. i am following the example from you documentation “hailo.ai/developer-zone/documentation/hailort-v4-18-0/?sp_referrer=yocto%2Fyocto.html” of installing on an offline machine.

  1. i build without any offline flags
    bitbake libhailort hailortcli libgsthailo hailo-pci hailo-firmware
    (you will see that pyhailort is not included as it fails with “cannot clone” as network problem)

  2. i fetched all
    bitbake --runall=fetch libhailort --runall=fetch hailortcli --runall=fetch libgsthailo --runall=fetch hailo-pci --runall=fetch hailo-firmware

  3. i ran the prepare task
    bitbake -c prepare_hailort_external_dependencies libhailort -c prepare_hailort_external_dependencies hailortcli

  4. i copied the content from the DL_DIR to my offline machine

  5. i added the offline flags (2 flags)

  6. i build with the same command as above

  7. fails with failing to clone the protobuf as explained in the first mail.

i am doing exactly as is written in your example it doesn’t work if you could tell me what change in our instructions that it will work (add please add the changes to your documentation)
also if you check why the pyhailort fails in the fetch (on a machine with internet)
thanks
Ran

i am adding the log for libhailort/4.18.0-r0/temp/log.do_prepare_hailort_external_dependencies (i change the http to h_t_tp as i cannot send a link in this page)

DEBUG: Executing python function do_prepare_hailort_external_dependencies
DEBUG: Running ‘export PSEUDO_DISABLED=1; export PATH=“/workdir/new-docker-yocto-build/build_clean/tmp/sysroots-uninative/x86_64-linux/usr/bin:/workdir/new-docker-yocto-build/sources/poky/scripts:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/usr/bin/aarch64-fslc-linux:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot/usr/bin/crossscripts:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/usr/sbin:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/usr/bin:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/sbin:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/bin:/workdir/new-docker-yocto-build/sources/poky/bitbake/bin:/workdir/new-docker-yocto-build/build_clean/tmp/hosttools”; export HOME=“/home/vari”; git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat branch --contains 01e4c7f5a7463cc61ef1b2d22c31dd80a3a07d95 --list master 2> /dev/null | wc -l’ in /workdir/new-docker-yocto-build/cache/downloads//git2/github.com.hailo-ai.hailort.git
DEBUG: Running export PSEUDO_DISABLED=1; export PATH=“/workdir/new-docker-yocto-build/build_clean/tmp/sysroots-uninative/x86_64-linux/usr/bin:/workdir/new-docker-yocto-build/sources/poky/scripts:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/usr/bin/aarch64-fslc-linux:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot/usr/bin/crossscripts:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/usr/sbin:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/usr/bin:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/sbin:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/bin:/workdir/new-docker-yocto-build/sources/poky/bitbake/bin:/workdir/new-docker-yocto-build/build_clean/tmp/hosttools”; export HOME=“/home/vari”; git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat clone -n -s /workdir/new-docker-yocto-build/cache/downloads//git2/github.com.hailo-ai.hailort.git/ /workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/temp_prepare_externals/git/
DEBUG: Running ‘export PSEUDO_DISABLED=1; export PATH=“/workdir/new-docker-yocto-build/build_clean/tmp/sysroots-uninative/x86_64-linux/usr/bin:/workdir/new-docker-yocto-build/sources/poky/scripts:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/usr/bin/aarch64-fslc-linux:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot/usr/bin/crossscripts:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/usr/sbin:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/usr/bin:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/sbin:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/bin:/workdir/new-docker-yocto-build/sources/poky/bitbake/bin:/workdir/new-docker-yocto-build/build_clean/tmp/hosttools”; export HOME=“/home/vari”; git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat remote set-url origin h_t_tps://git@github.com/hailo-ai/hailort.git’ in /workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/temp_prepare_externals/git/
DEBUG: Running ‘export PSEUDO_DISABLED=1; export PATH=“/workdir/new-docker-yocto-build/build_clean/tmp/sysroots-uninative/x86_64-linux/usr/bin:/workdir/new-docker-yocto-build/sources/poky/scripts:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/usr/bin/aarch64-fslc-linux:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot/usr/bin/crossscripts:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/usr/sbin:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/usr/bin:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/sbin:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/bin:/workdir/new-docker-yocto-build/sources/poky/bitbake/bin:/workdir/new-docker-yocto-build/build_clean/tmp/hosttools”; export HOME=“/home/vari”; git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat grep lfs origin/master:.gitattributes | wc -l’ in /workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/temp_prepare_externals/git/
DEBUG: Running ‘export PSEUDO_DISABLED=1; export PATH=“/workdir/new-docker-yocto-build/build_clean/tmp/sysroots-uninative/x86_64-linux/usr/bin:/workdir/new-docker-yocto-build/sources/poky/scripts:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/usr/bin/aarch64-fslc-linux:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot/usr/bin/crossscripts:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/usr/sbin:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/usr/bin:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/sbin:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/bin:/workdir/new-docker-yocto-build/sources/poky/bitbake/bin:/workdir/new-docker-yocto-build/build_clean/tmp/hosttools”; export HOME=“/home/vari”; git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat checkout -B master 01e4c7f5a7463cc61ef1b2d22c31dd80a3a07d95’ in /workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/temp_prepare_externals/git/
DEBUG: Running ‘export PSEUDO_DISABLED=1; export PATH=“/workdir/new-docker-yocto-build/build_clean/tmp/sysroots-uninative/x86_64-linux/usr/bin:/workdir/new-docker-yocto-build/sources/poky/scripts:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/usr/bin/aarch64-fslc-linux:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot/usr/bin/crossscripts:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/usr/sbin:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/usr/bin:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/sbin:/workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/recipe-sysroot-native/bin:/workdir/new-docker-yocto-build/sources/poky/bitbake/bin:/workdir/new-docker-yocto-build/build_clean/tmp/hosttools”; export HOME=“/home/vari”; git -c core.fsyncobjectfiles=0 -c gc.autoDetach=false -c core.pager=cat branch master --set-upstream-to origin/master’ in /workdir/new-docker-yocto-build/build_clean/tmp/work/armv8a-fslc-linux/libhailort/4.18.0-r0/temp_prepare_externals/git/
DEBUG: Python function do_prepare_hailort_external_dependencies finished