Building balenaOs Image for raspberry pi failed

Hi,

i’m trying to build an vanilla balena image for raspberry pi and it fails on the last recepies after building for several hours.

I used this git repo: https://github.com/balena-os/balena-raspberrypi

Am i using an old or deprecated one? Is there some working version around?

Have a look:

./balena-yocto-scripts/build/barys -m raspberrypi2                  
audited 3 packages in 0.578s
found 0 vulnerabilities

...Done

  _____           _        _____   ____  
 |  __ \         (_)      /  _  \ / ___| 
 | |__) |___  ___ _ _ __  | | | || (___  
 |  _  // _ \/ __| | '_ \ | | | | \___ \ 
 | | \ \  __/\__ \ | | | || |_| |  ___) |
 |_|  \_\___||___/_|_| |_|\_____/ |____/ 
                                             
 ---------------------------------------- 

Resin specific images available:
	resin-image

Balena Fin (CM3)                         : $ MACHINE=fincm3 bitbake resin-image
Raspberry Pi 2                           : $ MACHINE=raspberrypi2 bitbake resin-image
Raspberry Pi 3 64bits (EXPERIMENTAL)     : $ MACHINE=raspberrypi3-64 bitbake resin-image
Raspberry Pi 3                           : $ MACHINE=raspberrypi3 bitbake resin-image
Raspberry Pi (v1 and Zero)               : $ MACHINE=raspberrypi bitbake resin-image
Revolution Pi Core 3                     : $ MACHINE=revpi-core-3 bitbake resin-image

[000000002][LOG]Resin build initialized in build.
[000000002][LOG]Run build for raspberrypi2: MACHINE=raspberrypi2 bitbake resin-image 
[000000002][LOG]This might take a while ...
WARNING: Host distribution "ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |##########################################################################################################################| Time: 0:00:00
Loaded 3049 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.38.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-poky-linux-gnueabi"
MACHINE              = "raspberrypi2"
DISTRO               = "balena-os"
DISTRO_VERSION       = "2.29.2"
TUNE_FEATURES        = "arm armv7ve vfp thumb neon vfpv4 callconvention-hard cortexa7"
TARGET_FPU           = "hard"
meta                 
meta-poky            = "HEAD:24a833f40d837407baa4e8192f372d998a776b6c"
meta-oe              
meta-filesystems     
meta-networking      
meta-python          = "HEAD:be79b8b111a968efdbe5e1482d0c246d0b24763e"
meta-raspberrypi     = "HEAD:2d40b000021bc8a9ef7f329ed0ad410f8d227b97"
meta-resin-common    
meta-resin-sumo      = "HEAD:22fffcdf60edd47738fc7733c1eaaadfc156a8f2"
meta-resin-raspberrypi = "master:00c9d97700053936636815e9d0a50229afdbfa86"
meta-rust            = "HEAD:3efa0f069ffe4dfcb3531ea89834e69cd2257157"

