-
Notifications
You must be signed in to change notification settings - Fork 102
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
link against tinyxml2 correctly #190
Conversation
@dirk-thomas do you mind having a look at this? Not sure exactly how to move forward. |
Since the |
That makes total sense. I think it would make sense to adapt that
Alternatively, this code snippet could be placed inside the pluginlib's cmake logic and guarded with Both approaches seem to work locally for me. |
I'm also running into issues building pluginlib and its dependencies on Ubuntu 18.04 because cmake 3.10 doesn't allow you to IMPORT libraries from other packages. The solution in ros2/tinyxml2_vendor#8 seems to fix it for me, along with removing the export from this package. I'll go ahead and review ros2/tinyxml2_vendor#8. I also verified that with that fix in place and ros2/rosbag2#403 in place, I was able to build rosbag2 with no absolute paths in it (except for yaml_cpp_vendor, a different issue), and I was also able to build nav2_rviz_plugins (so the problem from #192 is still solved). |
Signed-off-by: Karsten Knese <[email protected]>
Signed-off-by: Karsten Knese <[email protected]>
Signed-off-by: Karsten Knese <[email protected]>
I tried this PR out along with ros2/tinyxml2_vendor#8 and ros2/rosbag2#403 . That replicates the test I made when looking at #193 . Unfortunately, with this PR, I fail to build. Where I fail is in trying to build rviz_common, with errors like:
rviz_common doesn't itself use TinyXML2, so it must be picking up the dependency from pluginlib. However, without pluginlib exporting the TinyXML2 dependency, there's nothing to link against. That seems like some sort of bug, but I don't know what it is at the moment. I'm going to suggest that we go ahead with #190 and ros2/tinyxml2_vendor#8, which improves the situation. Then we can continue debugging what is going on with downstream consumers. @Karsten1987 what do you think? |
But pluginlib does export the dependency? Looking at the CI job here rviz built correctly. Did you use https://github.com/ros2/rviz/pull/542/files? |
I had missed this one. With that as well, things built here. |
8463198
to
ecd27cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also had to use this to resolve similar issues with image_transport
closes #191
Connects to ros2/rosbag2#402
I don't know exactly why but it looks to me as if
tinyxml2_vendor
as well asTinyXML2
are not correctly linked to the interface target of pluginlib.By explicitly linking to
tinyx2ml::tinyxml2
- and not adding the vendor package to the targets - the error message in ros2/rosbag2#403 (comment) is being resolved.As a general question, why should pluginlib export a dependency on the vendor package and not just directly transitively link to tinyxml2?