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

doc: "Variable ZEPHYR_TOOLCHAIN_VARIANT is not defined" #30713

Closed
andrewboie opened this issue Dec 14, 2020 · 4 comments · Fixed by #32003
Closed

doc: "Variable ZEPHYR_TOOLCHAIN_VARIANT is not defined" #30713

andrewboie opened this issue Dec 14, 2020 · 4 comments · Fixed by #32003
Assignees
Labels
area: Build System area: Twister Twister bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@andrewboie
Copy link
Contributor

Describe the bug
Imaged a new Ubuntu machine and followed all the directions on https://docs.zephyrproject.org/latest/getting_started/index.html

I used the default location for the SDK.

Unfortunately, this page doesn't mention that ZEPHYR_TOOLCHAIN_VARIANT has to be set for twister to work.

To Reproduce

andrew@meatwad:~/projects/zephyr/zephyr$  twister -p qemu_x86
Renaming output directory to /home/andrew/projects/zephyr/zephyr/twister-out.1
INFO    - Zephyr version: zephyr-v2.4.0-2399-g7883eedfde
INFO    - JOBS: 32
E: Variable ZEPHYR_TOOLCHAIN_VARIANT is not defined

Expected behavior
Doc page would mention this detail.

Impact
Minor

@andrewboie andrewboie added bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug area: Documentation labels Dec 14, 2020
@SeppoTakalo
Copy link
Collaborator

I was just searching for the same issue.
Apparently export ZEPHYR_TOOLCHAIN_VARIANT=zephyr is the right choice, if you installed the Zephyr SDK, and it has been visible in the documentation in the past:
https://docs.zephyrproject.org/1.14.1/getting_started/installation_linux.html#zephyr-sdk

But current documentation does not mention it. Probably at some point all the build tools detected Zephyr SDK automatically, so they removed the mention about setting that variable.

carlescufi added a commit to carlescufi/zephyr that referenced this issue Feb 3, 2021
The getting started guide doesn't currently document that the
ZEPHYR_TOOLCHAIN_VARIANT env var needs to be set even in the case of
using the Zephyr SDK. Add mentions to it in both the short and long
guides.

Fixes zephyrproject-rtos#30713.

Signed-off-by: Carles Cufi <[email protected]>
@tejlmand
Copy link
Collaborator

tejlmand commented Feb 4, 2021

Probably at some point all the build tools detected Zephyr SDK automatically, so they removed the mention about setting that variable.

Correct. CMake handles this automatically when using newer Zephyr SDK's. (from 0.11.3 and beyond).

This issue is related to running twister, which seems to also test for the Toolchain variable, so i'm looking into aligning code so this can be done in a single place.
See also:
https://github.com/zephyrproject-rtos/zephyr/pull/31936/files#r570036292

@tejlmand
Copy link
Collaborator

tejlmand commented Feb 4, 2021

if trying to build using west or CMake / Ninja, then you should not see this issue.

@SeppoTakalo
Copy link
Collaborator

west+CMake+Ninja works OK, as expected.
This issue is only within Twister.

tejlmand added a commit to tejlmand/zephyr that referenced this issue Feb 4, 2021
Fixes: zephyrproject-rtos#30713

Now using the common script `verify-toolchain.cmake` for verifying
toolchain settings.

Signed-off-by: Torsten Rasmussen <[email protected]>
nashif pushed a commit that referenced this issue Feb 5, 2021
Fixes: #30713

Now using the common script `verify-toolchain.cmake` for verifying
toolchain settings.

Signed-off-by: Torsten Rasmussen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Build System area: Twister Twister bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
4 participants