Hi, i have seen the great tutorial from @kyrofa in order to create a snap from a ROS workspace.
I am using catkin plugin like @kyrofa does in his tutorial and everything went well with all my dependencies installed in my local machine while building the snap - Perfect.
Now, i am using snapcore/snapcraft docker image and try to build my snap without any local dependencies and so, i need to install them via parts or override-build if they are not available through a package manager like apt.
I am struggling to make my Catkin plugin find aravis when it is installed via another part and staged. I thought that the build phase from reader-worskpace would use the stage directory from aravis, maybe i am wrong.
Here is my snapcraft.yml:
name: dataset-collector
version: '0.2'
summary: Dataset collector.
description: |
This snap packages the dataset-collector to collect datas on a ship.
grade: stable
confinement: devmode
parts:
aravis:
plugin: autotools
source-type: tar
source: http://ftp.gnome.org/pub/GNOME/sources/aravis/0.5/aravis-0.5.12.tar.xz
build-packages:
- build-essential
- intltool
- libglib2.0-dev
- libxml2-dev
filesets:
include:
- ./include/*
lib:
- ./lib/*
organize:
./include/*: /usr/local/include
./lib/*: /usr/local/lib
stage:
- usr
reader-workspace:
plugin: catkin
rosdistro: kinetic
build-packages:
- wget
catkin-packages: [..., camera]
after: [aravis]
apps:
system:
command: roslaunch dataset_collector main_record.launch
plugs: [network, network-bind]
daemon: simple
As you can see i am trying to stage aravis in usr/ in the stage directory which works great but when catkin tries to find ARAVIS it only search for it in his part and so fails to build:
CMake Error at /root/ros_workspace/parts/reader-workspace/install/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find Aravis (missing: Aravis_INCLUDE_DIRS Aravis_LIBRARIES)
Call Stack (most recent call first):
/root/ros_workspace/parts/reader-workspace/install/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
CMakeModules/FindAravis.cmake:13 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:23 (find_package)
I did succeed to make it work with override-build by installing aravis in the reader-workspace part but i feel like it will be cleaner to have a part to build aravis.
Is it possible to access the stage directory from reader-workspace when it is building so that it finds aravis ?
Thanks.