Skip to content
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

Installing to libexec with ament_cmake_auto #96

Closed
dhood opened this issue Jun 26, 2017 · 6 comments
Closed

Installing to libexec with ament_cmake_auto #96

dhood opened this issue Jun 26, 2017 · 6 comments
Assignees
Labels
question Further information is requested

Comments

@dhood
Copy link
Contributor

dhood commented Jun 26, 2017

I have a ROS 2 package that uses ament_cmake_auto to take care of installing its libraries and executables (amcl)

This causes the executables to be installed like this:
https://github.com/ament/ament_cmake/blob/dde5df8104073ff47aa96e482118adb6a03323f5/ament_cmake_auto/cmake/ament_auto_package.cmake#L62..L69

ROS 2 packages are currently being updated to install to "libexec" instead of bin.

Is it appropriate to add an option to ament_cmake_auto to install executables to lib/${PROJECT_NAME}? It seems to be something that may be useful in other projects, but perhaps the functionality is too ROS-specific to belong in this package?

@dhood dhood added the question Further information is requested label Jun 26, 2017
@dhood dhood self-assigned this Jun 26, 2017
@dirk-thomas
Copy link
Contributor

It would definitely be good if this CMake function would have an option to choose the install destination of the executables (either bin or lib/<pkgname>). For ROS packages the second option looks like the better default, too. If we want to keep the default in this package as bin we could also introduce a ROS specific package (like ament_cmake_ros) but I don't feel strongly about a separate package for this.

@dhood dhood removed their assignment Jun 26, 2017
@dhood
Copy link
Contributor Author

dhood commented Jun 26, 2017

ok, so how about we change the default for executables to lib/${PROJECT_NAME} and provide and option called INSTALL_TO_PATH or something that installs executables how they are installed currently?

@dhood
Copy link
Contributor Author

dhood commented Jun 26, 2017

Ah, I noticed in the FHS standard that "Applications may use a single subdirectory under /usr/lib. If an application uses a subdirectory, all architecture-dependent data exclusively used by the application must be placed within that subdirectory."

Does this then mean that if the executables are being installed to lib/${PROJECT_NAME}, the libraries should be installed there too? This is not consistent with how we've been changing things for other ROS 2 packages so I may have misinterpreted 'exclusively used by the application'.

@dirk-thomas
Copy link
Contributor

Libraries should still go into lib. This is how we do it in ROS 1 and I don't think we should change that.

@wjwwood
Copy link
Contributor

wjwwood commented Jun 26, 2017

Ah, I noticed in the FHS standard that "Applications may use a single subdirectory under /usr/lib. If an application uses a subdirectory, all architecture-dependent data exclusively used by the application must be placed within that subdirectory."

I think the key word there is "exclusively", so if you have a shared library that only your application uses, it would be put there. Since we mostly make things that could be reused by other packages, those shared libraries still belong in the top-level lib. At least that's how I interpret it.

@dhood
Copy link
Contributor Author

dhood commented Jul 12, 2017

closed bu #97, thanks @wjwwood and @dirk-thomas for the input

@dhood dhood closed this as completed Jul 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants