← Back to issue list

cannot build snapd snap with build-base: core w/o base: core

View original Launchpad issue

Metadata

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

Current evaluation

Resolved in Snapcraft 3.10 by skipping ELF dependency checks when no runtime base is set, allowing snapd to use build-base: core.

Resolution: closed resolved

Reason: Maintainers identified the fix as skipping ELF checks when base is absent. The final maintainer comment, "Part of 3.10," confirms resolution in the Snapcraft 3.10 release.

Evaluated by: mr-cal-bot

No scores available.

Issue body

When using just `build-base: core` in the snapd snap, snapcraft fails thusly: ``` Priming fontconfig-bionic join() argument must be str or bytes, not 'NoneType' We would appreciate it if you anonymously reported this issue. No other data than the traceback and the version of snapcraft in use will be sent. Would you like to send this error data? (Yes/No/Always/View) [no]: view Traceback (most recent call last): File "/snap/snapcraft/3834/bin/snapcraft", line 11, in <module> load_entry_point('snapcraft==3.9.1', 'console_scripts', 'snapcraft')() File "/snap/snapcraft/3834/lib/python3.6/site-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "/snap/snapcraft/3834/lib/python3.6/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/snap/snapcraft/3834/lib/python3.6/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/snap/snapcraft/3834/lib/python3.6/site-packages/snapcraft/cli/_command.py", line 88, in invoke return super().invoke(ctx) File "/snap/snapcraft/3834/lib/python3.6/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/snap/snapcraft/3834/lib/python3.6/site-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/snap/snapcraft/3834/lib/python3.6/site-packages/snapcraft/cli/lifecycle.py", line 288, in snap _execute(steps.PRIME, parts=[], pack_project=True, output=output, **kwargs) File "/snap/snapcraft/3834/lib/python3.6/site-packages/snapcraft/cli/lifecycle.py", line 79, in _execute lifecycle.execute(step, project_config, parts) File "/snap/snapcraft/3834/lib/python3.6/site-packages/snapcraft/internal/lifecycle/_runner.py", line 122, in execute executor.run(step, part_names) File "/snap/snapcraft/3834/lib/python3.6/site-packages/snapcraft/internal/lifecycle/_runner.py", line 176, in run self._handle_step(part_names, part, step, current_step, cli_config) File "/snap/snapcraft/3834/lib/python3.6/site-packages/snapcraft/internal/lifecycle/_runner.py", line 190, in _handle_step getattr(self, "_run_{}".format(current_step.name))(part) File "/snap/snapcraft/3834/lib/python3.6/site-packages/snapcraft/internal/lifecycle/_runner.py", line 265, in _run_prime self._run_step(step=steps.PRIME, part=part, progress="Priming") File "/snap/snapcraft/3834/lib/python3.6/site-packages/snapcraft/internal/lifecycle/_runner.py", line 309, in _run_step getattr(part, step.name)() File "/snap/snapcraft/3834/lib/python3.6/site-packages/snapcraft/internal/pluginhandler/__init__.py", line 798, in prime self._do_runner_step(steps.PRIME) File "/snap/snapcraft/3834/lib/python3.6/site-packages/snapcraft/internal/pluginhandler/__init__.py", line 245, in _do_runner_step return getattr(self._runner, "{}".format(step.name))() File "/snap/snapcraft/3834/lib/python3.6/site-packages/snapcraft/internal/pluginhandler/_runner.py", line 91, in prime "override-prime", self._override_prime_scriptlet, self._primedir File "/snap/snapcraft/3834/lib/python3.6/site-packages/snapcraft/internal/pluginhandler/_runner.py", line 137, in _run_scriptlet scriptlet_name, function_call.strip() File "/snap/snapcraft/3834/lib/python3.6/site-packages/snapcraft/internal/pluginhandler/_runner.py", line 193, in _handle_builtin_function function(**function_args) File "/snap/snapcraft/3834/lib/python3.6/site-packages/snapcraft/internal/pluginhandler/__init__.py", line 819, in _do_prime dependency_paths = self._handle_elf(snap_files) File "/snap/snapcraft/3834/lib/python3.6/site-packages/snapcraft/internal/pluginhandler/__init__.py", line 831, in _handle_elf core_path = common.get_installed_snap_path(self._base) File "/snap/snapcraft/3834/lib/python3.6/site-packages/snapcraft/internal/common.py", line 92, in get_installed_snap_path return os.path.join(os.path.sep, "snap", snap_name, "current") File "/snap/snapcraft/3834/usr/lib/python3.6/posixpath.py", line 94, in join genericpath._check_arg_types('join', a, *p) File "/snap/snapcraft/3834/usr/lib/python3.6/genericpath.py", line 149, in _check_arg_types (funcname, s.__class__.__name__)) from None TypeError: join() argument must be str or bytes, not 'NoneType' ``` I believe this is because the _handle_elf function assumes that there will always be a snap specified by `base: ...` when in this case there is not, there is only build-base.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Resolved in Snapcraft 3.10 by skipping ELF dependency checks when no runtime base is set, allowing snapd to use build-base: core.
stealth/space-bunny-alpha — closed resolved Snapcraft 3.10 fixed the crash by skipping ELF/dependency checks when no runtime base is set, allowing snapd builds with only build-base: core.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR canonical/snapcraft#2926 (9b1655d02), which skips ELF processing when no base is specified, allowing build-base-only snapd builds.
qwen/qwen3.6-35b-a3b — — Closed without resolution or comments. The snapcraft TypeError when using build-base: core without base: core remains unresolved.
qwen/qwen3.6-35b-a3b — — Closed without resolution. Reported a snapcraft crash when using build-base: core without base: core due to an unhandled None base path. No fix or follow-up was documented.
qwen/qwen3.6-35b-a3b — — Closed without comments or resolution. The snapcraft crash report involving build-base without base appears abandoned, with no fix, merge, or external resolution documented.
qwen3.6-35b-a3b-mtp-q6 — — Closed without comments or resolution. The report details a snapcraft TypeError when using build-base without base, but no fix was provided, indicating the issue was abandoned or resolved externally.

