I want to pack this application
It is a JVM application that uses Gradle as a build system.
To do so, I followed the documentation found here https://snapcraft.io/docs/java-applications
After some time struggling with symlinks, I managed to snap it, however, with a lot of errors like
/bin/bash: /snap/core18/current/lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /bin/bash)
I don’t have experience packaging snaps. And I don’t know exactly what to do at this point.
More information for context:
Here is my manifest file:
Here is the log from when I built the snap. I’m building using
snapcraft --destructive-mode since um building on a virtual machine.
Here is the log from when I run the snap. Running using
game-outlet directly on the terminal.
The application is available here. This application was built using the Snapcraft integration with Github.
Info about my environment
- Snapcraft version: 7.4.3
- OS: Ubuntu arm64. On a QEMU virtual machine. Running on a MacOS host
Could you please help me to understand what I am doing wrong?
how do you actually build the snap ? i.e. what is the call to snapcraft you use (this is missing in your paste) …
also, what snapcraft version do you use ?
I edited the post adding the information
okay … what ubuntu release do you run inside the qemu VM ?
note that this needs to match what you picked as
base: in your snapcraft.yaml when using
so for a core18 based snap it needs to be 18.04, core20 → 20.04, core22 … guess
It makes sense! Im running a base18 on a ubuntu 22, so that’s why im having these problems. I rewrote the manifest using core22. And it worked partially. Thank you for the hint.
Now I’m having another problem not related to de core.
My application needs to create a SQLite database file. I tried to create in $HOME/.config but the snap can’t access the home folder. I tried in /var but it didn’t work. What would be a good folder to store a database file?
You should be able to configure the snap to use the home interface if you want to store the database file there.
Alternatively, perhaps one of the desktop interfaces could be used to store the database file in a conventional location.
note though that the home interface does not allow access to hidden directories (i.e. the ones starting with a dot, like $HOME/.config)
at runtime your snap has the $SNAP_USER_DATA and $SNAP_USER_COMMON environment variables set that point to writable places inside the users home dir (
~/snap/<snapname>/common), both dirs should be writable by the user and do not require any extra interfaces.
for a SQLite DB i’d use $SNAP_USER_COMMON here …