Part referencing other part?

Awesome! You know where to find us if you have more questions :slight_smile: .

Hi, has anybody tried this lately?

Some of the packages in my ROS workspace need a library that is provided through a previously staged part, more or less as follows:

    plugin: dump
    source: /foo/bar/library
    override-build: |
      snapcraftctl build
      ./ # This basically creates some symbolic links and copy the files where needed
      - usr/*
      - etc/*
    plugin: catkin
    rosdistro: indigo
    source-space: /foo/bar/catkin_ws/src 
      - package A
      - package B # Some of these packages have to be linked against the previously staged library
      - ...
      - package N
    after: [library]

According to this post it should work, however, the linking fails since the DCMAKE_LIBRARY_PATH seems to be ignored. I can check that the parameter is properly taken by the plugin but not sure if it is doing something with it. I also can check how the library is properly staged by the part.

Is it necessary to adapt the /etc/ at the host or staged to make it visible for ldd?

For now, in order to solve that, I had to modify the CMakeList.txt and include the absolute path to the libraries part when linking with something like $SNAPCRAFT_STAGE/use/local/lib/

@mbeneto without using after you have no guarantee that library is staged before ros-workspace is built. If you add that, does it change anything?

@kyrofa, Iā€™m already using after in the real yaml, I just forgot to add it into this dummy example.