Building snaps

I’ve recently begun to notice in my restart of getting my visualboyadvance-m snap updated, that snapcraft using the snap version of lxd isn’t outputing the snap when a build completes, it doesn’t seem to output the snap in the build directory. Now I don’t really see an error being output either, so is it possible that I’m missing something?

Just bumping this as I’m still not able to produce a snap file yet with core22 or core24 and snapcraft.

Can you share the manifest with us?

The manifest being the snapcraft yaml? Yeah, it’s located here snap-release/snapcraft.yaml at master · visualboyadvance-m/snap-release · GitHub

1 Like

I should point out, it seems to stop by the time the app finished building and linking, but I’m not seeing any actual error message, nor am I seeing anything that says the snap is built. It just stops.

Can you post the contents of the log file too?

If snapcraft is stopping without an error, you will have to find the latest log file in $HOME/.local/state/snapcraft/log/.

Here’s a copy of the log gist:066d046b14480cea8a4869bef0a09628 · GitHub

1 Like

A workaround you can use while this is not properly fixed is to use the shorthand notation for platforms:

platforms:
  amd64:

parts:
  ...

Except the workaround doesn’t work. And even was seeing this issue recently even on core22 before moving onto core24 and trying that.

Interesting, I was able to complete builds if I use the shorthand notation, if I add build-for: amd64, or if I remove the platforms entry altogether. In these cases this is what I get:

