Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
marc-hb opened this issue Jan 30, 2021 · 0 comments · Fixed by #31882
Closed

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

marc-hb opened this issue Jan 30, 2021 · 0 comments · Fixed by #31882
Assignees
Labels
area: Build System bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@marc-hb
Copy link
Collaborator

marc-hb commented Jan 30, 2021

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.

@marc-hb marc-hb added bug The issue is a bug, or the PR is fixing a bug area: Build System west labels Jan 30, 2021
@nashif nashif added priority: low Low impact/importance bug and removed west labels Feb 1, 2021
mbolivar-nordic added a commit that referenced this issue Feb 2, 2021
We can't trust the cache to have a CACHED_BOARD just because it exists.

Fixes: #31800

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
mbolivar-nordic added a commit to mbolivar-nordic/zephyr that referenced this issue Feb 2, 2021
We can't trust the cache to have a CACHED_BOARD just because it exists.

Fixes: zephyrproject-rtos#31800

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
nashif pushed a commit that referenced this issue Feb 2, 2021
We can't trust the cache to have a CACHED_BOARD just because it exists.

Fixes: #31800

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Build System bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants