That’s exactly what’s happening, but at least it is getting hard coded from a build arg. I got this working in Kinetic by adding the following to my catkin part.
catkin-cmake-args: [
"-DOGRE_PLUGIN_PATH=/snap/rviz/current/usr/lib/x86_64-linux-gnu/OGRE-1.9.0"
]
It would be better to change the source to use LD_LIBRARY_PATH, but this works in the snapcraft.yaml for now.
I added this to the rviz command too, but this was kind of a kitchen sink approach and there is probably much that could be removed.
rviz:
command: envwrap desktop-launch roslaunch bar_launchers throttled_rviz.launch
plugs: [network, network-bind, home, x11, opengl, locale-control, gsettings, pulseaudio,]
environment:
LD_LIBRARY_PATH: "$SNAP/usr/lib/x86_64-linux-gnu/OGRE-1.9.0:$SNAP/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms:$SNAP/usr/lib/x86_64-linux-gnu/qt5/plugins:$LD_LIBRARY_PATH"
QT_QPA_PLATFORM_PLUGIN_PATH: "$SNAP/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms"
QT_PLUGIN_PATH: "$SNAP/usr/lib/x86_64-linux-gnu/qt5/plugins"
Rviz is doing some other ugly things during the build like creating symlinks that cause the internals of the snap to look funny, but this doesn’t seem to break any functionality.
If there is interest in getting Rviz published to the store I could help with that. I’ll try to get it merged upstream if possible as opposed to maintaining the snapcraft.yaml myself. I’ve not posted the full snapcraft.yaml here because mine contains other utilities for internal use, but I could strip it down to only rviz and publish it.