Snap Package failed to build

Snap building

-- Installing: /build/stellarium-daily/parts/stellarium/install/usr/share/metainfo/org.stellarium.Stellarium.appdata.xml
-- Installing: /build/stellarium-daily/parts/stellarium/install/usr/share/mime/packages/stellarium.xml
-- Installing: /build/stellarium-daily/parts/stellarium/install/usr/share/icons/hicolor/16x16/apps/stellarium.png
-- Installing: /build/stellarium-daily/parts/stellarium/install/usr/share/icons/hicolor/32x32/apps/stellarium.png
-- Installing: /build/stellarium-daily/parts/stellarium/install/usr/share/icons/hicolor/48x48/apps/stellarium.png
-- Installing: /build/stellarium-daily/parts/stellarium/install/usr/share/icons/hicolor/64x64/apps/stellarium.png
-- Installing: /build/stellarium-daily/parts/stellarium/install/usr/share/icons/hicolor/128x128/apps/stellarium.png
-- Installing: /build/stellarium-daily/parts/stellarium/install/usr/share/icons/hicolor/256x256/apps/stellarium.png
-- Installing: /build/stellarium-daily/parts/stellarium/install/usr/share/icons/hicolor/512x512/apps/stellarium.png
-- Installing: /build/stellarium-daily/parts/stellarium/install/usr/share/stellarium/models

At the end of building

Priming stellarium 
The command 'desktop-launch' for 'desktop-launch $SNAP/usr/bin/stellarium' was resolved to 'bin/desktop-launch'.
The command 'desktop-launch $SNAP/usr/bin/stellarium' has been changed to 'bin/desktop-launch $SNAP/usr/bin/stellarium'.
Failed to copy 'usr/share/icons/hicolor/64x64/apps/stellarium.png': no such file or directory.
Check the path and try again.
Build failed

But the said icon file exists as seen earlier in the Installing Part.
The error is not understood.

Can you share your snapcraft.yaml? I found https://github.com/plars/stellarium-snap which built fine for me.

Core 20 & Core 18 both builds failed for every architecture. All builds are good, just a week before.

I’m guessing that he install prefix is wrong and that your files are being installed to the wrong dir.

- -DCMAKE_INSTALL_PREFIX:PATH=/usr

should probably be:

- -DCMAKE_INSTALL_PREFIX=/usr

the :PATH bit is fine for cmake - it indicates that you’re passing a path-like piece of text so cmake knows how better to handle it than with a variable defined without a suffix. There are other suffixes that you can use on defines in cmake-land, too…

1 Like

possibly you don’t need this - it might be the cause of your issue:

    organize:
      snap/stellarium-daily/current/usr: usr
1 Like

I reproduced the issue. It is a Snapcraft bug. I’ll put a fix up shortly.

2 Likes

Fix PR @ https://github.com/snapcore/snapcraft/pull/3380/files

Should be installable tomorrow with snap refresh snapcraft --channel=edge/pr-3380 if you’d like to give it a test.

The PR has not been margged yet into the master and the fix is not available for use.

The problem still exist @cjp256 . To package i have excluded the filesets - -usr/share/icons/hicolor/64x64/apps/* in prime stage.

filesets: 
  f_exclude:
    - -usr/share/icons/hicolor/64x64/apps/*
prime:
  - $f_exclude

Now the icon is missing from the ubuntu dash.

I put up a PR that will hopefully help: https://github.com/plars/stellarium-snap/pull/7

@cjp256 I have this exact issue with the Krita snap. Building the snap with 4.5.post3+gitbe94581c (5990) fixes it. Looking forward to the 4.5 release!

1 Like

It seems that I face a similar issue with my fist snap package, I am trying to build :confused:

so try the snapcraft version from the edge channel to see if it fixes it for you too …

$ sudo snap refresh snapcraft --edge

once 4.5 releases you can switch back with:

$ sudo snap refresh snapcraft --stable
2 Likes

Thanks for the hint,

already did this yesterday.

ref> Help with the new snap for qbittorrent