Snapcraft.io shows compillation succeeded but fails in Snap creation

Thanks to all the previous help and guidance from a previous thread I opened

My situation report is as follows:

I’m on Manjaro Linux and don’t have experience using virtual machines. I’m attempting to remotely build a development version of the open source Scribus[1] Desktop Publishing software.

The snapcraft.yaml[2] currently completes the compilation process. I see this when i look at the snapcraft store Builds log output[3] (warning: this is a long text file).

Where I’m at:

So I’m stuck at the point where Scribus compiles fully and is handed-off to the ‘package as a Snap’ portion of the process. A snippet below shows the very sparse error that is reported. I’m stuck because I have no way to view /root/.local/state/snapcraft/log/snapcraft-20241229-215101.633829.log
since it’s being compiled remotely.

Creating snap package...
Command '['snap', 'pack', '--filename', 'scribus-git_1.7.0_armhf.snap', '--compression', 'xz', PosixPath('/build/scribus-git/prime'), PosixPath('/build/scribus-git')]' returned non-zero exit status 1.
Full execution log: '/root/.local/state/snapcraft/log/snapcraft-20241229-215101.633829.log'
Build failed
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/lpbuildd/target/build_snap.py", line 302, in run
    self.build()
  File "/usr/lib/python3/dist-packages/lpbuildd/target/build_snap.py", line 286, in build
    self.run_build_command(["snapcraft"], cwd=output_path, env=env)
  File "/usr/lib/python3/dist-packages/lpbuildd/target/operation.py", line 62, in run_build_command
    return self.backend.run(args, cwd=cwd, env=full_env, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/lpbuildd/target/lxd.py", line 733, in run
    subprocess.check_call(cmd, **kwargs)
  File "/usr/lib/python3.12/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['lxc', 'exec', 'lp-noble-armhf', '--env', 'LANG=C.UTF-8', '--env', 'SHELL=/bin/sh', '--env', 'http_proxy=http://10.10.10.1:8222/', '--env', 'https_proxy=http://10.10.10.1:8222/', '--env', 'GIT_PROXY_COMMAND=/usr/local/bin/lpbuildd-git-proxy', '--env', 'SNAPPY_STORE_NO_CDN=1', '--env', 'LAUNCHPAD_INSTANCE=production', '--env', 'LAUNCHPAD_SERVER_URL=launchpad.net', '--env', 'SNAPCRAFT_BUILD_INFO=1', '--env', 'SNAPCRAFT_IMAGE_INFO={"build-request-id": "lp-94830750", "build-request-timestamp": "2024-12-29T21:35:17Z", "build_url": "https://launchpad.net/~build.snapcraft.io/+snap/b3f864eabb44d111e6d453a28e872f5c/+build/2693001"}', '--env', 'SNAPCRAFT_BUILD_ENVIRONMENT=host', '--env', 'SNAPCRAFT_BUILD_FOR=armhf', '--', '/bin/sh', '-c', 'cd /build/scribus-git && linux32 snapcraft']' returned non-zero exit status 1.

Thanks in advance for the orientation!


  1. https://www.scribus.net/ ↩︎

  2. Scribus-Snap/snap/snapcraft.yaml at master · luzpaz/Scribus-Snap · GitHub ↩︎

  3. https://gist.githubusercontent.com/luzpaz/6dc35bc79e0557a7083961dfd30354b3/raw/de72d7457f05a684b24feb67e66e86ef7e7ff124/scribus-git-snap.log ↩︎

I think this is a regression in the error outputs that should probably be reported as a bug, it’s hit me this week too.

If I’m right, the underlying error is that one of the commands: in your apps: points to a binary that cannot be found in the resultant snap. Snapcraft is unfortunately masking the output that historically appeared.

Try

snapcraft --verbose --debug

and wait until it drops you into the debug shell, from there, you’d run snap pack as if the system were doing it itself, e.g.,:

snap pack --filename scribus-git.snap --compression lzo /build/scribus-git/prime /build/scribus-gi

and if my wild guess is right, you’ll get something that confirms (or rejects) my suspicions.

The fix then would be to either modify the command: parameter to match what’s in your snap or analyse why the build isn’t correct and make the executable appear where it’s expected.

Where do I input this ? If you mean from the CLI, that doesn’t work for me since i’m on Manjaro and dont have apt installed.

You dont need apt installed on manjaro to locally build packages …

sudo snap install lxd
sudo lxd init --auto
sudo snap install snapcraft --classic

now you should be able to run the snapcraft command from james above (in the top level of your source tree), once it fails at the end it will drop you into a shell inside the lxd container and you can debug why the build fails …

Snapcraft is unfortunately masking the output that historically appeared.

Between snapd and snapcraft, this has been fixed and is scheduled to be in Snapcraft 8.6 by the end of the month.

note that the actual launchpad link is actually printed in the first few lines of the log in snapcraft.io/<package>/builds, if you manually copy/paste it into a browser you will get to the LP build where you can get more detailed info …

but for debugging you should really use a local build nontheless …