← Back to issue list

Snapcraft snap doesn't work natively on trusty

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1723208
Type
issue
State
closed
Author
~kyrofa
Labels
—
Created
Updated
Closed

Current evaluation

Fixed Trusty classic-snap builds by preventing bundled-library LD_LIBRARY_PATH values from leaking into build commands; merged in snapcore/snapcraft#1635 as da9181487.

Resolution: closed resolved

Reason: The root cause was identified as a leaking LD_LIBRARY_PATH rather than RPATH handling. Pull request snapcore/snapcraft#1635 removed the leak and was merged as commit da9181487.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Try building the opencv demo. It bombs out with: cmake: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /snap/snapcraft/501/usr/lib/x86_64-linux-gnu/libicuuc.so.55) Traceback (most recent call last):   File "/snap/snapcraft/501/bin/snapcraft", line 11, in <module>     load_entry_point('snapcraft==2.34', 'console_scripts', 'snapcraft')()   File "/snap/snapcraft/501/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 565, in load_entry_point     return get_distribution(dist).load_entry_point(group, name)   File "/snap/snapcraft/501/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2631, in load_entry_point     return ep.load()   File "/snap/snapcraft/501/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2291, in load     return self.resolve()   File "/snap/snapcraft/501/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2297, in resolve     module = __import__(self.module_name, fromlist=['__name__'], level=0)   File "/snap/snapcraft/501/lib/python3.6/site-packages/snapcraft/cli/__main__.py", line 19, in <module>     run(prog_name='snapcraft')   File "/snap/snapcraft/501/lib/python3.6/site-packages/click/core.py", line 722, in __call__     return self.main(*args, **kwargs)   File "/snap/snapcraft/501/lib/python3.6/site-packages/click/core.py", line 697, in main     rv = self.invoke(ctx)   File "/snap/snapcraft/501/lib/python3.6/site-packages/click/core.py", line 1043, in invoke     return Command.invoke(self, ctx)   File "/snap/snapcraft/501/lib/python3.6/site-packages/click/core.py", line 895, in invoke     return ctx.invoke(self.callback, **ctx.params)   File "/snap/snapcraft/501/lib/python3.6/site-packages/click/core.py", line 535, in invoke     return callback(*args, **kwargs)   File "/snap/snapcraft/501/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func     return f(get_current_context(), *args, **kwargs)   File "/snap/snapcraft/501/lib/python3.6/site-packages/snapcraft/cli/__init__.py", line 110, in run     ctx.forward(lifecyclecli.commands['snap'])   File "/snap/snapcraft/501/lib/python3.6/site-packages/click/core.py", line 553, in forward     return self.invoke(cmd, **kwargs)   File "/snap/snapcraft/501/lib/python3.6/site-packages/click/core.py", line 535, in invoke     return callback(*args, **kwargs)   File "/snap/snapcraft/501/lib/python3.6/site-packages/snapcraft/cli/lifecycle.py", line 132, in snap     project_options, directory=directory, output=output)   File "/snap/snapcraft/501/lib/python3.6/site-packages/snapcraft/internal/lifecycle.py", line 349, in snap     execute('prime', project_options)   File "/snap/snapcraft/501/lib/python3.6/site-packages/snapcraft/internal/lifecycle.py", line 130, in execute     _Executor(config, project_options).run(step, part_names)   File "/snap/snapcraft/501/lib/python3.6/site-packages/snapcraft/internal/lifecycle.py", line 225, in run     self._run_step(step, part, part_names)   File "/snap/snapcraft/501/lib/python3.6/site-packages/snapcraft/internal/lifecycle.py", line 262, in _run_step     getattr(part, step)()   File "/snap/snapcraft/501/lib/python3.6/site-packages/snapcraft/internal/pluginhandler/__init__.py", line 330, in build     self.plugin.build()   File "/snap/snapcraft/501/lib/python3.6/site-packages/snapcraft/plugins/cmake.py", line 80, in build     self.options.configflags, env=env)   File "/snap/snapcraft/501/lib/python3.6/site-packages/snapcraft/_baseplugin.py", line 202, in run     return common.run(cmd, cwd=cwd, **kwargs)   File "/snap/snapcraft/501/lib/python3.6/site-packages/snapcraft/internal/common.py", line 63, in run     subprocess.check_call(['/bin/sh', f.name] + cmd, **kwargs)   File "/snap/snapcraft/501/usr/lib/python3.6/subprocess.py", line 291, in check_call     raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/bin/sh', '/tmp/tmpkcwbeq2u', 'cmake', '/home/ubuntu/snapcraft/demos/opencv/parts/example/src', '-DCMAKE_INSTALL_PREFIX=']' returned non-zero exit status 1. That library should be coming from the core snap, not from the host. Problem is, that can't be solved with LD_LIBRARY_PATH because that will leak into the environment being run.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed Trusty classic-snap builds by preventing bundled-library LD_LIBRARY_PATH values from leaking into build commands; merged in snapcore/snapcraft#1635 as da9181487.
stealth/space-bunny-alpha — closed resolved Fixed the Trusty classic-snap failure by removing leaked LD_LIBRARY_PATH; merged in canonical/snapcraft#1635 as commit da9181487.
stealth/space-bunny-alpha — closed stale Closed without a recorded fix after years of inactivity; native Trusty builds failed because the host libstdc++ lacked CXXABI_1.3.8 required by Snapcraft's bundled ICU library.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The snapcraft build failure on Ubuntu Trusty caused by a missing CXXABI_1.3.8 symbol was abandoned, likely superseded by Trusty reaching end-of-life.
qwen/qwen3.6-35b-a3b — — Closed without resolution or comments. Ubuntu Trusty has reached end-of-life, making the snap compatibility issue obsolete and superseded by newer core releases.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcore/snapcraft#1635 (confidence 100%)

    Merged fix commit da9181487 removed LD_LIBRARY_PATH leaking from Snapcraft build commands.

