Missing DEPENDS causes strange error
envgap__nasa__fprime-5236
01 / FAILURE SIGNATURE
As reported upstream
If a module `CMakeLists.txt` has an empty `DEPENDS` section in the `register_fprime_library` function call, the `fprime-util generate` step will emit a bizarre error:
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
6f35719ab554e0e9515a5b70f58409ce0ec676ed- Manifest
cmake/test/data/test-fprime-library/TestLibrary/TestComponent/CMakeLists.txt- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
nasa/fprime #5236 · read the original issue
| | |
|:---|:---|
|**_F´ Version_**| 4.x|
|**_Affected Component_**| |
---
## Problem Description
If a module `CMakeLists.txt` has an empty `DEPENDS` section in the `register_fprime_library` function call, the `fprime-util generate` step will emit a bizarre error:
```
CMake Error at lib/fprime/cmake/utilities.cmake:788 (message):
----------------------------------------
F Prime/CMake target 'TRUE' not available to deployment 'SomeDeployment'. 'TRUE' must:
1. Must be defined somewhere in the F Prime project
2. Must be defined before 'SomeDeployment' deployment (register_fprime_deployment)
'TRUE' is undefined, or included via `add_fprime_subdirectory` after `register_fprime_deployment`. in:
/home/tcanham/source/SomeDirectory/Something/CMakeLists.txt
----------------------------------------
Call Stack (most recent call first):
lib/fprime/cmake/utilities.cmake:737 (fprime_cmake_clear_message)
lib/fprime/cmake/target/target.cmake:75 (fprime_cmake_fatal_error)
lib/fprime/cmake/target/target.cmake:136 (check_unknown_links)
lib/fprime/cmake/target/target.cmake:181 (setup_single_target)
lib/fprime/cmake/API.cmake:161 (setup_module_targets)
lib/fprime/cmake/API.cmake:346 (fprime_attach_custom_targets)
SomeDeploymentDirectory/CMakeLists.txt:19 (register_fprime_deployment)
```
(Fake directories and names were inserted into the error text)
## Context / Environment
Execute `fprime-util version-check` and share the output.
```
Operating System: Linux
CPU Architecture: x86_64
Platform: Linux-5.15.133.1-microsoft-standard-WSL2-x86_64-with-glibc2.39
Python version: 3.12.3
CMake version: 3.26.0
Pip version: 26.1.1
Pip packages:
fprime-tools==4.2.1
fprime-gds==4.2.1
fprime-fpp==3.2.0
Project submodules:
https://github.com/nasa/fprime.git @ v4.2.2
```
## How to Reproduce
1. Take any module directory with no `DEPENDS` in the `register_fprime_library`
2. Add `DEPENDS` with no string
3. Run fprime-util generate
## Expected Behavior
It would be nice to have an error that is more informative like "Empty DEPENDS, dummy!"
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]