Hello,
I am trying to snap AGS. I feel I am so close, but I can’t figure out what’s the difference between building my snap on my machine and on the snapcraft cloud.
I have ubuntu 16.04 on my machine and when I snapcraft from here, it works: https://github.com/ericoporto/ags-snap/releases
The snap built on the cloud doesn’t - has no sound, like it’s missing allegro alsa modules. This is the one submitted to the snap listing.
Sound settings: digital driver ID: 'Auto' (0xffffffff), MIDI driver ID: 'Auto' (0xffffffff)
ALSA lib dlmisc.c:254:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_pcm_pulse.so
ALSA lib rawmidi.c:286:(snd_rawmidi_open_noupdate) Unknown RawMidi default
Failed to init one of the drivers; Error: 'Insufficient digital voices available'.
Will try to start without MIDI
ALSA lib dlmisc.c:254:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_pcm_pulse.so
Failed to init one of the drivers; Error: 'Insufficient digital voices available'.
Will try to start without DIGI
ALSA lib rawmidi.c:286:(snd_rawmidi_open_noupdate) Unknown RawMidi default
Failed to init sound drivers. Error: Insufficient digital voices available
ALSA lib dlmisc.c:254:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_pcm_pulse.so
ALSA lib rawmidi.c:286:(snd_rawmidi_open_noupdate) Unknown RawMidi default
I looked both snaps through MELD and there are lot’s of differences that I can’t understand why they exist. One that caught my attention:
this one I fixed by adding cmake flags on my snapcraft.yaml when building allegro.
Also opengl related things in allegro are gone on the cloud built snap.
I think cmake just runs as it normally would instead of only having snap build environment access, which breaks a lot of things.
Also, organize really needs to be verbose on what it’s doing! One needs to look the logs and have enough information!
Also I know for environment variable for the running snap, these docs exist: https://docs.snapcraft.io/reference/env , but for the actual build time variable I had to read from the source here: https://github.com/snapcore/snapcraft/blob/master/snapcraft/internal/project_loader/_env.py (and actually I had to check the buid logs from the server to see which snapcraft is being used and then get the source from here https://github.com/snapcore/snapcraft/releases )
Current snapcraft.yaml: https://github.com/ericoporto/ags-snap/blob/master/snapcraft.yaml
Also, it would be good if snapcraft saved the used snapcraft.yaml inside of it so one can reproduce what he did that generated a working snap.