radxa / debos-radxa

This repo is deprecated, please use https://github.com/radxa-repo/rbuild instead
https://github.com/radxa-repo/rbuild
131 stars 47 forks source link

Build Fails in arm64 VM (Mac M1 Processor) #46

Open stvhay opened 2 years ago

stvhay commented 2 years ago

The dev-shell command fails when running in an ARM64 VM--I think due to missing user-mode-linux packages in the Debian repository.

Step 5/11 : RUN apt-get update -y && apt-get -y --allow-unauthenticated install debos     xz-utils dosfstools libterm-readkey-perl user-mode-linux libslirp-helper     && apt install -y -f
 ---> Running in 06a6a862b5d5
Get:1 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye InRelease [116 kB]
Get:2 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-updates InRelease [44.1 kB]
Get:3 http://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security InRelease [48.4 kB]
Get:4 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye/contrib arm64 Packages [41.0 kB]
Get:5 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye/main arm64 Packages [8071 kB]
Get:6 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye/non-free arm64 Packages [72.9 kB]
Get:7 http://mirrors.tuna.tsinghua.edu.cn/debian bullseye-updates/main arm64 Packages [12.0 kB]
Get:8 http://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security/main arm64 Packages [202 kB]
Fetched 8607 kB in 12s (734 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Package user-mode-linux is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Unable to locate package debos
E: Package 'user-mode-linux' has no installation candidate
The command '/bin/sh -c apt-get update -y && apt-get -y --allow-unauthenticated install debos     xz-utils dosfstools libterm-readkey-perl user-mode-linux libslirp-helper     && apt install -y -f' returned a non-zero code: 100
Enter Docker container...
Unable to find image 'debos-radxa:1' locally
docker: Error response from daemon: pull access denied for debos-radxa, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.

Further information:

RadxaStephen commented 2 years ago

Remove that package and test again?

diff --git a/docker/Dockerfile b/docker/Dockerfile
index 6e54086..a15f7e4 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -5,7 +5,7 @@ RUN echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main
 RUN echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian-security/ bullseye-security main non-free contrib" >> /etc/apt/sources.list

 RUN apt-get update -y && apt-get -y --allow-unauthenticated install debos \
-    xz-utils dosfstools libterm-readkey-perl user-mode-linux libslirp-helper \
+    xz-utils dosfstools libterm-readkey-perl libslirp-helper \
     && apt install -y -f

 RUN apt-get update -y && \
stvhay commented 2 years ago

Wow. It looks like debian does not package debos for arm64.

This would be a problem for upstream Debian.

E: Unable to locate package debos
The command '/bin/sh -c apt-get update -y && apt-get -y --allow-unauthenticated install debos     xz-utils dosfstools libterm-readkey-perl libslirp-helper     && apt install -y -f' returned a non-zero code: 100
Enter Docker container...
Unable to find image 'debos-radxa:1' locally
docker: Error response from daemon: pull access denied for debos-radxa, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
stvhay commented 2 years ago

It is worse than that. debos does not support arm64.

https://github.com/go-debos/debos/issues/363