-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Description
Describe the bug
The documentation states that for SPDX generation, we have to do the following (in case of the hello_world project):
west spdx -i -d BUILD_DIR/hello_worldwest build -d BUILD_DIR/hello_worldwest spdx -d BUILD_DIR/hello_world
With a pristine project (without the BUILD_DIR folder present), this does not work, because the third command errors without BUILD_DIR/CMakeCache.txt. I solved this issue by changing the second command to west build -d BUILD_DIR --domain hello_world instead.
Another problem I encountered, is that running west build -p will undo the west spdx -i. This means that running a pristine build negates the necessary precommand to enable SPDX file generation. I ran into this problem when I used the VSCode nRF Connect Add Build Configuration button and wanted to generate SPDX files afterwards by running west spdx -i and then rebuilding it. However, it does not rebuild, because it knows nothing changed, forcing me to build "pristinely", which also does not result in a build folder that can be used to generate SPDX files, because the west spdx -i was undone.
Regression
- This is a regression.
Steps to reproduce
Open the hello_world example in nRF Connect SDK v2.8.0 (and remove the build folder if it exists), add the CONFIG_BUILD_OUTPUT_META=y configuration to the prj.conf file and run:
west spdx -i -d build/hello_worldwest build -d build/hello_world --board nrf52840dk/nrf52840west spdx -d build/hello_world
Relevant log output
parsing CMake Cache file
ERROR: CONFIG_BUILD_OUTPUT_META must be enabled to generate spdx files; bailing
ERROR: SPDX walker failed; bailingImpact
Annoyance – Minor irritation; no significant impact on usability or functionality.
Environment
- Linux
- Zephyr SDK v3.7.99-ncs1
- nRF Connect SDK v2.8.0
- nRF Connect SDK Toolchain v2.8.0
Additional Context
No response