ok I’ve built it in a LXD container, with the PPA and tested it on wayland and IT WORKS!
No idea how to solve the problem from the snapcraft.yaml file but anyway,
thank you very much for your precious help.
I am having exactly the same problem. The snap segfaults when using a normal cleanbuild
but works if I add the ubuntu-desktop/gnome-3-26
PPA to the the container I am building in.
Did you make any progress in adding this to the snapcraft.yml
?
@fiber, You can try the following, but it’s untested:
parts:
gnome-3-26:
plugin: nil
prepare: |
add-apt-repository -y ppa:ubuntu-desktop/gnome-3-26
apt-get update
apt-get upgrade -yqq
desktop-gtk3:
after: [gnome-3-26]
your-part:
after: [gnome-3-26, desktop-gtk3]
plugin: python
... # add the rest of your part here
Yes! This works, great. Thank you!
Is this still valid code? I get a
Failed to run ‘prepare’: Exit code was 127.
Build failed
on build.snapcraft.io
Can you paste some more of the log please? I suspect that there will be more information before telling you the command exited with a non-zero value.
Not sure it’s relevant but here it is:
…
x11proto-xf86vidmode-dev set to automatically installed.
x11proto-xinerama-dev set to automatically installed.
xkb-data set to automatically installed.
xorg-sgml-doctools set to automatically installed.
xtrans-dev set to automatically installed.
zlib1g-dev set to automatically installed.
Pulling gnome-3-26
‘desktop-gtk3’ has dependencies that need to be staged: gnome-3-26
Skipping pull gnome-3-26 (already ran)
Building gnome-3-26
/bin/sh: 27: add-apt-repository: not found
Downloading parts list
Downloading parts list
Downloading parts list
Downloading parts list
Downloading parts list
Downloading parts list
Downloading parts list
Downloading parts list
Downloading parts list
Downloading parts list
Downloading parts list
Downloading parts list
Downloading parts list
Downloading parts list
Downloading parts list
Downloading parts list
Downloading parts list
Downloading parts list
Downloading parts list
Failed to run ‘prepare’: Exit code was 127.
Build failed
Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py”, line 230, in run
self.pull()
File “/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py”, line 195, in pull
env=env)
File “/usr/lib/python2.7/dist-packages/lpbuildd/target/build_snap.py”, line 75, in run_build_command
return self.backend.run(args, env=full_env, **kwargs)
File “/usr/lib/python2.7/dist-packages/lpbuildd/target/lxd.py”, line 460, in run
subprocess.check_call(cmd, **kwargs)
File “/usr/lib/python2.7/subprocess.py”, line 541, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command ‘[‘lxc’, ‘exec’, ‘lp-xenial-amd64’, ‘–env’, ‘LANG=C.UTF-8’, ‘–env’, ‘SHELL=/bin/sh’, ‘–env’, ‘SNAPCRAFT_LOCAL_SOURCES=1’, ‘–env’, ‘SNAPCRAFT_SETUP_CORE=1’, ‘–env’, ‘SNAPCRAFT_BUILD_INFO=1’, ‘–env’, ‘SNAPCRAFT_IMAGE_INFO={“build_url”: “https://launchpad.net/~build.snapcraft.io/+snap/4693deb35635bb2d5506adcd3d58dae2-xenial/+build/374445”}’, ‘–env’, ‘SNAPCRAFT_BUILD_ENVIRONMENT=host’, ‘–env’, ‘http_proxy=http://10.10.10.1:8222/’, ‘–env’, ‘https_proxy=http://10.10.10.1:8222/’, ‘–env’, ‘GIT_PROXY_COMMAND=/usr/local/bin/snap-git-proxy’, ‘–’, ‘/bin/sh’, ‘-c’, ‘cd /build/hellowayland && linux64 snapcraft pull’]’ returned non-zero exit status 2
Revoking proxy token…
RUN: /usr/share/launchpad-buildd/slavebin/in-target scan-for-processes --backend=lxd --series=xenial --arch=amd64 SNAPBUILD-374445
Scanning for processes to kill in build SNAPBUILD-374445
this is the line with the error:
You need to add a build-package
for software-properties-common
to make that command available.
And while you’re at it, for future compatibility change prepare
to override-pull
.
Should I include the software-properties-common on the stage-packages or on the overide-pull part?
this is my current yaml
name: hellowayland
version: 'master'
summary: Test python3 with gtk3 in a snap on wayland
description: |
This snap tests a helloworld program written in python3 and Gtk3 on Wayland
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots
apps:
hellowayland:
command: desktop-launch $SNAP/bin/hellowayland
plugs: [x11, unity7, wayland, desktop]
parts:
gnome-3-26:
plugin: nil
override-pull: |
apt-get install software-properties-common -y
add-apt-repository -y ppa:ubuntu-desktop/gnome-3-26
apt-get update
apt-get upgrade -yqq
desktop-gtk3:
after: [gnome-3-26]
hellowayland:
after: [gnome-3-26, desktop-gtk3]
source: .
# See 'snapcraft plugins'
plugin: python
stage-packages:
- python3-gi
- libcanberra-gtk3-module
- gir1.2-gtk-3.0
[[Edit 1]]
Sorry, i forgot to push.
[[EDIT2]]
I get this
Fetched 17.0 MB in 6s (1428 kB/s)
The package libgdk-pixbuf2.0-0 has unmet dependencies:
Build failed
do you happen to know which dependencies I’m missing?
It finally build, here’s my yaml
name: hellowayland
version: 'master'
summary: Test python3 with gtk3 in a snap on wayland
description: |
This snap tests a helloworld program written in python3 and Gtk3 on Wayland
architectures:
- amd64
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots
apps:
hellowayland:
command: desktop-launch $SNAP/bin/hellowayland
plugs: [x11, unity7, wayland, desktop]
parts:
gnome-3-26:
plugin: nil
override-pull: |
apt-get install software-properties-common -y
add-apt-repository -y ppa:ubuntu-desktop/gnome-3-26
apt-get update
apt-get upgrade -yqq
desktop-gtk3:
after: [gnome-3-26]
hellowayland:
after: [gnome-3-26, desktop-gtk3]
source: .
# See 'snapcraft plugins'
plugin: python
stage-packages:
- python3-gi
- libcanberra-gtk3-module
- gir1.2-gtk-3.0
- libgdk-pixbuf2.0-0
- libgdk-pixbuf2.0-dev
Is the gnome-3-26 repository still needed with core18?