Review of build-packages vs stage-packages for mumble snap

Good day all,

Just working through the mumble snap, and from what I can see, the dependencies are pretty much all build related. Was just hoping for a second set of eyes to confirm that none of the packages should be added to stage-packages instead.

Appreciated.

name: mumble # you probably want to 'snapcraft register <name>'
version: '1.2.19-git' # just for humans, typically '1.2+git' or '1.3.2'
summary: Mumble is an open source, low-latency, high quality voice chat software. # 79 char long summary
description: |
  Mumble is a voice chat application for groups. While it can be used for any kind of activity, it is primarily intended for gaming. It can be compared to programs like Ventrilo or TeamSpeak. People tend to simplify things, so when they talk about Mumble they either talk about "Mumble" the client application or about "Mumble & Murmur" the whole voice chat application suite.
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots

apps:
  mumble:
    command: bin/mumble
parts:
  mumble:
    source: https://github.com/mumble-voip/mumble.git
    source-tag: 1.2.19
    # See 'snapcraft plugins'
    plugin: qmake
    qt-version: qt4
    options:
      - CONFIG+=no-server -recursive
    project-files:
      - "main.pro"
    build-packages:
      - build-essential
      - pkg-config
      - qt4-dev-tools
      - libqt4-dev
      - libspeex1
      - libspeex-dev
      - libboost-dev
      - libasound2-dev
      - libssl-dev
      - libspeechd-dev
      - libzeroc-ice-dev
      - libpulse-dev
      - libcap-dev
      - libprotobuf-dev
      - protobuf-compiler
      - libogg-dev
      - libavahi-compat-libdnssd-dev
      - libsndfile1-dev
      - libg15daemon-client-dev
      - libxi-dev

Also thanks to @kyrofa for the extra hand-holding and explanation in rocket regarding dependencies and how they work.

I can see that no one has answered you yet and I was wondering the same thing regarding my snaps.

I wanted to keep your post alive and was also wondering if you’d found the answer?

It’s difficult to know for sure, but yes, as a general rule having -dev packages in build-packages should work thanks to Snapcraft’s library crawling functionality. However, that won’t work for things loaded at runtime, e.g. plugins. Note also that it’s the current plan for this behavior to be removed in Snapcraft v3 (it’s a bit too magical and unreliable), so you might consider going through the exercise of staging the packages you know you require.

1 Like

The standard answer is basically ‘build it and see’. Use snapcraft cleanbuild to build in a container, then install that snap and run it - snap run foo and see what works and what doesn’t. In many cases the app will flat out fail to launch if a library is missing. In some other cases it may launch but features don’t work. So test it, and see what does/doesn’t work, and see what errors you get.

Anything stopping either of you doing that?

1 Like

Nothing stopped me. So, I guess I was on the right track in terms of blind experimentation.

My confusion lay in the ambiguity of the labels (stage and build). I think I do understand them (build are build deps and stage are runtime deps). But then again, I don’t know as I’ve played around with a number of configurations and the snap will either build and not run or not build at all.

This is of course based on PAST experience as my latest snap (the one I had in mind when posting my response) has successfully built and run.

Just for the sake of others who are looking for the answers to this question, am I right about the labels?

My gosh…

When running outside of --devmode I get Bad system call.

I’m not getting any other output. No error messages, nothing.

that’s a seccomp denial for listen on a socket. Try adding network-bind to plugs:

= Seccomp =
Time: Sep 27 16:39:22
Log: auid=1000 uid=1000 gid=1000 ses=2 pid=27838 comm="clementine" exe="/snap/clementine-snap/x3/bin/clementine" sig=31 arch=c000003e 50(listen) compat=0 ip=0x7f9ab88291d7 code=0x0
Syscall: listen
Suggestion:
* add one of 'browser-support, libvirt, network-bind' to 'plugs'
1 Like

Yep!! That was IT. Thanks! I can’t tell you how stoked I am that this is finally working! Now, it’s time for real-world testing.

Sorry, just realized I was posting to the wrong thread. Will copy and paste these responses to the correct one.

See: Snap works on one machine but not on another