-
Notifications
You must be signed in to change notification settings - Fork 609
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
support building a subset of packages with static libraries #635
Comments
@eeyang92 FYI |
Thanks @dirk-thomas! |
Latest example command: |
Unfortunately, the above example command does not work, at least with my settings on a Debian buster docker container, foxy. It seems, that there is a CMake problem when trying to compile a package containing messages, in my case, it's the unique_identifier package: CMake Error: install(EXPORT "unique_identifier_msgs__rosidl_typesupport_c" ...) includes target "unique_identifier_msgs__rosidl_typesupport_c" which requires target "unique_identifier_msgs__rosidl_typesupport_fastrtps_c" that is not in the export set. In the dynamic case (-DBUILD_SHARED_LIBS=ON), ie. when I do not have to ignore rosidl_typesupport_introspection_* packages, it works out fine. |
For debugging I added the flag --executor sequential to colcon build as well as dbg variables to cmake (--trace-source=CMakeLists.txt --trace-expand) and got the following: ros2/rmw_dds_common/rmw_dds_common/CMakeLists.txt(105): ament_package() Unfortunately, my cmake knowledge is limited and I could not find any documentation of the build system, so I'm not able to figure out where/how to export the requested targets. Hopefully somebody is willing to give me a hint... |
I guess rosidl_typesupport_fastrtps_c has been excluded from the ignored target (rmw_fastrtps_shared_cpp) see the package dependency https://github.com/ros2/rmw_fastrtps/blob/4e0fce977c993f840b013c444d603842fb39ad64/rmw_fastrtps_dynamic_cpp/package.xml#L27 |
I build ros2 static lib on Windows 11, but get the following output: The build command is : How to solve this problem? |
This has been worked on in the past in #468 and was working at some point in time.
Currently it seems to be impossible again to build the demos / examples with static libraries, see colcon/colcon-core#140.
It should be possible to build at least the C++ demos and examples with static libraries using an invocation like this (assuming that only one RMW impl is available, e.g. FastRTPS):
The text was updated successfully, but these errors were encountered: