NordicPlayground nrf-docker instructions/code fail to build image on Apple Silicon

System Info:
Hardware: M3 Max
OS:  Sequoia 15.3

Following the instructions outlined in the readme of: github.com/.../nrf-docker Docker fails to build an image on Apple Silicon.

Build command:

docker build -t nrfconnect-sdk --build-arg sdk_nrf_version=v2.9-branch --build-arg arch=arm64 .

Docker error log shows:

+ wget -q https://developer.nordicsemi.com/.pc-tools/nrfutil/x64-linux/nrfutil
+ mv nrfutil /usr/local/bin
+ chmod +x /usr/local/bin/nrfutil
+ nrfutil install toolchain-manager
rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2/bin/bash: line 4:    10 Trace/breakpoint trap   nrfutil install toolchain-manager 


I modified the Dockerfile to install the universal MacOs version of nrfutil by replacing line 30 of the Dockerfile with:
wget -q https://developer.nordicsemi.com/.pc-tools/nrfutil/universal-osx/nrfutil


which then produces the following error:
+ wget -q https://developer.nordicsemi.com/.pc-tools/nrfutil/universal-osx/nrfutil
+ mv nrfutil /usr/local/bin
+ chmod +x /usr/local/bin/nrfutil
+ nrfutil install toolchain-manager
/bin/bash: line 4: /usr/local/bin/nrfutil: cannot execute binary file: Exec format error 


Ensured rosetta was installed via the command line: softwareupdate --install-rosetta

Parents Reply
  • Firstly, tagging also  , I got confirmation that the recommended Docker image would be the ones provided in this link: https://github.com/nrfconnect/sdk-nrf/pkgs/container/sdk-nrf-toolchain. My apologies for the misinformation.

    Our developers however also feedbacked that gcc should be included in those images. After you setup the NCS repositories with west, you should be able to build.

    Could you please check again?

    Finally, as previously mentioned, the only reason I followed-up here regarding the sdk-nrf-toolchain Docker images is to find out which Docker image is the recommended one. As that open point is now resolved, please discuss issues regarding those images in a new DevZone ticket. You can refer to our brief conversation here on the new ticket if needed.

Children
  •    apologies as my question did not line up with the original post.

    I found Zephyr's docker image works.

    Honestly I tried the nRF docker image on 2 different computers/WSL's and it gave the same error when I tried to build hello world sample for native_sim.

    I can get create a new post perhaps and discuss what is the recommended way to go?

    Or you could try and see if you can build the helloworld for native_sim board?

  •  No need to apologize, there was no issue at all, and you have helped discover my previous incorrect/lacking recommendation.

    I think further investigation of the sdk-nrf-toolchain Docker image should be done on a dedicated DevZone case. Please create a new post, giving details on what you have done and the full log including the error.

Related