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.