Related issues

Issue Project State Summary Similarity
#1635 snap: remove leaking LD_LIBRARY_PATH snapcraft merged Merged as da9181487: PR #1635 removed LD_LIBRARY_PATH leakage from snapcraft-classic, fixing LP #1723208 and preventing breakage on hosts such as Trusty.
82%
#1765482 Building a classic snap on trusty doesn't work snapcraft (launchpad) closed Trusty classic-snap build segfaults traced to core paths in LD_LIBRARY_PATH. Proposed fix PR canonical/snapcraft#2128 was closed unmerged as unnecessary, leaving the bug unfixed.
82%
#1752964 Snapcraft snap broken on trusty snapcraft (launchpad) closed Snapcraft 2.39.2 snap failed on Trusty: mksquashfs couldn't find liblz4.so.1 because ELF rpaths weren't set. Fixed by snapcore/snapcraft#1988 (commit 17f1f8c2f), which only sets rpaths to libs of the same arch; verified via edge/1752964-fix-trusty channel.
78%
#1978859 Snapcraft doesn't set parts lib & include directories to CFLAGS/CXXFLAGS/LDFLAGS/LD_LIBRARY_PATH since Snapcraft 4.0 snapcraft (launchpad) closed CMake stage discovery was fixed in Snapcraft 7.1.2 by PR #3217. Automatic LD_LIBRARY_PATH support was closed as intentional: core20+ requires users to set it explicitly.
74%
#1992557 snapcraft remote-build snapcraft.yaml validation too strict snapcraft (launchpad) closed Strict validation in snapcraft remote-build rejected empty LD_LIBRARY_PATH for core22 snaps. Resolved by the new remote builder, which fixes the legacy core18/20 implementation bug.
74%
#1647699 Support classic building in snapcraft snapcraft (launchpad) closed Classic-snap builds were implemented by merged snapcore/snapcraft#949 (commit 058f5626d), resolving libraries from the core/base snap.
72%
#1665165 classic snaps fail to build in launchpad in archs other than amd64 snapcraft (launchpad) closed Classic non-amd64 Launchpad builds were fixed by snapcraft PR #1170 (commit b19e9cf68), correcting relative core dynamic-linker symlink resolution.
70%