LD_LIBRARY_PATH in classic snap

So the problems might be two.
The first is the one you pointed out…
(we reexec to set the euid to set root…how is root set in snapcraft?)
The other issue seems to be with the requests library…
The segfault happens just after a requests log (without a reexec in this case):
“INFO: Starting new HTTPS connection (1): golang.org

@sergiusens
I updated the branch with the changes…
Now the re-exec is handled in the code…
The issue that remains now is with the requests module I think

libgirepository is needed as we are using glib for gsettings and other GNOME technology to integrate with the platform.

I added a condition in the re-exec:

if os.getenv(“SNAP”):
logger.debug(“Found snap environment. Running correct python version”)
cmd.extend(["{}/usr/bin/python3".format(os.getenv(“SNAP”))])

This takes care of the re-exec, calling the necessary python binary

Now the issue seems to still be with the requests module

I tried to enable the debug logging for the requests and http modules with this:

import http.client as http_client
http_client.HTTPConnection.debuglevel = 1

requests_log = logging.getLogger(“requests.packages.urllib3”)
requests_log.setLevel(logging.DEBUG)
requests_log.propagate = True

Outside the snap I get:

DEBUG: Starting new HTTPS connection (1): golang.org
send: b’GET /dl/ HTTP/1.1\r\nHost: golang.org\r\nUser-Agent: python-requests/2.18.4\r\nAccept-Encoding: gzip, deflate\r\nAccept: /\r\nConnection: keep-alive\r\n\r\n’
reply: ‘HTTP/1.1 200 OK\r\n’

In the snap:

INFO: Starting new HTTPS connection (1): golang.org
Segmentation fault (core dumped)

Can you share the actual snap?

The yaml is in the github repo: https://github.com/ubuntu/ubuntu-make/blob/patch_snap/snap/snapcraft.yaml
The only change I made now is the patches. I can remove the python patch since strace shows that the correct paths are used

Can you not release the snap you built onto a channel branch? snapcraft push <snap-file> --release edge/ld-path or another name different than ld-path?

@didrocks is the owner of the snap channel
and it’s automated, from the master branch.
I can link to the .snap I built locally if you can test it…

EDIT: not locally…via cleanbuild

This is the snap: https://www.dropbox.com/s/kgl94eu50emnt3y/ubuntu-make_master_amd64.snap?dl=0

Apparently I can still push manually…
pushing now!

And done.
Revision 275 is the manually uploaded one

@sergiusens
Did you manage to look at the snap now that it’s in the edge channel?

Hi! Just writing here since I’m not sure this needs a full new thread…
The new snap pushed to the edge channel works, but it’s built on core18
When will it be possible to build on core18 in build.snapcraft.io?