# Getting compilation error

**URL:** <https://forums.balena.io/t/getting-compilation-error/367744>\
**Category:** balenaOS\
**Tags:** support, raspberrypi3\
**Created:** [April 21, 2023, 4:31am UTC](https://forums.balena.io/t/getting-compilation-error/367744 "2023-04-21T04:31:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![varma](https://avatars.discourse-cdn.com/v4/letter/v/ea5d25/32.png) [@varma](https://forums.balena.io/u/varma)\
**Post date:** [April 21, 2023, 4:31am UTC](https://forums.balena.io/t/getting-compilation-error/367744/1 "2023-04-21T04:31:48Z")

</div>

DEBUG: Executing shell function do\_compile  
#1 [internal] load .dockerignore  
#1 transferring context: 2B done  
#1 DONE 0.0s

#2 [internal] load build definition from Dockerfile  
#2 transferring dockerfile: 219B done  
#2 DONE 0.0s

## #3 [internal] load metadata for [Docker Hub Container Image Library | App Containerization](http://docker.io/library/debian:stretch) #3 ERROR: failed to authorize: failed to fetch anonymous token: Get “[https://auth.docker.io/token?scope=repository%3Alibrary%2Fdebian%3Apull&service=registry.docker.io](https://auth.docker.io/token?scope=repository%3Alibrary%2Fdebian%3Apull&service=registry.docker.io)”: dial tcp: lookup [auth.docker.io](http://auth.docker.io) on 127.0.0.53:53: dial udp 127.0.0.53:53: connect: network is unreachable

> [internal] load metadata for [Docker Hub Container Image Library | App Containerization](http://docker.io/library/debian:stretch:)

* * *

## Dockerfile:1

## 1 | \>\>\> FROM debian:stretch 2 | 3 | VOLUME /mnt/sysroot/inactive

ERROR: failed to solve: failed to fetch anonymous token: Get “[https://auth.docker.io/token?scope=repository%3Alibrary%2Fdebian%3Apull&service=registry.docker.io](https://auth.docker.io/token?scope=repository%3Alibrary%2Fdebian%3Apull&service=registry.docker.io)”: dial tcp: lookup [auth.docker.io](http://auth.docker.io) on 127.0.0.53:53: dial udp 127.0.0.53:53: connect: network is unreachable  
Error response from daemon: invalid reference format  
WARNING: /home/balena-raspberrypi/build/tmp/work/x86\_64-linux/mkfs-hostapp-native/1.0-r0/temp/run.do\_compile.37732:153 exit 1 from ‘DOCKER\_API\_VERSION=1.22 docker save “$IMAGE\_ID” \> /home/balena-raspberrypi/build/tmp/work/x86\_64-linux/mkfs-hostapp-native/1.0-r0/work/mkfs-hostapp-image.tar’  
WARNING: Backtrace (BB generated script):  
#1: do\_compile, /home/balena-raspberrypi/build/tmp/work/x86\_64-linux/mkfs-hostapp-native/1.0-r0/temp/run.do\_compile.37732, line 153  
#2: main, /home/balena-raspberrypi/build/tmp/work/x86\_64-linux/mkfs-hostapp-native/1.0-r0/temp/run.do\_compile.37732, line 160

---

<div class="post-metadata">

**Author:** ![varma](https://avatars.discourse-cdn.com/v4/letter/v/ea5d25/32.png) [@varma](https://forums.balena.io/u/varma)\
**Post date:** [April 24, 2023, 5:07am UTC](https://forums.balena.io/t/getting-compilation-error/367744/2 "2023-04-24T05:07:29Z")

</div>

@alexgg Can you please help us to resolve this error

---

<div class="post-metadata">

**Author:** ![alexgg](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@alexgg](https://forums.balena.io/u/alexgg)\
**Post date:** [May 17, 2023, 11:24am UTC](https://forums.balena.io/t/getting-compilation-error/367744/3 "2023-05-17T11:24:02Z")

</div>

Hi Varma, I provided a follow-up on a different post, the one that contains all the history. Basicallly, make sure the host is able to download docker images, try `docker pull debian:stretch`, and note that building behind a proxy is not supported.

---

<div class="post-metadata">

**Author:** ![varma](https://avatars.discourse-cdn.com/v4/letter/v/ea5d25/32.png) [@varma](https://forums.balena.io/u/varma)\
**Post date:** [May 18, 2023, 2:32pm UTC](https://forums.balena.io/t/getting-compilation-error/367744/5 "2023-05-18T14:32:07Z")

</div>

ERROR: os-helpers-1.0-r0 do\_test\_api: os-helpers: API request failed  
@alexgg

---

<div class="post-metadata">

**Author:** ![remsol](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/remsol/32/2713_2.png) [@remsol](https://forums.balena.io/u/remsol)\
**Post date:** [July 4, 2023, 9:43am UTC](https://forums.balena.io/t/getting-compilation-error/367744/7 "2023-07-04T09:43:22Z")

</div>

I experience the same error. For details see following [[WIP] Orin Nano by acostach · Pull Request #212 · balena-os/balena-jetson-orin (github.com)](https://github.com/balena-os/balena-jetson-orin/pull/212)

I have the exact some problem in [update to kirkstone by dremsol · Pull Request #355 · balena-os/balena-up-board (github.com)](https://github.com/balena-os/balena-up-board/pulls)

---

<div class="post-metadata">

**Author:** ![remsol](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/remsol/32/2713_2.png) [@remsol](https://forums.balena.io/u/remsol)\
**Post date:** [July 4, 2023, 1:46pm UTC](https://forums.balena.io/t/getting-compilation-error/367744/8 "2023-07-04T13:46:50Z")

</div>

Just seen the following [kernel-modules-headers: use kernel-devsrc to provide kernel headers by alexgg · Pull Request #3159 · balena-os/meta-balena (github.com)](https://github.com/balena-os/meta-balena/pull/3159) being merged. Could possibly solve my issues as well according to the [changelog](https://github.com/balena-os/meta-balena/blob/master/CHANGELOG.md#2023-07-04)

---

<div class="post-metadata">

**Author:** ![remsol](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/remsol/32/2713_2.png) [@remsol](https://forums.balena.io/u/remsol)\
**Post date:** [July 4, 2023, 7:05pm UTC](https://forums.balena.io/t/getting-compilation-error/367744/9 "2023-07-04T19:05:08Z")

</div>

running

```auto
❯ ./balena-jetson-orin/balena-yocto-scripts/build/barys \
    --remove-build \
    --development-image \
    --log \
    --shared-downloads /var/cache/yocto/shared-downloads \
    --shared-sstate /var/cache/yocto/sstate-cache \
    -m jetson-orin-nano-devkit-nvme

```

results in  
[log.do\_image\_hostapp\_ext4.2117741.txt](https://forums.balena.io/uploads/short-url/r7qDxuab1yKo9UHau8b5c5FbORu.txt) (13.3 KB)

and running

```auto
./balena-yocto-scripts/build/balena-build.sh -d jetson-orin-nano-devkit-nvme -s /var/cache/yocto/ -k -g "-r --rm-work"

```

results in

```auto
❯ cat balena-jetson-orin/build/tmp/work/x86_64-linux/mkfs-hostapp-native/1.0-r0/temp/log.do_compile
DEBUG: Executing shell function do_compile
Sending build context to Docker daemon 5.12kB
Step 1/5 : FROM debian:bullseye
bullseye: Pulling from library/debian
34df401c391c: Pulling fs layer
34df401c391c: Verifying Checksum
34df401c391c: Download complete
34df401c391c: Pull complete
Digest: sha256:a648e10e02af129706b1fb89e1ac9694ae3db7f2b8439aa906321e68cc281bc0
Status: Downloaded newer image for debian:bullseye
 ---> 189a2f977ff1
Step 2/5 : VOLUME /mnt/sysroot/inactive
 ---> Running in 7bdbf2024bc9
Removing intermediate container 7bdbf2024bc9
 ---> 86acc04b7c88
Step 3/5 : RUN apt-get update && apt-get install -y ca-certificates iptables
 ---> Running in 1c05927ea8e1
cgroups: cgroup mountpoint does not exist: unknown
WARNING: exit code 1 from a shell command.

```

@alexgg this seems to have something to do with my build host (Ubuntu-22.04) and [Docker cgroups](https://docs.docker.com/config/containers/runmetrics/#control-groups) v1 vs. v2, do you have a clue how to solve this?

UPDATE:  
Found the answer in following thread;

> [@Error: runtime "runc" is not supported while cgroups v2 (unified hierachy) is being used](https://forums.balena.io/t/error-runtime-runc-is-not-supported-while-cgroups-v2-unified-hierachy-is-being-used/368164/2):
>
> Hi @aek0, unfortunately balenaOS currently only builds with cgroups v1. If your distribution defaults to using cgroups v2, please boot with the following kernel command line argument: systemd.unified\_cgroup\_hierarchy=0 We are looking into cgroups v2 support but it needs an update of the balenaOS engine that is not trivial.

adding `GRUB_CMDLINE_LINUX="systemd.unified_cgroup_hierarchy=0"` to `/etc/default/grub`, running `sudo update-grub` and rebooting the system works as a temporary solution until cgroupsv2 is supported.
