my snapcraft.yml
name: myapp
base: core18
version: '0.1'
summary: myapp asdfasdfasdf
description: |
myapp asdfasdfasdf
grade: devel
confinement: devmode
apps:
myapp:
command: myapp
plugs:
- network
- network-bind
- home
- desktop
- desktop-legacy
extensions: [gnome-3-34]
parts:
lib:
plugin: nil
source: .
override-build: |
apt-get install software-properties-common -yu
echo "asdfasdf 1"
add-apt-repository -yu ppa:ubuntu-toolchain-r/test
echo "asdfasdf 2"
touch lib.sh
stage-packages:
- libnss3
- libnspr4
# need newer lib, core20 does not support gnome extension yet, therefore using core18 and staging newer std lib
# - libstdc++6
exe:
plugin: nil
source: .
after: [lib]
override-build: |
touch myapp
chmod +x myapp
cp myapp $SNAPCRAFT_PART_INSTALL/.
my log:
gocarlos@gocarlos-CELSIUS-H760:~/git/projectx/apps/myapp$ snapcraft
Launching a VM.
Running with 'sudo' may cause permission errors and is discouraged. Use 'sudo' when cleaning.
snapd is not logged in, snap install commands will use sudo
snap "core18" has no updates available
Skipping pull lib (already ran)
'exe' has dependencies that need to be staged: lib
Skipping pull lib (already ran)
Building lib
Reading package lists... Done
Building dependency tree
Reading state information... Done
software-properties-common is already the newest version (0.96.24.32.14).
The following packages were automatically installed and are no longer required:
cpp cpp-7 gcc gcc-7 gcc-7-base grub-pc-bin libasan4 libatomic1 libcc1-0 libcilkrts5 libgcc-7-dev libgomp1 libisl19 libitm1 liblsan0 libmpc3 libmpx2 libquadmath0 libtsan0 libubsan0
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
asdfasdf 1
Segmentation fault (core dumped)
Failed to run 'override-build': Exit code was 139.
Run the same command again with --debug to shell into the environment if you wish to introspect this failure.
basically it seems like add-apt-repository -yu ppa:ubuntu-toolchain-r/test
cannot be executed…
I need this because core20 still not supporting gnome extension and my app needs a newer libstdc++
if I remove extensions: [gnome-3-34]
then the app builds again fine… though this is needed because I actually building a GUI app