InfiniTimeOrg / InfiniTimeOrg/InfiniTime

Docker build failure on Win11

Open
#2,182 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C
Stars
3.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Verification
  • I searched for similar bug reports (including closed issues) and found none was relevant.
What happened?

Invalid TARGET_DEVICE when running Docker from built HEAD or Docker Hub

What should happen instead?

Docker runs from git HEAD (1.15.0 2105a7b6) without errors

Reproduction steps
C:\gitroot\infinitime [main +7 ~0 -0 !]> docker image build -t infinitime-build-head ./docker
// ...snip...
C:\gitroot\infinitime [main +7 ~0 -0 !]> docker run --rm -it -v "C:\gitroot\infinitime:/sources" infinitime-build-head
+ set -e
+ export TOOLS_DIR=/opt
+ TOOLS_DIR=/opt
+ export SOURCES_DIR=/sources
+ SOURCES_DIR=/sources
+ export BUILD_DIR=/sources/build
+ BUILD_DIR=/sources/build
+ export OUTPUT_DIR=/sources/build/output
+ OUTPUT_DIR=/sources/build/output
+ export NPM_DIR=/sources/build/npm
+ NPM_DIR=/sources/build/npm
+ export npm_config_cache=/sources/build/npm
+ npm_config_cache=/sources/build/npm
+ export BUILD_TYPE=Release
+ BUILD_TYPE=Release
+ export GCC_ARM_VER=10.3-2021.10
+ GCC_ARM_VER=10.3-2021.10
+ export NRF_SDK_VER=nRF5_SDK_15.3.0_59ac345
+ NRF_SDK_VER=nRF5_SDK_15.3.0_59ac345
++ uname -m
+ MACHINE=x86_64
+ '[' x86_64 = arm64 ']'
+ export GCC_ARM_PATH=gcc-arm-none-eabi-10.3-2021.10
+ GCC_ARM_PATH=gcc-arm-none-eabi-10.3-2021.10
+ '[' false = false ']'
+ main
+ local target=
+ mkdir -p /opt
+ '[' '!' -d /opt/gcc-arm-none-eabi-10.3-2021.10 ']'
+ '[' '!' -d /opt/nRF5_SDK_15.3.0_59ac345 ']'
+ '[' '!' -d /opt/mcuboot ']'
+ mkdir -p /sources/build
+ CmakeGenerate
+ cmake -G 'Unix Makefiles' -S /sources -B /sources/build -DCMAKE_BUILD_TYPE=Release -DARM_NONE_EABI_TOOLCHAIN_PATH=/opt/gcc-arm-none-eabi-10.3-2021.10 -DNRF5_SDK_PATH=/opt/nRF5_SDK_15.3.0_59ac345 -DBUILD_DFU=1 -DBUILD_RESOURCES=1
PROJECT_GIT_COMMIT_HASH_SUCCESS? 0

BUILD CONFIGURATION
-------------------
    * Mode : Release
    * Version : 1.15.0
    * Toolchain : /opt/gcc-arm-none-eabi-10.3-2021.10
    * GitRef(S) : 467ceffb
    * NRF52 SDK : /opt/nRF5_SDK_15.3.0_59ac345
    * Target device :
    * Build DFU (using adafruit-nrfutil) : Enabled
    * Build resources : Enabled
CMake Error at src/CMakeLists.txt:820 (message):
  Invalid TARGET_DEVICE
More details?

Nothing that I can see would indicate why TARGET_DEVICE wouldn't be the default of PINETIME. I checked out CMakeLists.txt and *.sh with LF line endings as well.

Version

v1.15.0

Companion app

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Docker build and run commands on Windows 11, then inspect src/CMakeLists.txt around line 820 and the referenced CMakeLists.txt and shell scripts. Check how TARGET_DEVICE is passed or defaulted during the container build. Done means the v1.15.0 Docker image runs from git HEAD without reporting Invalid TARGET_DEVICE.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, docker
Domain
build-system, embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.