Hello !
I’m trying to build my first snap, and of course, it builds ok but it’s not running
I’m trying to enumerate the machine’s sound devices, using alsa (libasound2).
The enumeration goes well, but then I try to open the device to get its details, and that when the app fails
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /usr/share/alsa/alsa.conf
ALSA lib control.c:954:(snd_ctl_open_noupdate) Invalid CTL hw:0
Can't open card 0: No such file or directory
The error occurs when calling snd_ctl_open()
(at line 72 in src/ui/ui.c if you clone the repository).
I’m new to snaps, so I might have made something wrong. I’ve looked on this forum and stackoverflow and some random, probably outdated, blogposts, but I couldn’t make it work.
Here’s my snapcraft.yaml file :
name: picaster
version: "0.3-git"
summary: PiCaster
description: |
PiCaster is a podcast recording and streaming application,
easy to use for beginners, but with enough functionality
to suit the needs of intermediate or experienced podcasters.
confinement: devmode
apps:
picaster:
command: desktop-launch picaster
plugs: [alsa,pulseaudio,home,gsettings,x11,desktop,network,network-bind,removable-media]
grade: devel
parts:
picaster:
after: [desktop-gtk3]
plugin: autotools
source-type: git
source: https://github.com/picaster/picaster.git
build-packages:
- build-essential
- libgtk-3-dev
- libasound2-dev
stage-packages:
- libasound2
Should you want to compile the repo “by hand” :
sudo apt install build-essential libgtk-3-dev libasound2-dev
git clone https://github.com/picaster/picaster.git
cd picaster
autoreconf -fiv
./configure datadir=$(pwd)
make
Then run src/picaster
Thanks for your help !