ApolloX Extension failing on ARM64

Hey there,

i am currently trying to set up the ApolloX VSCode Extension on an ARM64 M2 Macbook.
Although I know that you currently only support the AMD64 Architecture on Linux I wanted to try to install it to accelerate my debug process.

I am using the Colibri iMX6ULL on the Colibri Eval Board.

I have currently installed Ubuntu ARM64 in a VM over Parallels and installed all the required dependencies.
After getting the following error message on compiling for my armv7 board:

=> ERROR [2/4] RUN apt-get -q -y update &&     apt-get -q -y install     &&     apt-get clean && apt-get autoremove &&     rm -rf /var/lib/apt/lists/*        0.3s
------
 > [2/4] RUN apt-get -q -y update &&     apt-get -q -y install     &&     apt-get clean && apt-get autoremove &&     rm -rf /var/lib/apt/lists/*:
#0 0.279 exec /bin/sh: exec format error

I tried rebuilding the debian-cross-toolchain for the arm64 architecture but only got another error:

=> [lastetts-cont-debug internal] load build definition from Dockerfile.debug                                                                                 0.0s
 => => transferring dockerfile: 2.47kB                                                                                                                         0.0s
 => [lastetts-cont-debug internal] load .dockerignore                                                                                                          0.0s
 => => transferring context: 56B                                                                                                                               0.0s
 => [lastetts-cont-debug internal] load metadata for docker.io/torizon/debian:3-bookworm                                                                       0.9s
 => [lastetts-cont-debug auth] torizon/debian:pull token for registry-1.docker.io                                                                              0.0s
 => CACHED [lastetts-cont-debug 1/6] FROM docker.io/torizon/debian:3-bookworm@sha256:670aa4be3de68338e9dc5bf740f34079343199038fc06ab8f6d0ad4482a66aa8          0.0s
 => ERROR [lastetts-cont-debug 2/6] RUN apt-get -q -y update &&     apt-get -q -y install     openssl     openssh-server     rsync     file     curl     gdb   0.2s
 => [lastetts-cont-debug internal] load build context                                                                                                          0.0s
 => => transferring context: 63B                                                                                                                               0.0s
------
 > [lastetts-cont-debug 2/6] RUN apt-get -q -y update &&     apt-get -q -y install     openssl     openssh-server     rsync     file     curl     gdb &&     apt-get clean && apt-get autoremove &&     rm -rf /var/lib/apt/lists/*:
#0 0.200 exec /bin/sh: exec format error

May there be any possibility for me to get the extension to work on my Mac or for you to add the ARM compatibility to the extension in the future?

Thank you!
Lukas

1 Like

Hey @xlukem

run an x86_64 VM on Mac is not possible?

It’s on our backlog to support Mac OS as developer host, so it’s something that we should have in the future, but it’s not a priority for now.

Hey @matheus.tx,

running an x86_64 VM is possible but VERY slow. As my goal is to speed up the debug process by using the M2 Chip, this wouldn’t help.

Thank you though for the consideration adding this as a feature in the future.

1 Like

I now got it to work! For anyone wanting to try out the ApolloX Extension on MacOS in a Linux VM as well:

In the tasks.json in the Task run-torizon-binfmt, I changed the torizon/binfmt container to the following:

"--rm --privileged tonistiigi/binfmt --install arm",

Also, the debian-cross-toolchain image in the Dockerfile.sdk, has to be rebuilt on your local PC to work on the arm64 platform or use mine (for arm board arch)

# BUILD ------------------------------------------------------------------------
#FROM torizon/debian-cross-toolchain-${IMAGE_ARCH}:${CROSS_SDK_BASE_TAG}
FROM xlukem/crossschain:arm64

You can find the Dockerfiles here: https://github.com/toradex/torizon-containers/tree/bookworm/debian-cross-toolchains