patchelf warning / binary segfaults
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
New
|
Undecided
|
Unassigned |
Bug Description
Hi,
I'm trying to snap telegraf (https:/
At the prime step, I get the following messages:
[...]
Priming telegraf
patchelf: cannot find section ''
Failed to update '/home/
Snapping 'telegraf' -
Snapped telegraf_
After installing and running the snap, it quickly enters Failed state (inactive (dead) (Result: core-dump)).
syslog messages: https:/
dmesg: https:/
systemd service configuration (automatically generated): https:/
snapcraft file: https:/
This is using the stable snapcraft snap, 2.39.2 rev 1177 at the moment.
The same problem does not happen with snapcraft 2.34+17.10 (deb from archives on an artful machine).
This look very similar to lp:1736861, which is 'fix released'.
I tried using snapcraft from --channel edge/patchelf-go. Got a warning:
Files in this part are going to be patched to execute correctly on diverse environments.
To disable this behavior set `build-attributes: [no-patchelf]` for the part.
After adding `build-attributes: [no-patchelf]` the snap built and ran successfully, but I'm pretty sure the patchelf step is needed for the snap to run correctly on all the machines where it should be able to.
Thanks.
Hi there, you are no worse situation than you were before. If you are building off of xenial you should be generally ok as long as you do not use CGO as the interpreter is pretty much stable in the world we live today.
Going back to the released deb (2.35 or previous) will lead to the same result, a snap for go that wouldn't work entirely correct on classic.
That said, can I ask you to try the latest snapcraft on the `edge` channel as we have added a work around for golang base parts (it will not be bullet proof).
Alternatively, if you have linker/elf experience, I would invite you to fix this patchelf problem upstream.
Thanks for the report.