This requires GLFW >=3.2, (glfwWaitEventsTimeout is a new function in GLFW 3.2) which I suppose is not available on 16.04. I myself built this on 17.04.
I have:
- Updated the program to use glfwWaitEvents instead of glfwWaitEventsTimeOut so it would work with older GLFW3 which should be available on Ubuntu 16.04
- Updated snapcraft.yaml to include build-essential build package
- Pushed the commit so you can try it now
I could not get it to work. It stops when it tries to launch LXD/LXC/whatever that is. Errorlog:
Waiting for a network connection...
Traceback (most recent call last):
File "/usr/lib/python3.5/urllib/request.py", line 1254, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "/usr/lib/python3.5/http/client.py", line 1106, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
self.endheaders(body)
File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
self.send(msg)
File "/usr/lib/python3.5/http/client.py", line 877, in send
self.connect()
File "/usr/lib/python3.5/http/client.py", line 849, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/lib/python3.5/socket.py", line 693, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/usr/lib/python3.5/socket.py", line 732, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.5/urllib/request.py", line 466, in open
response = self._open(req, data)
File "/usr/lib/python3.5/urllib/request.py", line 484, in _open
'_open', req)
File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
result = func(*args)
File "/usr/lib/python3.5/urllib/request.py", line 1282, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/usr/lib/python3.5/urllib/request.py", line 1256, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
Traceback (most recent call last):
File "/usr/lib/python3.5/urllib/request.py", line 1254, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "/usr/lib/python3.5/http/client.py", line 1106, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
self.endheaders(body)
File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
self.send(msg)
File "/usr/lib/python3.5/http/client.py", line 877, in send
self.connect()
File "/usr/lib/python3.5/http/client.py", line 849, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/lib/python3.5/socket.py", line 693, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/usr/lib/python3.5/socket.py", line 732, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.5/urllib/request.py", line 466, in open
response = self._open(req, data)
File "/usr/lib/python3.5/urllib/request.py", line 484, in _open
'_open', req)
File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
result = func(*args)
File "/usr/lib/python3.5/urllib/request.py", line 1282, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/usr/lib/python3.5/urllib/request.py", line 1256, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
Traceback (most recent call last):
File "/usr/lib/python3.5/urllib/request.py", line 1254, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "/usr/lib/python3.5/http/client.py", line 1106, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
self.endheaders(body)
File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
self.send(msg)
File "/usr/lib/python3.5/http/client.py", line 877, in send
self.connect()
File "/usr/lib/python3.5/http/client.py", line 849, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/lib/python3.5/socket.py", line 693, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/usr/lib/python3.5/socket.py", line 732, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.5/urllib/request.py", line 466, in open
response = self._open(req, data)
File "/usr/lib/python3.5/urllib/request.py", line 484, in _open
'_open', req)
File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
result = func(*args)
File "/usr/lib/python3.5/urllib/request.py", line 1282, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/usr/lib/python3.5/urllib/request.py", line 1256, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
Traceback (most recent call last):
File "/usr/lib/python3.5/urllib/request.py", line 1254, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "/usr/lib/python3.5/http/client.py", line 1106, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
self.endheaders(body)
File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
self.send(msg)
File "/usr/lib/python3.5/http/client.py", line 877, in send
self.connect()
File "/usr/lib/python3.5/http/client.py", line 849, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/lib/python3.5/socket.py", line 693, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/usr/lib/python3.5/socket.py", line 732, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.5/urllib/request.py", line 466, in open
response = self._open(req, data)
File "/usr/lib/python3.5/urllib/request.py", line 484, in _open
'_open', req)
File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
result = func(*args)
File "/usr/lib/python3.5/urllib/request.py", line 1282, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/usr/lib/python3.5/urllib/request.py", line 1256, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
Traceback (most recent call last):
File "/usr/lib/python3.5/urllib/request.py", line 1254, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "/usr/lib/python3.5/http/client.py", line 1106, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
self.endheaders(body)
File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
self.send(msg)
File "/usr/lib/python3.5/http/client.py", line 877, in send
self.connect()
File "/usr/lib/python3.5/http/client.py", line 849, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/lib/python3.5/socket.py", line 693, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/usr/lib/python3.5/socket.py", line 732, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.5/urllib/request.py", line 466, in open
response = self._open(req, data)
File "/usr/lib/python3.5/urllib/request.py", line 484, in _open
'_open', req)
File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
result = func(*args)
File "/usr/lib/python3.5/urllib/request.py", line 1282, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/usr/lib/python3.5/urllib/request.py", line 1256, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
Stopping local:snapcraft-surely-fresh-corgi
Traceback (most recent call last):
File "/usr/bin/snapcraft", line 11, in <module>
load_entry_point('snapcraft==2.34+17.4', 'console_scripts', 'snapcraft')()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 561, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2631, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2291, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2297, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3/dist-packages/snapcraft/cli/__main__.py", line 19, in <module>
run(prog_name='snapcraft')
File "/usr/lib/python3/dist-packages/click/core.py", line 716, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3/dist-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3/dist-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python3/dist-packages/snapcraft/cli/lifecycle.py", line 188, in cleanbuild
lifecycle.cleanbuild(project_options, remote)
File "/usr/lib/python3/dist-packages/snapcraft/internal/lifecycle.py", line 326, in cleanbuild
metadata=config.get_metadata(), remote=remote).execute()
File "/usr/lib/python3/dist-packages/snapcraft/internal/lxd.py", line 147, in execute
self._wait_for_network()
File "/usr/lib/python3/dist-packages/snapcraft/internal/lxd.py", line 275, in _wait_for_network
raise e
File "/usr/lib/python3/dist-packages/snapcraft/internal/lxd.py", line 270, in _wait_for_network
self._container_run(['python3', '-c', _NETWORK_PROBE_COMMAND])
File "/usr/lib/python3/dist-packages/snapcraft/internal/lxd.py", line 113, in _container_run
check_call(['lxc', 'exec', self._container_name, '--'] + cmd)
File "/usr/lib/python3.5/subprocess.py", line 271, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['lxc', 'exec', 'local:snapcraft-surely-fresh-corgi', '--', 'python3', '-c', 'import urllib.request; urllib.request.urlopen("http://start.ubuntu.com/connectivity-check.html", timeout=5)']' returned non-zero exit status 1
I have internet connection, I don’t know what happened. Anyway, since as you said it only complained about gcc (which you fixed) and glfwWaitEventsTimeout (which I removed), maybe it will work for you.
I did what you said. Here’s the output:
> sudo snappy-debug.security scanlog
kernel.printk_ratelimit = 0
= AppArmor =
Time: Oct 17 21:06:11
Log: apparmor="ALLOWED" operation="open" profile="snap.stopwatch.stopwatch" name="/sys/devices/pci0000:00/0000:00:02.0/revision" pid=11255 comm="stopwatch" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
File: /sys/devices/pci0000:00/0000:00:02.0/revision (read)
Suggestion:
* adjust program to not access '/sys/devices/pci0000:00/0000:00:02.0/revision'
= AppArmor =
Time: Oct 17 21:06:11
Log: apparmor="ALLOWED" operation="open" profile="snap.stopwatch.stopwatch" name="/sys/devices/pci0000:00/0000:00:02.0/revision" pid=11255 comm="stopwatch" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
File: /sys/devices/pci0000:00/0000:00:02.0/revision (read)
Suggestion:
* adjust program to not access '/sys/devices/pci0000:00/0000:00:02.0/revision'
= AppArmor =
Time: Oct 17 21:06:11
Log: apparmor="ALLOWED" operation="open" profile="snap.stopwatch.stopwatch" name="/sys/devices/pci0000:00/0000:00:02.0/revision" pid=11255 comm="stopwatch" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
File: /sys/devices/pci0000:00/0000:00:02.0/revision (read)
Suggestion:
* adjust program to not access '/sys/devices/pci0000:00/0000:00:02.0/revision'
= AppArmor =
Time: Oct 17 21:06:11
Log: apparmor="ALLOWED" operation="open" profile="snap.stopwatch.stopwatch" name="/sys/devices/pci0000:00/0000:00:02.0/revision" pid=11255 comm="stopwatch" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
File: /sys/devices/pci0000:00/0000:00:02.0/revision (read)
Suggestion:
* adjust program to not access '/sys/devices/pci0000:00/0000:00:02.0/revision'
= AppArmor =
Time: Oct 17 21:06:11
Log: apparmor="ALLOWED" operation="open" profile="snap.stopwatch.stopwatch" name="/sys/devices/pci0000:00/0000:00:02.0/revision" pid=11255 comm="stopwatch" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
File: /sys/devices/pci0000:00/0000:00:02.0/revision (read)
Suggestion:
* adjust program to not access '/sys/devices/pci0000:00/0000:00:02.0/revision'
= AppArmor =
Time: Oct 17 21:06:11
Log: apparmor="ALLOWED" operation="open" profile="snap.stopwatch.stopwatch" name="/sys/devices/pci0000:00/0000:00:02.0/revision" pid=11255 comm="stopwatch" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
File: /sys/devices/pci0000:00/0000:00:02.0/revision (read)
Suggestion:
* adjust program to not access '/sys/devices/pci0000:00/0000:00:02.0/revision'
= AppArmor =
Time: Oct 17 21:06:11
Log: apparmor="ALLOWED" operation="open" profile="snap.stopwatch.stopwatch" name="/sys/devices/pci0000:00/0000:00:02.0/revision" pid=11255 comm="stopwatch" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
File: /sys/devices/pci0000:00/0000:00:02.0/revision (read)
Suggestion:
* adjust program to not access '/sys/devices/pci0000:00/0000:00:02.0/revision'
= AppArmor =
Time: Oct 17 21:06:11
Log: apparmor="ALLOWED" operation="open" profile="snap.stopwatch.stopwatch" name="/sys/devices/pci0000:00/0000:00:02.0/revision" pid=11255 comm="stopwatch" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
File: /sys/devices/pci0000:00/0000:00:02.0/revision (read)
Suggestion:
* adjust program to not access '/sys/devices/pci0000:00/0000:00:02.0/revision'
= AppArmor =
Time: Oct 17 21:14:23
Log: apparmor="DENIED" operation="file_inherit" namespace="root//lxd-snapcraft-surely-fresh-corgi_<var-lib-lxd>" profile="/sbin/dhclient" name="/run/systemd/journal/stdout" pid=11932 comm="dhclient" requested_mask="wr" denied_mask="wr" fsuid=165536 ouid=165536
File: /run/systemd/journal/stdout (write)
Suggestions:
* adjust program to use $SNAP_DATA
* adjust program to use /run/shm/snap.$SNAP_NAME.*
= AppArmor =
Time: Oct 17 21:14:23
Log: apparmor="DENIED" operation="file_inherit" namespace="root//lxd-snapcraft-surely-fresh-corgi_<var-lib-lxd>" profile="/sbin/dhclient" name="/run/systemd/journal/stdout" pid=11932 comm="dhclient" requested_mask="wr" denied_mask="wr" fsuid=165536 ouid=165536
File: /run/systemd/journal/stdout (write)
Suggestions:
* adjust program to use $SNAP_DATA
* adjust program to use /run/shm/snap.$SNAP_NAME.*