I am trying to build a snap of vainfo (libva-utils) that has one library dependency: libva.
The pair builds just fine with autotools as non-snap. But with snapcraft I am having issues.
The snapcraft.yaml that I came up with:
name: vainfo
summary: Snap for libva utility.
description: |
Show libva information.
confinement: strict
base: core20
version: '0.1'
apps:
vainfo:
command: usr/bin/vainfo
parts:
libva:
source: https://github.com/intel/libva/archive/refs/tags/2.15.0.tar.gz
build-attributes:
- debug
plugin: autotools
build-packages:
- pkg-config
- libdrm-dev
- libwayland-dev
autotools-configure-parameters:
- --prefix=/usr
- --libdir=/usr/lib/$SNAPCRAFT_ARCH_TRIPLET
prime:
- usr/**/*.so*
va-utils:
source: https://github.com/intel/libva-utils/releases/download/2.15.0/libva-utils-2.15.0.tar.bz2
after: [libva]
build-attributes:
- debug
plugin: autotools
autotools-configure-parameters:
- --prefix=/usr
prime:
- usr/bin/vainfo
During the configuration step of va-utils, the va library is found without issue:
checking for LIBVA_DRM... yes
checking for DRM... yes
checking for LIBVA... yes
But when linking, libtool will complain about the library having been moved:
CCLD libva-display.la
libtool: warning: library '/root/stage/usr/lib/x86_64-linux-gnu/libva-drm.la' was moved.
libtool: warning: library '/root/stage/usr/lib/x86_64-linux-gnu/libva-wayland.la' was moved.
libtool: warning: library '/root/stage/usr/lib/x86_64-linux-gnu/libva.la' was moved.
And subsequently fails:
libtool: error: cannot find the library '/usr/lib/x86_64-linux-gnu/libva.la' or unhandled argument '/usr/lib/x86_64-linux-gnu/libva.la'
How come there is no /root/stage/
prefix for the link argument? And why does libtool give these warnings?
None of these warnings and errors occur if I do a regular autotools build.
Thanks!