So this is the second time this has happened this week, I can’t give another 12 hours to debugging the build system.
Leaving off yesterday, I pushed a working config.yaml and source to my private repo. Both release and debug SDK and app containers were tested working on my Apalis Imx6 module, connected via ethernet on a ixora 1.2 board.
Booting up today, I can no longer re-build and release or debug container. If I just boot up my dev machine, how is the “Image is not up to date”?
This happened earlier this week and I chocked it up to it being my first time setting up a VSCode Torizon C++ project and I spent a looonnggg time trying to understand what went wrong. I was very careful this time and verified that the container build worked BEFORE and AFTER my last commit yesterday. The only I fixed it was to completely scrub all the images and containers from my host machine and re-import the source from scratch. This is obviously not a sustainable solution.
The output from the build process:
[07-02 20:37:31.426] Preparing debug environment for C/C++ application...
[07-02 20:37:31.435] Running preLaunchTask build_debug...
[07-02 20:37:53.117] preLaunchTask completed.
[07-02 20:37:53.117] Deploying application to local folder...
[07-02 20:37:54.515] Selecting device...
[07-02 20:37:54.526] Device 10645191 selected.
[07-02 20:37:54.526] Updating app configuration...
[07-02 20:37:54.545] Image is not up to date, building it (this may take some time)...
[07-02 20:38:07.883] Step 1/9 : FROM --platform=linux/arm torizon/qt5-wayland:2
[07-02 20:38:08.841] ---> 9d1578a6f370
[07-02 20:38:08.845] Step 2/9 : EXPOSE 6502
[07-02 20:38:08.846] ---> Using cache
[07-02 20:38:08.846] ---> 27fb052b5e95
[07-02 20:38:08.846] Step 3/9 : ARG SSHUSERNAME=torizon
[07-02 20:38:08.846] ---> Using cache
[07-02 20:38:08.847] ---> 9aa72d822fdd
[07-02 20:38:08.847] Step 4/9 : ENV DEBIAN_FRONTEND="noninteractive"
[07-02 20:38:08.847] ---> Using cache
[07-02 20:38:08.847] ---> 204f9992118b
[07-02 20:38:08.847] Step 5/9 : RUN apt-get -q -y update && apt-get -q -y install gdbserver procps qml-module-qtquick2 qml-module-qtquick-extras qml-module-qtquick-window2 qml-module-qtquick-controls2 qml-module-qtquick-controls qml-module-qtmultimedia qml-module-qtgraphicaleffects libqt5bluetooth5 libsocketcan2 libqt5serialbus5 libqt5network5 libgpiod2 libqt5multimedia5 libqt5multimediaquick5 libqt5multimedia5-plugins gpiod && rm -rf /var/lib/apt/lists/*
[07-02 20:38:10.601] ---> [Warning] The requested image's platform (linux/arm) does not match the detected host platform (linux/amd64) and no specific platform was requested
[07-02 20:38:10.601] ---> Running in 8ab558468598
[07-02 20:38:11.189] e[91mstandard_init_linux.go:228: exec user process caused: no such file or directory
e[0m
[07-02 20:38:11.781] Error (530) - Docker exception: The command '/bin/sh -c apt-get -q -y update && apt-get -q -y install gdbserver procps qml-module-qtquick2 qml-module-qtquick-extras qml-module-qtquick-window2 qml-module-qtquick-controls2 qml-module-qtquick-controls qml-module-qtmultimedia qml-module-qtgraphicaleffects libqt5bluetooth5 libsocketcan2 libqt5serialbus5 libqt5network5 libgpiod2 libqt5multimedia5 libqt5multimediaquick5 libqt5multimedia5-plugins gpiod && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 1
code:1
message:The command '/bin/sh -c apt-get -q -y update && apt-get -q -y install gdbserver procps qml-module-qtquick2 qml-module-qtquick-extras qml-module-qtquick-window2 qml-module-qtquick-controls2 qml-module-qtquick-controls qml-module-qtmultimedia qml-module-qtgraphicaleffects libqt5bluetooth5 libsocketcan2 libqt5serialbus5 libqt5network5 libgpiod2 libqt5multimedia5 libqt5multimediaquick5 libqt5multimedia5-plugins gpiod && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 1
I can guarantee that the problem is NOT: file/docker permissions, line endings, debian package / repo issues, typos in the config yaml or autogenerated dockerfile. In fact, if I copy the dockerfile and run it on my host, i get the same result… how could the RUN / CMD or installed apt get "spoiled’ over night on the “qt5-wayland:2” in my cache? If I remove the RUN apt line, the image will build. Rebuilding the SDK does not help, removing qt5-wayland:2 from the cache does not help.
A clue: If I close VScode, git reset --hard
, and open VSCode I get:
[2021-07-02T20:57:32.348Z] Remote-Containers 0.183.0 in VS Code 1.57.1 (507ce72a4466fbb27b715c3722558bb15afa9f48).
[2021-07-02T20:57:32.348Z] Start: Resolving Remote
[2021-07-02T20:57:32.352Z] Setting up container for folder or workspace: XXXXXXX/code/XXXXXXX
[2021-07-02T20:57:32.354Z] Start: Check Docker is running
[2021-07-02T20:57:32.355Z] Start: Run: docker version --format {{.Server.APIVersion}}
[2021-07-02T20:57:32.404Z] Stop (49 ms): Run: docker version --format {{.Server.APIVersion}}
[2021-07-02T20:57:32.405Z] Server API version: 1.41
[2021-07-02T20:57:32.405Z] Stop (51 ms): Check Docker is running
[2021-07-02T20:57:32.415Z] Start: Run: git rev-parse --show-cdup
[2021-07-02T20:57:32.421Z] Stop (6 ms): Run: git rev-parse --show-cdup
[2021-07-02T20:57:32.423Z] Start: Run: docker ps -q -a --filter label=vsch.local.folder=XXXXXXX/code/XXXXXXX --filter label=vsch.quality=stable
[2021-07-02T20:57:32.461Z] Stop (38 ms): Run: docker ps -q -a --filter label=vsch.local.folder=XXXXXXX/code/XXXXXXX --filter label=vsch.quality=stable
[2021-07-02T20:57:32.464Z] Start: Run: docker build -f XXXXXXX/code/XXXXXXX/.devcontainer/Dockerfile -t vsc-XXXXXXX-7bc3cec1dc29b91f57a0b4e28fa8d310 XXXXXXX/code/XXXXXXX/.devcontainer
[2021-07-02T20:57:32.508Z] Sending build context to Docker daemon 6.144kB
[2021-07-02T20:57:32.598Z] Step 1/2 : FROM sha256:c6d2f6ee23b947a7f1905ea990c8baa8a76724f2e72a685bbbc93622d0653dc1
[2021-07-02T20:57:32.940Z] pull access denied for sha256, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
[2021-07-02T20:57:32.946Z] Stop (482 ms): Run: docker build -f XXXXXXX/code/XXXXXXXXXXXXX/.devcontainer/Dockerfile -t vsc-XXXXXXXXXXXXX-7bc3cec1dc29b91f57a0b4e28fa8d310
XXXXXXXXXXXXXcode/XXXXXXX/.devcontainer
[2021-07-02T20:57:32.958Z] Command failed: docker build -f XXXXXXXXXXXXX/code/XXXXXXXXXXXXX/.devcontainer/Dockerfile -t vsc-XXXXXXXXXXXXX-7bc3cec1dc29b91f57a0b4e28fa8d310
XXXXXXXXXXXXXX/code/XXXXXXXXXXx/.devcontainer
I’m on ubuntu 18.04 fwiw and I have had docker setup for years to do all sorts of things on this machine.
I miss just regular old cross-compiling and rsync, I even miss yocto, why is everything a bloody website of websites? That is to say, any help would be appreicated, and this does seem like a bug of fatally severe consequence.