Error building a snap with gnome-3-28-extension

Hi everybody.

I’m having troubles building the snap for version 4.0 of my application WallpaperDownloader (Install WallpaperDownloader on Linux | Snap Store).

I’m on a new, fresh Ubuntu 20.04 and this is the snapcraft.yaml (which did run very well in past):

name: wallpaperdownloader
version: "4.0"
summary: Download, manage and change your favorite wallpapers from the Internet
description: WallpaperDownloader is a simple GUI Java based application for downloading, managing and changing wallpapers from the Internet
type: app
base: core18
grade: stable
confinement: strict

    command: bin/
    # This extension is very useful for packaging GTK desktop applications using the new core18 base
    extensions: [gnome-3-28]
    # network-observe plug will be needed to run ping command from the snap
     - x11
     - desktop
     - desktop-legacy
     - wayland
     - unity7
     - network-bind
     - network-observe
     - home
     - gsettings

  # Pulls the code from the original source (master branch)
  # desktop-gtk3 is a snapcraft part (snapcraft-desktop-helpers) from the Wiki:
  # It enables desktop integration and gsettings manipulation from the confined application
  # It is necessary to use gsettings interface (see above) in order to have a fully functional
  # desktop-gtk3 part
  # Github repository for snapcraft-desktop-helpers:
    plugin: maven
    source-type: git
    source-tag: master
      # mate-desktop-common is necessary to have MATE gsettings schemas available for the application
      - mate-desktop-common
    #after: [desktop-gtk3]

  # It will copy wallpaperdownloader script into /bin/
  # This script contains all the commands needed (sets env variables, launches the jar file...) to
  # execute the application
    plugin: dump
    source: scripts
    source-type: local

This is the directory from I run snapcraft command once the repo is cloned

Everything is fine until it tries to build gnome-3-28-extension. This is the error:

Fetched 176 kB in 0s (0 B/s)                                                                                                                         
Copying needed target link from the system /etc/ssl/certs/java/cacerts
Pulling wallpaperdownloader 
Cloning into '/root/parts/wallpaperdownloader/src'...
remote: Counting objects: 6844, done.
remote: Compressing objects: 100% (4722/4722), done.
remote: Total 6844 (delta 2812), reused 0 (delta 0)
Receiving objects: 100% (6844/6844), 13.75 MiB | 3.01 MiB/s, done.
Resolving deltas: 100% (3097/3097), done.
Downloading 'apache-maven-3.5.4-bin.tar.gz'[====================================================================================================] 100%
Building exec 
Building gnome-3-28-extension 
make -j2
gcc -Wall -O2 -o -fPIC -shared ./../src/bindtextdomain.c -ldl
make: gcc: Command not found
Makefile:20: recipe for target 'desktop-launch' failed
make: *** [desktop-launch] Error 127
Failed to run 'make -j2' for 'gnome-3-28-extension': Exited with code 2.
Verify that the part is using the correct parameters and try again.
Run the same command again with --debug to shell into the environment if you wish to introspect this failure.

Do I need to change something in the snapcraft.yaml? It was running smoothly in previous versions.

Thank you very very much :slight_smile:

1 Like

This is fixed in the 4.0.6, currently on the candidate channel Call for testing: Snapcraft 4.0.6...4.0.7

1 Like

Hi @sergiusens and thak you very much for your quick response.

I installed the candidate version and it did the trick!

Thanks again :slight_smile: