Closed esteve closed 6 years ago
Holding this until the problem with ament_cmake_ros
and gtest
/ gmock
is resolved.
I am not yet sure how this is supposed to work / what should be allowed / what should be detected and warned about in cases where a user builds some packages with the option being set to building shared libraries and some other packages with the option being set to static libraries. See related comments on the other PR: https://github.com/ros2/rosidl/pull/183#pullrequestreview-33826335
We talked about this in the meeting today and concluded that we should ensure that at least the type support packages are built with a consistent / compatible setting of BUILD_SHARED_LIBS
before merging this. Probably that means all type support packages are using the same flag - we don't have to support the case of mixing the library types across multiple type support packages.
@dirk-thomas sure, no problem, I can wait until you make those changes. Do you have a rough idea of what would those change involve? Is it just a matter of adding the ament_cmake_ros
machinery to any package using rosidl_generate_interfaces
to ensure that BUILD_SHARED_LIBS
is set to SHARED
or is there anything more? Thanks.
I don't know yet what exactly will be necessary to address this. I will likely not have time in the near future to work on this though.
Hello @esteve,
I'm trying to build demo statically but get many build errors when I setBUILD_SHARED_LIBS=OFF
.
Have you managed to build all the ROS2 stack statically? If so, can you show me how?
Thanks.
@davwan01 hey! I've only succeeded up to rcl
with the branches attached to https://github.com/ros2/ros2/issues/306 Most of them are already merged, but you'd still need:
https://github.com/ros2/rmw_fastrtps/pull/75 https://github.com/ros2/rosidl/pull/183
I haven't tried building rclcpp
and anything else above because I've only built ROS2 statically for iOS where I use these Objective-C bindings:
https://github.com/esteve/ros2_objc
so I only need rcl
and below to be statically built.
If you'd like to build statically the rest of ROS2, you'd need make a few changes to rclcpp
so that it detects BUILD_SHARED_LIBS=OFF
, but there may be other issues with the lifecycle subsystem.
In any case, could you paste here the build errors you've encountered? Maybe I can help with that :-) Thanks!
@esteve , thanks for the details you shared. I will try and back to you.
@esteve I got many errors while building rclcpp. I'm going to look inside and try to fix them.
@davwan01 could you share the error log somewhere (a GitHub gist would be fine)? I might be able to help you with the errors.
Closing in favor of #19.
See https://github.com/ros2/rosidl/pull/183#issuecomment-289164782
Connects to https://github.com/ros2/ros2/issues/306