-
Notifications
You must be signed in to change notification settings - Fork 390
Description
Desired behavior
Being able to move an Ignition installation which was compiled from source to another destination.
I want to package the Ignition projects into Conan packages. The relocatability is needed for pre-built conan packages, because they are installed into the user's home folders. This changes the absolute installation path.
Alternatives considered
- Searched for already existing conan packages. There is only
ignition-cmakeandignition-math, probably from this effort which seems to be abandoned. - Tried to fix it using Conan's
deploy()method to remap the paths in the yaml config files. - Don't pre-build the packages. We've tried that. But it's annoying if a user has to wait for 30mins for all the projects to download and compile while the workstation becomes virtually unusable due to the high CPU and memory usage.
Problem description
The problem seems to be hard coded paths in various locations.
Package config files
The library paths are hard coded into the packages' configuration files. E.g. in share/ignition/msgs5.yaml
--- # Subcommands available inside ignition-transport.
format: 1.0.0
library_name: ignition-msgs
library_version: 5.3.0
library_path: /home/sb/.conan/data/ignition-msgs/5.3.0/ar/stable/package/75506859fd8f6284fac51eeb3592dfae9546ff1c/lib/ruby/ignition/cmdmsgs5
commands:
- msg : Print information about messages.
---The source code
E.g. the default location of the config files is hard coded:
Defined in the config.hh
And used as a sole source for the installedConfig in the Gui, Ign, and the server.
There might be additional issues elsewhere, which did not pop up, yet, e.g. cmake issues which were addressed for example in ignition-cmake, ignition-tools, and gazebo.
Implementation suggestion
- Use additional environment variables which can override the hard coded paths.
- Change the paths to package/installation relative paths and add mechanisms to determine the final paths during runtime.
Additional context
I'm working on conan packages for the Ignition projects in our company. Building the individual projects went fine. However, bringing them together, did not.
The two approaches I tried:
Build every package independently
- Create a conan package for every ignition project (cmake, math, msgs, etc.).
- Bundle them in a meta conan package
From the installation instructions it seems that the packages need to be packaged into one combined destination (--merge-install). That's when I tried the second approach (build everything in one package). Due to the problems I encountered there, I came back to this approach because I actually prefer it because it reflects the modularity of the Ignition project and makes updates in the individual packages easier.
Build everything in one package
I tried to use colcon in one single conan package. Works, except that one uses the very good cmake support of Conan and that there is no equivalent colcon support. I didn't follow the idea of passing the appropriate cmake arguments to colcon via the --cmake-args, because I went back to the other approach.