I’ve tried to package prebuilt binaries with their dependencies. I managed to make the program runs, but
it shows warnings and terminated in some circumstances. I am not sure if these issues are related.
The program has to be run with sudo. Otherwise, it will show error messages and terminated.
dbus: arguments to dbus_message_new_method_call() were incorrect, assertion "path != NULL" failed in file ../../../dbus/dbus-message.c line 1362.
This is normally a bug in some application using the D-Bus library.
D-Bus not built with -rdynamic so unable to print a backtrace Aborted (core dumped)
When I tried to load a file with the program, the warning message will pop up in the terminal like the one below after the file dialog is opened.
(molflow:19041): dconf-WARNING **: 11:57:54.889: failed to commit changes to dconf: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ExecFailed: Failed to execute program ca.desrt.dconf: No such file or directory
Once I selected the file in the file dialog and try to load a file, the program terminated with error messages and terminated.
terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error' what(): filesystem error: cannot create directory: Read-only file system [tmp]
This is my first time using snapcraft, so I am pretty sure there must be a lot of things that can be improved. Any other suggestions will be very welcome!
name: molflow # you probably want to 'snapcraft register <name>' base: core18 # the base snap is the execution environment for this snap version: '2.7.7' # just for humans, typically '1.2+git' or '1.3.2' summary: Single-line elevator pitch for your amazing snap # 79 char long summary description: | This is my-snap's description. You have a paragraph or two to tell the most important story about your snap. Keep it under 100 words though, we live in tweetspace and your description wants to look good in the snap store. grade: devel # must be 'stable' to release into candidate/stable channels confinement: devmode # use 'strict' once you have the right plugs and slots apps: my-part: command: molflow_linux_debian_$SNAPCRAFT_PROJECT_VERSION/molflow extensions: [gnome-3-28] plugs: [desktop, desktop-legacy, home, opengl, x11, wayland, gsettings] slots: [dbus-daemon] environment: LD_LIBRARY_PATH: "$LD_LIBRARY_PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio:$SNAP/lib:$SNAP/usr/lib:$SNAP/lib/x86_64-linux-gnu:$SNAP/usr/lib/x86_64-linux-gnu:$SNAP/usr/lib/x86_64-linux-gnu/mesa-egl:$SNAP/usr/lib/x86_64-linux-gnu/mesa" MESA_GLSL_CACHE_DIR: "$SNAP_USER_DATA" LIBGL_DRIVERS_PATH: "$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/dri" parts: my-part: # See 'snapcraft plugins' plugin: dump stage-packages: [libpulse0, libcurl4-gnutls-dev, libpng-dev, libsdl2-2.0-0, libgtk-3-bin,freeglut3-dev, mesa-utils,gsl-bin, libatlas-base-dev, curl,xauth, xorg, openbox, libgl1-mesa-dri, dbus-x11] source: https://molflow.web.cern.ch/sites/molflow.web.cern.ch/files/molflow_linux_debian/molflow_linux_debian_2.7.7.zip override-build: | snapcraftctl build chmod +x $SNAPCRAFT_PART_INSTALL/molflow_linux_debian_$SNAPCRAFT_PROJECT_VERSION/molflow chmod +x $SNAPCRAFT_PART_INSTALL/molflow_linux_debian_$SNAPCRAFT_PROJECT_VERSION/7za chmod +x $SNAPCRAFT_PART_INSTALL/molflow_linux_debian_$SNAPCRAFT_PROJECT_VERSION/compress slots: dbus-daemon: interface: dbus bus: session name: org.molflow