Initialising tasks: 100% |#####################################################################################################################| Time: 0:00:01
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: healthdog-0.1.0.AUTOINC+a10155844f-r0 do_fetch: Failed to fetch URL git://git@github.com/resin-os/healthdog-rs.git;protocol=ssh, attempting MIRRORS if available
WARNING: bindmount-0.0.1.AUTOINC+f597fb0266-r0 do_fetch: Failed to fetch URL git://git@github.com/resin-os/resinos-bindmount.git;protocol=ssh, attempting MIRRORS if available
WARNING: os-config-1.0.0.AUTOINC+f85c40f866-r0 do_fetch: Failed to fetch URL git://git@github.com/balena-os/os-config.git;protocol=ssh, attempting MIRRORS if available
WARNING: lsof-4.89-r0 do_fetch: Failed to fetch URL http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_4.89.tar.bz2, attempting MIRRORS if available
WARNING: linux-raspberrypi-1_4.14.98+gitAUTOINC+5d63a4595d-r0 do_kernel_resin_checkconfig: Checking for CONFIG_IP_NF_TARGET_LOG=m in the kernel configs failed for misc.
ERROR: cargo-native-0.25.0-r0 do_compile: Function failed: do_compile (log file is located at /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/temp/log.do_compile.2703)
ERROR: Logfile of failure stored in: /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/temp/log.do_compile.2703
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: cargo = /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/cargo-0.25.0-x86_64-unknown-linux-gnu/cargo/bin/cargo
| NOTE: rustc =
| NOTE: /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/cargo-0.25.0-x86_64-unknown-linux-gnu/cargo/bin/cargo build -v --target x86_64-linux --release
| error: no matching package named `atty` found (required by `cargo`)
| location searched: registry `https://github.com/rust-lang/crates.io-index`
| version required: = 0.2.11
| WARNING: /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/temp/run.do_compile.2703:1 exit 101 from '"/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/cargo-0.25.0-x86_64-unknown-linux-gnu/cargo/bin/cargo" build -v --target x86_64-linux --release "$@"'
| ERROR: Function failed: do_compile (log file is located at /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/temp/log.do_compile.2703)
ERROR: Task (virtual:native:/opt/projects/balena-raspberrypi/build/../layers/meta-rust/recipes-devtools/cargo/cargo_0.25.0.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3731 tasks of which 751 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  virtual:native:/opt/projects/balena-raspberrypi/build/../layers/meta-rust/recipes-devtools/cargo/cargo_0.25.0.bb:do_compile
Summary: There were 6 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
[000007308][LOG]Build for raspberrypi2 failed. Check failed log in build/tmp/log/cooker/raspberrypi2 .
[000007308][LOG]If build for raspberrypi2 succeeded, final image should have been generated here:
[000007308][LOG]   build/tmp/deploy/images/raspberrypi2/resin-image-raspberrypi2.resinos-img
[000007308][LOG]Done.
Time: 2h:01m:48s

Here is some further information on the failing recepie cargo-native:

DEBUG: Executing shell function do_compile
+ cd /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/git
+ do_compile
+ cargo_do_compile

+ cd /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/git
+ do_compile
+ cargo_do_compile
+ oe_cargo_fix_env
+ export CC=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/target-rust-cc
+ CC=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/target-rust-cc
+ export CXX=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/target-rust-cxx
+ CXX=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/target-rust-cxx
+ export 'CFLAGS=-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ CFLAGS='-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ export 'CXXFLAGS=-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ CXXFLAGS='-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ export AR=ar
+ AR=ar
+ export TARGET_CC=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/target-rust-cc
+ TARGET_CC=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/target-rust-cc
+ export TARGET_CXX=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/target-rust-cxx
+ TARGET_CXX=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/target-rust-cxx
+ export 'TARGET_CFLAGS=-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ TARGET_CFLAGS='-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ export 'TARGET_CFLAGS=-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ TARGET_CFLAGS='-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ export TARGET_AR=ar
+ TARGET_AR=ar
+ export HOST_CC=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/build-rust-cc
+ HOST_CC=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/build-rust-cc
+ export HOST_CXX=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/build-rust-cxx
+ HOST_CXX=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/build-rust-cxx
+ export 'HOST_CFLAGS=-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ HOST_CFLAGS='-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ export 'HOST_CXXFLAGS=-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ HOST_CXXFLAGS='-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ export HOST_AR=ar
+ HOST_AR=ar
+ oe_cargo_build
+ export 'RUSTFLAGS= -L /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/lib/rust -Zremap-path-prefix-from=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0 -Zremap-path-prefix-to=/usr/src/debug/cargo-native/0.25.0-r0'
+ RUSTFLAGS=' -L /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/lib/rust -Zremap-path-prefix-from=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0 -Zremap-path-prefix-to=/usr/src/debug/cargo-native/0.25.0-r0'
+ export RUST_TARGET_PATH=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/lib/rustlib
+ RUST_TARGET_PATH=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/lib/rustlib

+ oe_cargo_fix_env
+ export CC=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/target-rust-cc
+ CC=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/target-rust-cc
+ export CXX=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/target-rust-cxx
+ CXX=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/target-rust-cxx
+ export 'CFLAGS=-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ CFLAGS='-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ export 'CXXFLAGS=-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ CXXFLAGS='-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ export AR=ar
+ AR=ar
+ export TARGET_CC=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/target-rust-cc
+ TARGET_CC=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/target-rust-cc
+ export TARGET_CXX=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/target-rust-cxx
+ TARGET_CXX=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/target-rust-cxx
+ export 'TARGET_CFLAGS=-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ TARGET_CFLAGS='-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ export 'TARGET_CFLAGS=-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ TARGET_CFLAGS='-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ export TARGET_AR=ar
+ TARGET_AR=ar
+ export HOST_CC=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/build-rust-cc
+ HOST_CC=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/build-rust-cc
+ export HOST_CXX=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/build-rust-cxx
+ HOST_CXX=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/wrapper/build-rust-cxx
+ export 'HOST_CFLAGS=-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ HOST_CFLAGS='-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ export 'HOST_CXXFLAGS=-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ HOST_CXXFLAGS='-isystem/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/include -O2 -pipe'
+ export HOST_AR=ar
+ HOST_AR=ar
+ oe_cargo_build
+ export 'RUSTFLAGS= -L /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/lib/rust -Zremap-path-prefix-from=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0 -Zremap-path-prefix-to=/usr/src/debug/cargo-native/0.25.0-r0'
+ RUSTFLAGS=' -L /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/lib/rust -Zremap-path-prefix-from=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0 -Zremap-path-prefix-to=/usr/src/debug/cargo-native/0.25.0-r0'
+ export RUST_TARGET_PATH=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/lib/rustlib
+ RUST_TARGET_PATH=/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/recipe-sysroot-native/usr/lib/rustlib
++ which /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/cargo-0.25.0-x86_64-unknown-linux-gnu/cargo/bin/cargo

++ which /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/cargo-0.25.0-x86_64-unknown-linux-gnu/cargo/bin/cargo
+ bbnote 'cargo = /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/cargo-0.25.0-x86_64-unknown-linux-gnu/cargo/bin/cargo'
+ '[' -p /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/temp/fifo.924 ']'

+ bbnote 'cargo = /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/cargo-0.25.0-x86_64-unknown-linux-gnu/cargo/bin/cargo'
+ '[' -p /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/temp/fifo.924 ']'
NOTE: cargo = /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/cargo-0.25.0-x86_64-unknown-linux-gnu/cargo/bin/cargo
+ printf '%b\0' 'bbnote cargo = /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/cargo-0.25.0-x86_64-unknown-linux-gnu/cargo/bin/cargo'

+ printf '%b\0' 'bbnote cargo = /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/cargo-0.25.0-x86_64-unknown-linux-gnu/cargo/bin/cargo'
++ which

++ which
+ bbnote 'rustc = '

+ bbnote 'rustc = '
NOTE: rustc = 
+ '[' -p /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/temp/fifo.924 ']'
+ printf '%b\0' 'bbnote rustc = '
+ bbnote '/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/cargo-0.25.0-x86_64-unknown-linux-gnu/cargo/bin/cargo build -v --target x86_64-linux --release '
+ '[' -p /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/temp/fifo.924 ']'
+ printf '%b\0' 'bbnote /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/cargo-0.25.0-x86_64-unknown-linux-gnu/cargo/bin/cargo build -v --target x86_64-linux --release '
+ /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/cargo-0.25.0-x86_64-unknown-linux-gnu/cargo/bin/cargo build -v --target x86_64-linux --release

+ '[' -p /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/temp/fifo.924 ']'
+ printf '%b\0' 'bbnote rustc = '
+ bbnote '/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/cargo-0.25.0-x86_64-unknown-linux-gnu/cargo/bin/cargo build -v --target x86_64-linux --release '
+ '[' -p /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/temp/fifo.924 ']'
+ printf '%b\0' 'bbnote /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/cargo-0.25.0-x86_64-unknown-linux-gnu/cargo/bin/cargo build -v --target x86_64-linux --release '
+ /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/cargo-0.25.0-x86_64-unknown-linux-gnu/cargo/bin/cargo build -v --target x86_64-linux --release
NOTE: /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/cargo-0.25.0-x86_64-unknown-linux-gnu/cargo/bin/cargo build -v --target x86_64-linux --release 
error: no matching package named `atty` found (required by `cargo`)
location searched: registry `https://github.com/rust-lang/crates.io-index`
version required: = 0.2.11

error: no matching package named `atty` found (required by `cargo`)
location searched: registry `https://github.com/rust-lang/crates.io-index`
version required: = 0.2.11
+ bb_exit_handler

+ bb_exit_handler
+ ret=101
+ case $ret in
+ case $BASH_VERSION in
+ echo 'WARNING: /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/temp/run.do_compile.924:1 exit 101 from '\''"/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/cargo-0.25.0-x86_64-unknown-linux-gnu/cargo/bin/cargo" build -v --target x86_64-linux --release "$@"'\'''
WARNING: /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/temp/run.do_compile.924:1 exit 101 from '"/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/cargo-0.25.0-x86_64-unknown-linux-gnu/cargo/bin/cargo" build -v --target x86_64-linux --release "$@"'
+ exit 101

+ ret=101
+ case $ret in
+ case $BASH_VERSION in
+ echo 'WARNING: /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/temp/run.do_compile.924:1 exit 101 from '\''"/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/cargo-0.25.0-x86_64-unknown-linux-gnu/cargo/bin/cargo" build -v --target x86_64-linux --release "$@"'\'''
WARNING: /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/temp/run.do_compile.924:1 exit 101 from '"/opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/cargo-0.25.0-x86_64-unknown-linux-gnu/cargo/bin/cargo" build -v --target x86_64-linux --release "$@"'
+ exit 101
ERROR: Function failed: do_compile (log file is located at /opt/projects/balena-raspberrypi/build/tmp/work/x86_64-linux/cargo-native/0.25.0-r0/temp/log.do_compile.924)

Hi @arschlegel,

Building on Ubuntu-18.04 doesn’t work for various reasons.

Ubuntu 16.04.2 LTS is known to work.

Regards!

Hi @arschlegel,
Building on Ubuntu-18.04 doesn’t work for various reasons.
Ubuntu 16.04.2 LTS is known to work.
Regards!

Hi @spanceac
Can you elaborate those “various reasons”?

Thanks for your response. I currently was building the repo with 16.04.06 with success.
Please feel free to have a look at some links i provide that all correlate:



Hi @arschlegel,

When I say various reasons that prevent building on Ubuntu 18.04 I’m referring to failure to build various host tools because of library and toolchain updates.

I tried building on 18.04, I failed, I fixed some errors, then I failed again and I got bored of failing.

It would be nice if someone would take the time to fix but no one is doing it. Usually people want to see the images built and not waste time on tooling.

@spanceac usually people don’t run a raspberry pi on real life projects but get the Yocto BSP and have to build their own. In this case - like us - we have to find a way to build the image properly.

If i knew the build WILL fail on 18.04 a little reference or hint in any balena documentation would be very helpful.
Until now i “wasted” four full workdays on the problem just to find out that with 16.04 the builds are working just fine. However i want to know why it fails to build on my 18.04 - see github links above. I have a workaround but that modifies the meta-rust layer - and that is not a nice solution.

I will also open an issue in the forum to ask for assistance to make the balena image build working in a docker environment. I do have tried that and found a very hackity hack for this but that is also not the way to go for productive environments.

Hey @arschlegel,

You’re right that documenting that the build works on Ubuntu 16.04 and it doesn’t on Ubuntu 18.04 is useful.

When the yocto build starts, it warns you about potential issues:
WARNING: Host distribution "ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.

The docker container build solution is also a good one. On an Ubuntu 18.04 system I use a docker container to kickstart the builds and then I can build from cache without issues.

This is the container that I use: Docker

To enter the container from Ubuntu 18.04:

docker run -v /home/spanceac/work/:/yocto/work  \
	-v $SSH_AUTH_SOCK:/tmp/ssh-agent \
	-e SSH_AUTH_SOCK=/tmp/ssh-agent \
	-e BUILDER_UID=$(id -u) \
	-e BUILDER_GID=$(id -g) \
	--privileged \
-it resin/yocto-build-env /bin/bash

Inside the container I run:

head -77 /prepare-and-start.sh > /my_prepare.sh
chmod +x /my_prepare.sh
bash /my_prepare.sh
cd /yocto/work/balena-intel
sudo -H -u builder balena-yocto-scripts/build/barys -b build-example -d -m genericx86-64 --shared-sstate /yocto/work/sstate-cache/ --shared-downloads /yocto/work/downloads/

Then I can build outside the containers, because now I have caches for the host tools.

@spanceac can you link me to a repo or the dockerfile of the https://hub.docker.com/r/resin/yocto-build-env/ image?

Hey @arschlegel, the source is this one:

Thanks @imrehg @spanceac
I guess i have a good starting point now to work with.