I have had some discussion with @elopio within Rocketchat, but thought maybe I should move the larger discussion into the forum for greater visibility.
I’m working on the Mumble snap (Repo Here), and have been running into some issues running the snapcraft cleanbuild command.
Error:
make[1]: Entering directory '/build_mumble/parts/mumble/build/src/mumble'
make -f Makefile.Release
make[2]: Entering directory '/build_mumble/parts/mumble/build/src/mumble'
protoc --cpp_out=. -I. -I.. ../../../src/src/Mumble.proto
/usr/lib/x86_64-linux-gnu/qt4/bin/uic ../../../src/src/mumble/ConfigDialog.ui -o ui_ConfigDialog.h
/usr/lib/x86_64-linux-gnu/qt4/bin/uic ../../../src/src/mumble/MainWindow.ui -o ui_MainWindow.h
/usr/lib/x86_64-linux-gnu/qt4/bin/uic ../../../src/src/mumble/ConnectDialogEdit.ui -o ui_ConnectDialogEdit.h
../../../src/src/Mumble.proto: File does not reside within any path specified using --proto_path (or -I). You must specify a --proto_path which encompasses this file. Note that the proto_path must be an exact prefix of the .proto file names -- protoc is too dumb to figure out when two paths (e.g. absolute and relative) are equivalent (it's harder than you think).
Makefile.Release:440: recipe for target 'Mumble.pb.cc' failed
make[2]: *** [Mumble.pb.cc] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/build_mumble/parts/mumble/build/src/mumble'
Makefile:34: recipe for target 'release' failed
make[1]: *** [release] Error 2
make[1]: Leaving directory '/build_mumble/parts/mumble/build/src/mumble'
Makefile:189: recipe for target 'sub-src-mumble-make_default-ordered' failed
make: *** [sub-src-mumble-make_default-ordered] Error 2
Command '['/bin/sh', '/tmp/tmpgiqxzrmm', 'make', '-j4']' returned non-zero exit status 2
It seems like the protobuf patch isn’t working correctly, or I applied it incorrectly.
Yes, you can remove the patches part now, and remove the patch file.
This is something that needs to be fixed in snapcraft.
I don’t understand your last question, we are not copying any new files. The trick was to remove the project-files, which is not needed anyway because qmake will use it even if not specified. Then the build steps runs everything from the src dir and it works. The snapcraft bug is that it should run everything from the build dir.
Ah, yes, that part. Their qmake file leaves the compiled files in the release directory. Some projects, like this one, don’t have a proper install task.
So we need to move the files from the release dir, to the directory that will be copied inside the snap. That directory is parts/mumble/install, or $SNAPCRAFT_PART_INSTALL. Everything you put in there will end up in the snap. If you don’t put anything in there, the snap will be empty.
Lots of edge cases to learn. There seems to be a variety of ways to accomplish things within the snap ecosystem. Is there somewhere to read up on all of these things? For example I was trying look up and read up on things like “SNAPCRAFT_PART_INSTALL”.
I think this is fixed now with this PR. I can’t test it here because I’m on a network which blocks ports. The application launches, and goes through the audio wizard fine, presents an indicator and operates as I expect mumble to work.