Snap not buildable anymore

Hey everyone,

I had a snap which was working perfectly fine. In meantime, some code changes were made (which work perfectly fine). Hence, I was about to build a new version of snap package and without making any changes to snapcraft.yaml, snapcraft just fails now. Only change to build environment is that I upgrade from 19.04 to 20.04 awhile back.

Does anyone have any idea why this is happening and how I could address these issues?

Latest version of snapcraft.yaml and snapcraft output.

Thanks!

You’re missing build dependencies. Specifically you’re missing GCC, so you likely need to amend your python part to:

parts:
  auto-cpufreq:
    plugin: python
    python-version: python3
    source: .
    build-packages:
      - gcc

Thanks Daniel,

Making suggested changes to snapcraft.yaml resolved my build problem.

However, when I install the app from snap now I have a new problem, any ideas about this?

Do you have all snap interfaces connected? What is snap connections <your-snap> ?

I do, this part of code was left unchanged:

snap connections auto-cpufreq 
Interface         Plug                           Slot  Notes
cpu-control       auto-cpufreq:cpu-control       -     -
hardware-observe  auto-cpufreq:hardware-observe  -     -
system-observe    auto-cpufreq:system-observe    -     -

I also tried (temporarily) changing confinement to classic, and installing it as such, but I still ran into the same problem.

Those each show as not connected. You need to manually connect them with:

sudo snap connect auto-cpufreq:cpu-control
sudo snap connect auto-cpufreq:hardware-observe
sudo snap connect auto-cpufreq:system-observe
1 Like

Great thank you, it’s been so long since I build this snap, that I forgot I had to connect interfaces when building it locally.