Skip to content

west build; west build --board=qemu_x86 fails with "unknown BOARD" #31800

@marc-hb

Description

@marc-hb

To Reproduce
Steps to reproduce the behavior:

  1. cd samples/hello_world
  2. west build # missing BOARD, fails as expected
  3. west build --board=qemu_x86 # fails the same again!

Expected behavior
Do not ignore --board parameter in step 3

Impact
Pure usability issue.
Simple workaround: delete the build/ directory and all its evil CMake cache(s).

Logs and console output

$ west  build; west  build --board=qemu_x86

WARNING: This looks like a fresh build and BOARD is unknown; so it probably won't work. To fix, use --board=<your-board>.
Note: to silence the above message, run 'west config build.board_warn false'
-- west build: generating a build system
Including boilerplate (Zephyr base (cached)): zephyr/cmake/app/boilerplate.cmake
-- Application: zephyr/samples/hello_world
-- Zephyr version: 2.5.0-rc1 (zephyr)
-- Found west (found suitable version "0.9.99", minimum required is "0.7.1")
CMake Error at zephyr/cmake/extensions.cmake:2105 (message):
  BOARD is not being defined on the CMake command-line in the environment or
  by the app.
Call Stack (most recent call first):
  zephyr/cmake/app/boilerplate.cmake:221 (zephyr_check_cache)
  zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
  CMakeLists.txt:5 (find_package)

-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/usr/bin/python3 -Bzephyr/samples/hello_world/build -Szephyr/samples/hello_world -GNinja

Environment (please complete the following information):

  • OS: (e.g. Linux, MacOS, Windows)
  • Toolchain (e.g Zephyr SDK, ...)
  • Commit SHA or Version used

Linux, SDK 0.12.1
zephyr v2.5.0-rc1-166-g95712bd49889
west v0.7.1-116-g9d9b29b1fbf4

cc: @mbolivar-nordic who immediately understood this and volunteered to fix it.

Metadata

Metadata

Labels

area: Build SystembugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions