-
Notifications
You must be signed in to change notification settings - Fork 936
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
add full VERSIONs / SONAMEs to our libraries #273
Conversation
+1. If we have to break things, the louder and earlier it happens during the build, the better. As for using using the moveit version or manually bumping on ABI breakage: it sounds like the manual method is too easy to forget. I'd prefer to err on the safe side even if that means unnecessary rebuilds. So unless someone thinks they can put in the effort for reliably bumping sonames on releases with ABI change, my preference is for using the moveit version. As for including the patch number or not: it would be nice if it can be left out. That should be fine as long as we bump minor version when ABI compatibility breaks. The only problem with that is the indigo/jade/kinetic releases conflicting with each other, but I think that is a different discussion. But as long as we break ABI in patch-level releases we should include it. |
On Mon, Oct 10, 2016 at 12:49:26AM -0700, Maarten de Vries wrote:
Yes and yes. The problem is that we do (and want to) backport new features and ABI changes to older branches, but will not backport API changes.* *This, by the way, somewhat relates to the proposal to have a "master" branch that should work across the supported ROS distributions/Linux distributions. |
add_library(${MOVEIT_LIB_NAME} | ||
src/background_processing.cpp | ||
) | ||
add_library(${MOVEIT_LIB_NAME} src/background_processing.cpp) |
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.
while its not worth changing, I prefer the previous format because it makes adding more files to the library list cleaner in the future
src/background_processing.cpp | ||
) | ||
add_library(${MOVEIT_LIB_NAME} src/background_processing.cpp) | ||
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION}) |
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.
Out of curiosity, where is the value of ${${PROJECT_NAME}_VERSION}
set?
Thanks @v4hn! +1 to including the patch version in the sonames, we release so rarely I don't think the rebuild time is that important and I do forsee us still breaking ABI between patch versions due to the way our versioning is done between I/J/K. I also like having the sonames the same as the versions, to ease maintenance. I'd like to see this PR expanded to all of MoveIt!, as @v4hn intends. @wjwwood perhaps you have any wisdom on this change for moveit? |
+1 from me, would be really great to have it :). |
On Tue, Oct 11, 2016 at 11:49:31AM -0700, Dave Coleman wrote:
In the guts of |
@v4hn can you finish this PR so we can get Kinetic out of the door? |
I just came back to my keyboard yesterday. |
I like the idea of introducing sonames in general. However, I think we missed some important points:
|
Our deployment is via a bundled workspace now, so everything rebuilds each time— we don't worry about ABI at all. See: https://github.com/mikepurvis/ros-bundling |
@rhaschke its not clear what you are proposing - just that we shouldn't include the patch version in the sonames? After your points its also not clear to me what the advantage of this PR is - currently people who use MoveIt! debians sometimes have their catkin workspace broken after a ROS update because of ABI changes. With this new PR, it will be the same except that will always happen - correct? |
The point is that with sonames, the breakage will be explicit (ie: things will not start because they cannot find the libraries they were linked against), while right now, things will appear to be fine (because all the libraries are there), but due to ABI incompatibilities, users may run into all sorts of hard to understand / debug segfaults. As @rhaschke writes, with the current infrastructure (Bloom, etc) , the other advantage of sonames (ie: linking against a particular version, with several different versions all present in parallel) will not work. |
On Mon, Oct 17, 2016 at 10:49:47AM -0700, Robert Haschke wrote:
Yes. Having sonames in the libraries supports having multiple versions of the same library installed. And also: Yes, bloom and OSRF's packaging schemes do not account for such version "transitions" (that's the term for it in Debian) at all. As far as I've been told this was discussed at length some years ago and (I've been told) the final argument was that OSRF does not want to "guarantee the stability this would imply". The argument does not make any sense to me, but this thread is clearly not the place to discuss this.
Yes, this is intentional.
All "industry" setups I know (including OSRF's build system) rebuilds the whole dependent software stack for each update.
We should definitely minimize ABI changes, I agree. Also to avoid having to recompile your whole moveit development workspace all the time.
In theory I agree. This does not work with our current versioning scheme though.
Of course ABI and API are two entirely different things. We should definitely not backport any API change and did not do that in the recent past.
I considered this and don't think this makes sense for the moment. It would leave us with the same problems we have right now. |
I think, we agree on most points. My post was just to bring some pros and cons of the approach to our attention. Sorry, if I failed @davetcoleman.
I agree. However, I see a third option: increasing the patch level of soname independent of the patch level of the release version (slower or leaving out / not increasing when ABI stability is maintained).
I didn't argued against backporting at all, but to carefully think about what to backport and what not. Furthermore, I would like to reduce the effort to rebuild downstream packages as much as possible - which is possible if we manually increase the patch version of SONAMES.
I think, if we increase the patch version manually, it could work. Maybe, you didn't yet considered this option. |
On telephone, @v4hn and I agreed to use soname = patch version for this next release. However, in future we should try to bump the patch version only on ABI changes. |
This PR still only covers moveit_core and is not ready to be merged in. This change should also be held off until the next Kinetic release - a line must be drawn in the sand for releasing software or it will never happen. There is still too much debate going on here. |
How about a middle of the road that promotes getting a kinetic release out, but also managing the upgrade path:
|
I just added the remaining libraries. I was too tired to do this yesterday evening.
@mikeferguson Your whole proposal presupposes that binaries built against |
moveit_ros_planning | ||
moveit_ros_visualization | ||
) | ||
|
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.
This is the only non-trivial change I did: I had to move the catkin_package
command above the library declarations.
This is required because the resp. add_library
and set_target_properties
commands should stay near each other, but ${${PROJECT_NAME}_VERSION}
is defined by catkin_package
.
fc32d76
to
8f3d19a
Compare
As a result the libraries do not install as `libmoveit_xyz.so` anymore, but as `libmoveit_xyz.so.${MOVEIT_VERSION}` and only provide `libmoveit_xyz.so` as a symlink pointing to the versioned file. Because this sets each library's SONAME to the *full version*, this enforces that *every* binary links with the versioned library file from now on and has to be relinked with *each* new release of MoveIt!. The alternative would be to set the SONAME to `$MAJOR.$MINOR` and ignore the patch version, but because we currently stay with one `$MAJOR.$MINOR` number within each ROS distribution, we had (and likely will have) ABI changes in the `$PATCH` version releases too. The reason for this commit is that it is practically impossible to maintain full ABI compatibility within each ROS distribution and still add the the features/patches the community asks for. This has resulted in more than one ABI-incompatible MoveIt! release in the recent past within a ROS distribution. Because the libraries have not been versioned up to now, there was no way to indicate the incompatible changes and users who did not rebuild their whole workspace with the new release encountered weird and hard-to-track segfaults or broken behavior.
+1 for the new commits as well. Looking really good :). |
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.
+1. Did you ensured, that you don't miss a library?
Yes. I compiled the whole repository in an otherwise empty namespace and checked that all install libraries have an soname-version and a .so-symlink . |
I also just tested this locally in a fresh workspace and verified all libraries are consistently setup with sonames. As an aside, would we want to apply this same change to geometric_shapes? |
* add full VERSIONs / SONAMEs to all core libraries As a result the libraries do not install as `libmoveit_xyz.so` anymore, but as `libmoveit_xyz.so.${MOVEIT_VERSION}` and only provide `libmoveit_xyz.so` as a symlink pointing to the versioned file. Because this sets each library's SONAME to the *full version*, this enforces that *every* binary links with the versioned library file from now on and has to be relinked with *each* new release of MoveIt!. The alternative would be to set the SONAME to `$MAJOR.$MINOR` and ignore the patch version, but because we currently stay with one `$MAJOR.$MINOR` number within each ROS distribution, we had (and likely will have) ABI changes in the `$PATCH` version releases too. The reason for this commit is that it is practically impossible to maintain full ABI compatibility within each ROS distribution and still add the the features/patches the community asks for. This has resulted in more than one ABI-incompatible MoveIt! release in the recent past within a ROS distribution. Because the libraries have not been versioned up to now, there was no way to indicate the incompatible changes and users who did not rebuild their whole workspace with the new release encountered weird and hard-to-track segfaults or broken behavior. * add SONAMES to all non-core libraries too
* add full VERSIONs / SONAMEs to all core libraries As a result the libraries do not install as `libmoveit_xyz.so` anymore, but as `libmoveit_xyz.so.${MOVEIT_VERSION}` and only provide `libmoveit_xyz.so` as a symlink pointing to the versioned file. Because this sets each library's SONAME to the *full version*, this enforces that *every* binary links with the versioned library file from now on and has to be relinked with *each* new release of MoveIt!. The alternative would be to set the SONAME to `$MAJOR.$MINOR` and ignore the patch version, but because we currently stay with one `$MAJOR.$MINOR` number within each ROS distribution, we had (and likely will have) ABI changes in the `$PATCH` version releases too. The reason for this commit is that it is practically impossible to maintain full ABI compatibility within each ROS distribution and still add the the features/patches the community asks for. This has resulted in more than one ABI-incompatible MoveIt! release in the recent past within a ROS distribution. Because the libraries have not been versioned up to now, there was no way to indicate the incompatible changes and users who did not rebuild their whole workspace with the new release encountered weird and hard-to-track segfaults or broken behavior. * add SONAMES to all non-core libraries too
On Wed, Oct 19, 2016 at 10:35:41AM -0700, Dave Coleman wrote:
I don't think so. At least not the way we use sonames in MoveIt now. For a package like geometric_shapes, I believe it shouldn't be a problem to keep the ABI stable within each ROS distribution, |
This is similar to moveit#273 / 0a7a895, but hard-codes the version for each library instead of using the project's version. Thus, we have to bump the version of a library *manually* if we break ABI in a release. === Below is the original commit message of the patch targeting the kinetic branch. * add full VERSIONs / SONAMEs to all core libraries As a result the libraries do not install as `libmoveit_xyz.so` anymore, but as `libmoveit_xyz.so.${MOVEIT_VERSION}` and only provide `libmoveit_xyz.so` as a symlink pointing to the versioned file. Because this sets each library's SONAME to the *full version*, this enforces that *every* binary links with the versioned library file from now on and has to be relinked with *each* new release of MoveIt!. The alternative would be to set the SONAME to `$MAJOR.$MINOR` and ignore the patch version, but because we currently stay with one `$MAJOR.$MINOR` number within each ROS distribution, we had (and likely will have) ABI changes in the `$PATCH` version releases too. The reason for this commit is that it is practically impossible to maintain full ABI compatibility within each ROS distribution and still add the the features/patches the community asks for. This has resulted in more than one ABI-incompatible MoveIt! release in the recent past within a ROS distribution. Because the libraries have not been versioned up to now, there was no way to indicate the incompatible changes and users who did not rebuild their whole workspace with the new release encountered weird and hard-to-track segfaults or broken behavior. * add SONAMES to all non-core libraries too
This is similar to moveit#273 / 0a7a895, but hard-codes the version for each library instead of using the project's version. Thus, we have to bump the version of a library *manually* if we break ABI in a release. === Below is the original commit message of the patch targeting the kinetic branch. * add full VERSIONs / SONAMEs to all core libraries As a result the libraries do not install as `libmoveit_xyz.so` anymore, but as `libmoveit_xyz.so.${MOVEIT_VERSION}` and only provide `libmoveit_xyz.so` as a symlink pointing to the versioned file. Because this sets each library's SONAME to the *full version*, this enforces that *every* binary links with the versioned library file from now on and has to be relinked with *each* new release of MoveIt!. The alternative would be to set the SONAME to `$MAJOR.$MINOR` and ignore the patch version, but because we currently stay with one `$MAJOR.$MINOR` number within each ROS distribution, we had (and likely will have) ABI changes in the `$PATCH` version releases too. The reason for this commit is that it is practically impossible to maintain full ABI compatibility within each ROS distribution and still add the the features/patches the community asks for. This has resulted in more than one ABI-incompatible MoveIt! release in the recent past within a ROS distribution. Because the libraries have not been versioned up to now, there was no way to indicate the incompatible changes and users who did not rebuild their whole workspace with the new release encountered weird and hard-to-track segfaults or broken behavior. * add SONAMES to all non-core libraries too
* Port moveit_ros_warehouse package.xml, CMakeLists.txt * Apply ROS 2 migration steps * Enable warehouse in motion_planning_frame * Run mongo db in run_move_group.launch
This has been on my mind for quite some time and I consider the discussion (and hopefully merge) of this request as a blocker for the upcoming indigo and kinetic releases.
This request is still incomplete and only adds versions to
moveit_core
's libraries. I would like to includemoveit_ros
in this change too. However, I want to start the discussion, so please give your opinion.As a result of this request the libraries do not install as
libmoveit_xyz.so
anymore, but aslibmoveit_xyz.so.${MOVEIT_VERSION}
and providelibmoveit_xyz.so
as a symlink pointing to the versioned file.Because this sets each library's SONAME to the full version, this enforces that every binary links with the versioned library file from now on and has to be relinked with each new release of MoveIt!.
An alternative would be to set the SONAME to
$MAJOR.$MINOR
and ignore the patch version. But because we currently stay with one$MAJOR.$MINOR
number within each ROS distribution, we had (and likely will have) ABI changes in the$PATCH
version releases too.The reason for this commit is that it is practically impossible to maintain full ABI compatibility within each ROS distribution and still add the the features/patches the community asks for. This has resulted in more than one ABI-incompatible MoveIt! release in the recent past within a ROS distribution. Because the libraries have not been versioned up to now, there was no way to indicate the incompatible changes and users who did not rebuild their whole workspace with the new release encountered weird and hard-to-track segfaults or broken behavior.
The main alternative I see for us at the moment is to set hard-coded versions for each library. Then, whenever we do a release and changed the ABI of individual libraries within MoveIt, we could increase the version of each of these libraries independent of each other. As a result, only binaries that link against libraries that actually changed their ABI would have to be rebuild with a new release.
This adds quite a bit of overhead to the release process and also introduces a variety of library versions within a single MoveIt version over time that will probably confuse new users. I believe the alternative I propose in this request is superior.
@jspricke I discussed the need for SONAMEs with you quite a bit, so it would be great if you could have a look at it too.