Granite 5.2.2 issue


#1

My build of EasySSH is failing while running the granite part. I followed the steps of other applications that also use this library and the recent step-by-step to create an Akira Snap, which also uses the granite library, but does not work. Returns the following error:

Skipping pull desktop-gnome-platform (already ran)
Pulling granite 
Downloading '5.2.2.tar.gz'|                                                                                                                                                                                                                    
'easyssh' has dependencies that need to be staged: granite desktop-gnome-platform
Skipping pull desktop-gnome-platform (already ran)
Skipping pull granite (already ran)
Skipping build desktop-gnome-platform (already ran)
Building granite 
cmake /home/muriloventuroso/Dev/Vala/easyssh/parts/granite/src -DCMAKE_INSTALL_PREFIX=
CMake Error at cmake/FindVala.cmake:63 (string):
  string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
  CMakeLists.txt:19 (find_package)


CMake Error at cmake/FindVala.cmake:64 (string):
  string sub-command STRIP requires two arguments.
Call Stack (most recent call first):
  CMakeLists.txt:19 (find_package)


CMake Error at cmake/FindVala.cmake:63 (string):
  string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
  cmake/ValaVersion.cmake:31 (find_package)
  CMakeLists.txt:20 (include)


CMake Error at cmake/FindVala.cmake:64 (string):
  string sub-command STRIP requires two arguments.
Call Stack (most recent call first):
  cmake/ValaVersion.cmake:31 (find_package)
  CMakeLists.txt:20 (include)


CMake Error at cmake/FindVala.cmake:63 (string):
  string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
  cmake/ValaPrecompile.cmake:31 (find_package)
  CMakeLists.txt:21 (include)


CMake Error at cmake/FindVala.cmake:64 (string):
  string sub-command STRIP requires two arguments.
Call Stack (most recent call first):
  cmake/ValaPrecompile.cmake:31 (find_package)
  CMakeLists.txt:21 (include)


-- checking for a minimum Vala version of 0.40
CMake Error at cmake/ValaVersion.cmake:82 (if):
  if given arguments:

    "VERSION_GREATER" "0.40" "OR" "VERSION_EQUAL" "0.40"

  Unknown arguments specified
Call Stack (most recent call first):
  CMakeLists.txt:23 (ensure_vala_version)


-- Configuring incomplete, errors occurred!
See also "/home/muriloventuroso/Dev/Vala/easyssh/parts/granite/build/CMakeFiles/CMakeOutput.log".
Failed to run 'cmake /home/muriloventuroso/Dev/Vala/easyssh/parts/granite/src -DCMAKE_INSTALL_PREFIX=' for 'granite': Exited with code 1.
Verify that the part is using the correct parameters and try again.

This is my snapcraft.yaml:

name: easyssh
version: 1.5.3
summary: SSH Connection Manager
description: A complete, efficient and easy-to-use manager. Create and edit connections, groups, customize the terminal, with multiple instances of the same connection.
base: core18
icon: data/icons/24/com.github.muriloventuroso.easyssh.svg
confinement: strict

slots:
  dbus-easyssh:
    interface: dbus
    bus: session
    name: com.github.muriloventuroso.easyssh

apps:
  easyssh:
    command: desktop-launch $SNAP/usr/bin/com.github.muriloventuroso.easyssh
    desktop: usr/share/applications/com.github.muriloventuroso.easyssh.desktop
    plugs: [network, home, x11, unity7, gsettings, locale-control]
    slots: [ dbus-easyssh ]

plugs:
    gnome-3-28-1804:
        interface: content
        target: $SNAP/gnome-platform
        default-provider: gnome-3-28-1804
    gtk-3-themes:
        interface: content
        target: $SNAP/data-dir/themes
        default-provider: gtk-common-themes
    icon-themes:
        interface: content
        target: $SNAP/data-dir/icons
        default-provider: gtk-common-themes
    sound-themes:
        interface: content
        target: $SNAP/data-dir/sounds
        default-provider: gtk-common-themes

parts:

    easyssh:
        plugin: meson
        meson-parameters:
          - --prefix=/usr
        source: https://github.com/muriloventuroso/easyssh/archive/1.5.3.tar.gz
        source-type: tar
        after: [granite, desktop-gnome-platform]
        build-packages:
            - build-essential
            - valac
            - intltool
            - libgee-0.8-dev
            - debhelper
            - libgtk-3-dev
            - libvte-2.91-dev
            - libjson-glib-dev
        stage-packages:
            - gobject-introspection
            - libgee-0.8-2
            - libgtk-3-0
            - locales-all
            - gpg
            - openssh-client
    granite:
        plugin: cmake
        source: https://github.com/elementary/granite/archive/5.2.2.tar.gz
        source-type: tar
        build-packages:
            - build-essential
            - libgee-0.8-dev
            - libgirepository1.0-dev
            - libgtk-3-dev
            - cmake
            - gobject-introspection
            - valac
    desktop-gnome-platform:
        source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
        source-subdir: gtk
        plugin: make
        make-parameters: ["FLAVOR=gtk3"]
        build-packages:
          - build-essential
          - libgtk-3-dev
        override-build: |
          snapcraftctl build
          mkdir -pv $SNAPCRAFT_PART_INSTALL/gnome-platform

#2

Are you using the snapcraft snap for this?


#3

I’m running as follows:

SNAPCRAFT_BUILD_ENVIRONMENT=lxd snapcraft cleanbuild --debug


#4

It seems you are not using the snap, as cleanbuild is not really supported and the only way to build outside our prescribed environment for base: core18 is to use the snapcraft snap (snap install snapcraft).


#5

I install snap snapcraft and run again:

muriloventuroso@muriloventuroso-X510UR:~/Dev/Vala/easyssh$ SNAPCRAFT_BUILD_ENVIRONMENT=lxd snapcraft
Device /root/build_easyssh removed from snapcraft-easyssh
Waiting for a network connection...
Network connection established
snap "core" is already installed, see 'snap help refresh'
snap "snapcraft" is already installed, see 'snap help refresh'
Mounting /home/muriloventuroso/Dev/Vala/easyssh into container
Device /root/build_easyssh added to snapcraft-easyssh
Launching a VM.
launch failed: modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.15.0-45-generic/modules.dep.bin'
modprobe: FATAL: Module msr not found in directory /lib/modules/4.15.0-45-generic
An error occurred when trying to launch the instance with 'multipass': returned exit code 2.
Ensure that 'multipass' is setup correctly and try again.
Stopping local:snapcraft-easyssh

#6

are you running snapcraft inside lxd?


#7

I’m trying to run in several ways:

snapcraft
snapcraft cleanbuild
SNAPCRAFT_BUILD_ENVIRONMENT=lxd snapcraft
SNAPCRAFT_BUILD_ENVIRONMENT=lxd snapcraft cleanbuild

Neither of these ways worked.


#8

I’m asking about the environment in which you are running snapcraft itself (as opposed to what you’re trying to run with snapcraft).


#9

yes, i am running inside lxd


#10

This is mostly an experimenters implementation detail, please do not use it and rely instead on the CLI syntax. The values, such as lxd which you used, can come and go at any time (as is the case for lxd)


#11

Okay, I stopped lxd and just ran the snapcraft command, I got the same error at the beginning of the post.


#12

I’ll try to run the snapcraft on a clean install, sometimes I left some dirt by the way