Circular dependencies when building NuttX as a library
- Dominant language
- C
- Stars
- 4k
- Forks
- 1.7k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 237
Description
@acassis in your 2020 [blog post](https://acassis.wordpress.com/2020/06/28/using-nuttx-as-library-once-again/) you described how to export NuttX as a library. This is also documented in [C++ Example using CMake](https://nuttx.apache.org/docs/latest/guides/cpp_cmake.html#c-example-using-cmake). In both of these cases, and in the [PX4 codebase](https://github.com/PX4/PX4-Autopilot/blob/5fe955c24354808e05e81378784265b3f0ebc62c/platforms/nuttx/CMakeLists.txt#L259C1-L280C4), the link command includes the NuttX library collection inside `--start-group` `--end-group`.
I'm trying to package the NuttX libraries with Conan 2, and I haven't been able to figure out how to communicate to package consumers that the NuttX libs have to be within a link group. The details are in https://github.com/conan-io/conan/issues/16283. The circular dependencies create problems for consumers.
Are the inter dependencies of the NuttX libraries simple enough that they can be spelled out manually in CMake, or are they not resolvable with anything other than the link group?
Alternatively, has anyone tried combining all of the NuttX static libs into one static lib prior to export?
Contributor guide
Assessment
This issue has not been assessed yet.