Update history

Date Change
created

Related issues

Issue Project State Summary Similarity
#1833409 core20: cannot specify a sensible base snapcraft (launchpad) closed Build-base support for building base snaps without a runtime base was implemented in snapcraft PRs #2623 and #2619; LP bug #1835532 tracked the follow-up.
77%
#1976221 Missing linker base while building with core22 base snapcraft (launchpad) closed Resolved by upgrading from legacy Snapcraft to Snapcraft 7.x, which correctly builds core22 snaps; no code fix or linked PR was recorded.
75%
#1835532 snapcraft behavior for type: base snapcraft (launchpad) closed Implemented build-base support for base snaps; the proposed branch successfully built core20 using core18 before the issue was closed.
73%
#1819290 Support for "base: core" snapcraft (launchpad) closed Implemented by merged snapcore/snapcraft#2499 (commit e1cc2b91c), adding 'base: core' support in snapcraft.yaml and stripping it from generated snap.yaml; Launchpad base config updated by cjwatson.
73%
#2499 many: support for "base: core" in snapcraft.yaml snapcraft merged Merged PR #2499 added support for base: core in snapcraft.yaml and omitted it from generated snap.yaml; resolution: e1cc2b91c.
73%
#1862256 snapcraft should complain loudly when building base: core20 snap on i386 snapcraft (launchpad) closed Closed as superseded: improved architecture parsing rejects unsupported core20/i386 builds, making a dedicated check unnecessary; snapcraft#4392 improved this handling.
72%
#1839604 build-base seems broken snapcraft (launchpad) open Closed as implemented: current Snapcraft supports `base: bare` with a required `build-base`, including core22/core24/core26, and documents the configuration.
72%
#1752957 Building classic snap without core snap installed succeeds, but creates snap that doesn't run snapcraft (launchpad) open Legacy Snapcraft 2.x classic builds could emit a non-running snap when core was absent; the affected base and implementation are now obsolete.
71%
#4972 Cannot create a snap with base:bare in destructive mode snapcraft open Snapcraft 8.3.2 mishandled bare-base projects without build-base, producing architecture/platform errors; current models require build-base and fail early during validation.
70%