Packing...       
Reading snap metadata...                        
Running linters...         
Running linter: classic      
Running linter: library      
Lint warnings: 
- library: libwx_gtk3u_aui-3.2.so.0: unused library 'usr/lib/libwx_gtk3u_aui-3.2.so.0.3.0'. (https://snapcraft.io/docs/linters-library)
- library: libwx_gtk3u_propgrid-3.2.so.0: unused library 'usr/lib/libwx_gtk3u_propgrid-3.2.so.0.3.0'. (https://snapcraft.io/docs/linters-library)
- library: libwx_gtk3u_qa-3.2.so.0: unused library 'usr/lib/libwx_gtk3u_qa-3.2.so.0.3.0'. (https://snapcraft.io/docs/linters-library)
- library: libwx_gtk3u_ribbon-3.2.so.0: unused library 'usr/lib/libwx_gtk3u_ribbon-3.2.so.0.3.0'. (https://snapcraft.io/docs/linters-library)
- library: libwx_gtk3u_richtext-3.2.so.0: unused library 'usr/lib/libwx_gtk3u_richtext-3.2.so.0.3.0'. (https://snapcraft.io/docs/linters-library)
- library: libwx_gtk3u_stc-3.2.so.0: unused library 'usr/lib/libwx_gtk3u_stc-3.2.so.0.3.0'. (https://snapcraft.io/docs/linters-library)
- library: libwx_gtk3u_webview-3.2.so.0: unused library 'usr/lib/libwx_gtk3u_webview-3.2.so.0.3.0'. (https://snapcraft.io/docs/linters-library)
- library: libGLX_mesa.so.0: unused library 'usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0.0.0'. (https://snapcraft.io/docs/linters-library)
- library: libcolordprivate.so.2: unused library 'usr/lib/x86_64-linux-gnu/libcolordprivate.so.2.0.5'. (https://snapcraft.io/docs/linters-library)
- library: libdconf.so.1: unused library 'usr/lib/x86_64-linux-gnu/libdconf.so.1.0.0'. (https://snapcraft.io/docs/linters-library)
- library: libicuio.so.74: unused library 'usr/lib/x86_64-linux-gnu/libicuio.so.74.2'. (https://snapcraft.io/docs/linters-library)
- library: libicutest.so.74: unused library 'usr/lib/x86_64-linux-gnu/libicutest.so.74.2'. (https://snapcraft.io/docs/linters-library)
- library: libpulse-simple.so.0: unused library 'usr/lib/x86_64-linux-gnu/libpulse-simple.so.0.1.1'. (https://snapcraft.io/docs/linters-library) 
- library: libvulkan.so.1: unused library 'usr/lib/x86_64-linux-gnu/libvulkan.so.1.3.275'. (https://snapcraft.io/docs/linters-library)
Creating snap package...
Packed visualboyadvance-m_2.1.10_amd64.snap

And yet, I’m not getting that, and I even tried it on another machine too

The logs on the other machine isn’t showing any real errors. It just stops…

2024-09-16 11:22:45.299 :: 2024-09-16 11:22:44.600 verify plugin environment for part ‘gnome/sdk’ 2024-09-16 11:22:45.299 :: 2024-09-16 11:22:44.605 verify plugin environment for part ‘wxwidgets’ 2024-09-16 11:22:45.299 :: 2024-09-16 11:22:44.607 verify plugin environment for part ‘vbam’ 2024-09-16 11:22:45.299 :: 2024-09-16 11:22:44.610 Skipping pull for gnome/sdk (already ran) 2024-09-16 11:22:45.299 :: 2024-09-16 11:22:44.614 execute action gnome/sdk:Action(part_name=‘gnome/sdk’, step=Step.PULL, action_type=ActionType.SKIP, reason=‘already ran’, project_vars=None, properties=Actio>2024-09-16 11:22:45.299 :: 2024-09-16 11:22:44.614 Skip execution of Action(part_name=‘gnome/sdk’, step=Step.PULL, action_type=ActionType.SKIP, reason=‘already ran’, project_vars=None, properties=ActionProper>2024-09-16 11:22:45.299 :: 2024-09-16 11:22:44.614 Skipping pull for wxwidgets (already ran) 2024-09-16 11:22:45.299 :: 2024-09-16 11:22:44.615 execute action wxwidgets:Action(part_name=‘wxwidgets’, step=Step.PULL, action_type=ActionType.SKIP, reason=‘already ran’, project_vars=None, properties=Actio>2024-09-16 11:22:45.299 :: 2024-09-16 11:22:44.615 Skip execution of Action(part_name=‘wxwidgets’, step=Step.PULL, action_type=ActionType.SKIP, reason=‘already ran’, project_vars=None, properties=ActionProper>2024-09-16 11:22:45.299 :: 2024-09-16 11:22:44.616 Skipping pull for vbam (already ran) 2024-09-16 11:22:45.299 :: 2024-09-16 11:22:44.616 execute action vbam:Action(part_name=‘vbam’, step=Step.PULL, action_type=ActionType.SKIP, reason=‘already ran’, project_vars=None, properties=ActionPropertie>2024-09-16 11:22:45.300 :: 2024-09-16 11:22:44.616 Skip execution of Action(part_name=‘vbam’, step=Step.PULL, action_type=ActionType.SKIP, reason=‘already ran’, project_vars=None, properties=ActionProperties(>2024-09-16 11:22:45.300 :: 2024-09-16 11:22:44.617 Skipping build for gnome/sdk (already ran) 2024-09-16 11:22:45.300 :: 2024-09-16 11:22:44.618 execute action gnome/sdk:Action(part_name=‘gnome/sdk’, step=Step.BUILD, action_type=ActionType.SKIP, reason=‘already ran’, project_vars=None, properties=Acti>2024-09-16 11:22:45.300 :: 2024-09-16 11:22:44.618 Skip execution of Action(part_name=‘gnome/sdk’, step=Step.BUILD, action_type=ActionType.SKIP, reason=‘already ran’, project_vars=None, properties=ActionPrope>2024-09-16 11:22:45.300 :: 2024-09-16 11:22:44.619 Skipping build for wxwidgets (already ran) 2024-09-16 11:22:45.300 :: 2024-09-16 11:22:44.619 execute action wxwidgets:Action(part_name=‘wxwidgets’, step=Step.BUILD, action_type=ActionType.SKIP, reason=‘already ran’, project_vars=None, properties=Acti>2024-09-16 11:22:45.300 :: 2024-09-16 11:22:44.619 Skip execution of Action(part_name=‘wxwidgets’, step=Step.BUILD, action_type=ActionType.SKIP, reason=‘already ran’, project_vars=None, properties=ActionPrope>2024-09-16 11:22:45.300 :: 2024-09-16 11:22:44.620 Skipping build for vbam (already ran) 2024-09-16 11:22:45.300 :: 2024-09-16 11:22:44.621 execute action vbam:Action(part_name=‘vbam’, step=Step.BUILD, action_type=ActionType.SKIP, reason=‘already ran’, project_vars=None, properties=ActionProperti>2024-09-16 11:22:45.300 :: 2024-09-16 11:22:44.621 Skip execution of Action(part_name=‘vbam’, step=Step.BUILD, action_type=ActionType.SKIP, reason=‘already ran’, project_vars=None, properties=ActionProperties>2024-09-16 11:22:45.300 Executing on host: lxc --project snapcraft config device show local:snapcraft-visualboyadvance-m-on-amd64-for-amd64-10224313 2024-09-16 11:22:45.378 Executing on host: lxc --project snapcraft config device remove local:snapcraft-visualboyadvance-m-on-amd64-for-amd64-10224313 disk-/root/project 2024-09-16 11:22:45.500 Executing on host: lxc --project snapcraft stop local:snapcraft-visualboyadvance-m-on-amd64-for-amd64-10224313

at this line.

I’m gonna clean the old build and try again.

We may have a fix here. You can trial it with snap refresh snapcraft --channel edge/pr-5043.

Can you try your original snapcraft.yaml with that channel?

Sadly, it did not work on my wsl instance, my ubuntu server install in the basement, or bare metal ubuntu on my laptop.

here’s the latest log from a fresh install of ubuntu on my laptop gist:16e355271d4d11237effa9002b4c574a · GitHub using that newer snapcraft build

Using that snapcraft build has fixed the error in the original log file with Unknown error: ('cannot represent an object', <SnapArch.amd64: 'amd64'>).

Are you running snapcraft build? That will only run the pull and build steps. It doesn’t stage, prime, or pack your snap.

What happens if you run snapcraft pack?

That seemed to do the trick. I won’t know until I install it locally and test it since I’m right now remoting into my server that did the building. I’ll report in about 8 hours when I’m home from work.

Apologies for being late to this. Running snapcraft pack and then installing it. It seems to have worked, however it’s still odd that snapcraft build itself isn’t completing the process like it did in the past for me. I was pretty sure it packed before automatically.

1 Like