parnoldx / nasc

Do maths like a normal person
http://parnoldx.github.io/nasc/
GNU General Public License v3.0
560 stars 37 forks source link

Issue building on Ubuntu 20.04.3 LTS with Granite.Settings missing #184

Closed astubbs closed 2 years ago

astubbs commented 3 years ago
[14/76] Compiling Vala source ../src/Calculator.vala ../src/Controller.vala ../src/HelpBox.vala ../src/InputView.vala ../src/List...rc/PeriodicTable.vala ../src/ResultBoxWidget.vala ../src/ResultLine.vala ../src/ResultView.vala ../src/Tutorial.vala config.vala.
FAILED: com.github.parnold_x.nasc@exe/src/Calculator.c com.github.parnold_x.nasc@exe/src/Controller.c com.github.parnold_x.nasc@exe/src/HelpBox.c com.github.parnold_x.nasc@exe/src/InputView.c com.github.parnold_x.nasc@exe/src/ListFooter.c com.github.parnold_x.nasc@exe/src/MainWindow.c com.github.parnold_x.nasc@exe/src/Nasc.c com.github.parnold_x.nasc@exe/src/NascSettings.c com.github.parnold_x.nasc@exe/src/OpenBox.c com.github.parnold_x.nasc@exe/src/MathBinDialog.c com.github.parnold_x.nasc@exe/src/PeriodicTable.c com.github.parnold_x.nasc@exe/src/ResultBoxWidget.c com.github.parnold_x.nasc@exe/src/ResultLine.c com.github.parnold_x.nasc@exe/src/ResultView.c com.github.parnold_x.nasc@exe/src/Tutorial.c com.github.parnold_x.nasc@exe/build/config.c 
valac -C --debug --debug --pkg posix /home/antony/IdeaProjects/nasc/vapi/QalculateNasc.vapi --pkg posix --pkg webkit2gtk-4.0 --pkg gtksourceview-3.0 --pkg gtk+-3.0 --pkg granite --pkg glib-2.0 --pkg gee-0.8 --color=always --directory com.github.parnold_x.nasc@exe --basedir ../ --gresources=../subprojects/libqalculate/data/definitions.gresource.xml ../src/Calculator.vala ../src/Controller.vala ../src/HelpBox.vala ../src/InputView.vala ../src/ListFooter.vala ../src/MainWindow.vala ../src/Nasc.vala ../src/NascSettings.vala ../src/OpenBox.vala ../src/MathBinDialog.vala ../src/PeriodicTable.vala ../src/ResultBoxWidget.vala ../src/ResultLine.vala ../src/ResultView.vala ../src/Tutorial.vala config.vala
../src/NascSettings.vala:51.32-51.47: error: The name `Settings' does not exist in the context of `Granite' (granite)
        var granite_settings = Granite.Settings.get_default ();
                               ^^^^^^^^^^^^^^^^
../src/NascSettings.vala:55.99-55.114: error: The name `Settings' does not exist in the context of `Granite' (granite)
        gtk_settings.gtk_application_prefer_dark_theme = granite_settings.prefers_color_scheme == Granite.Settings.ColorScheme.DARK;
                                                                                                  ^^^^^^^^^^^^^^^^
antony@antony-X570-AORUS-MASTER:~/IdeaProjects/confluent-encryption$ sudo apt install -y gobject-introspection libgee-0.8-dev libwebkit2gtk-4.0-dev libgtksourceview-3.0-dev libcln-dev libgranite-dev libcurl4-openssl-dev libmpfr-dev intltool meson valac
[sudo] password for antony: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  autoconf automake autotools-dev gettext gir1.2-gee-0.8 gir1.2-granite-1.0 gir1.2-gtksource-3.0 gir1.2-harfbuzz-0.0 icu-devtools libatk-bridge2.0-dev libatk1.0-dev libatspi2.0-dev libblkid-dev libbrotli-dev libcairo-script-interpreter2 libcairo2-dev libcln6
  libcroco3 libdatrie-dev libdbus-1-dev libegl-dev libegl1-mesa-dev libepoxy-dev libexpat1-dev libffi-dev libfontconfig1-dev libfreetype-dev libfreetype6-dev libfribidi-dev libgdk-pixbuf2.0-dev libgl-dev libgl1-mesa-dev libgles-dev libgles1 libglib2.0-dev
  libglib2.0-dev-bin libglvnd-dev libglx-dev libgmp-dev libgmpxx4ldbl libgranite-common libgranite5 libgraphite2-dev libgtk-3-dev libharfbuzz-dev libharfbuzz-gobject0 libicu-dev libjavascriptcoregtk-4.0-dev libmount-dev libopengl-dev libopengl0 libpango1.0-dev
  libpcre16-3 libpcre2-dev libpcre2-posix2 libpcre3-dev libpcre32-3 libpcrecpp0v5 libpixman-1-dev libpng-dev libpng-tools libpsl-dev libselinux1-dev libsepol1-dev libsigsegv2 libsoup2.4-dev libsqlite3-dev libthai-dev libvala-0.48-0 libvalacodegen-0.48-0
  libwayland-bin libwayland-dev libxcb-render0-dev libxcb-shm0-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev libxkbcommon-dev libxml2-dev libxrandr-dev libxrender-dev libxtst-dev m4
  ninja-build pango1.0-tools python3-markdown python3-packaging python3-pygments python3-pyparsing uuid-dev valac-0.48-vapi valac-bin wayland-protocols x11proto-input-dev x11proto-randr-dev x11proto-record-dev x11proto-xext-dev x11proto-xinerama-dev zlib1g-dev
Suggested packages:
  autoconf-archive gnu-standards autoconf-doc libtool gettext-doc autopoint libasprintf-dev libgettextpo-dev libcairo2-doc pi libcurl4-doc libidn11-dev libkrb5-dev libldap2-dev librtmp-dev libssh2-1-dev libdatrie-doc freetype2-doc libgirepository1.0-dev
  libglib2.0-doc libxml2-utils gmp-doc libgmp10-doc libgraphite2-utils libgtk-3-doc libgtksourceview-3.0-doc icu-doc libmpfr-doc imagemagick libpango1.0-doc libsoup2.4-doc sqlite3-doc libthai-doc libwayland-doc libxext-doc m4-doc python-markdown-doc
  python-pygments-doc ttf-bitstream-vera python-pyparsing-doc
Recommended packages:
  contractor
The following NEW packages will be installed
  autoconf automake autotools-dev gettext gir1.2-gee-0.8 gir1.2-granite-1.0 gir1.2-gtksource-3.0 gir1.2-harfbuzz-0.0 gobject-introspection icu-devtools intltool libatk-bridge2.0-dev libatk1.0-dev libatspi2.0-dev libblkid-dev libbrotli-dev
  libcairo-script-interpreter2 libcairo2-dev libcln-dev libcln6 libcroco3 libcurl4-openssl-dev libdatrie-dev libdbus-1-dev libegl-dev libegl1-mesa-dev libepoxy-dev libexpat1-dev libffi-dev libfontconfig1-dev libfreetype-dev libfreetype6-dev libfribidi-dev
  libgdk-pixbuf2.0-dev libgee-0.8-dev libgl-dev libgl1-mesa-dev libgles-dev libgles1 libglib2.0-dev libglib2.0-dev-bin libglvnd-dev libglx-dev libgmp-dev libgmpxx4ldbl libgranite-common libgranite-dev libgranite5 libgraphite2-dev libgtk-3-dev
  libgtksourceview-3.0-dev libharfbuzz-dev libharfbuzz-gobject0 libicu-dev libjavascriptcoregtk-4.0-dev libmount-dev libmpfr-dev libopengl-dev libopengl0 libpango1.0-dev libpcre16-3 libpcre2-dev libpcre2-posix2 libpcre3-dev libpcre32-3 libpcrecpp0v5
  libpixman-1-dev libpng-dev libpng-tools libpsl-dev libselinux1-dev libsepol1-dev libsigsegv2 libsoup2.4-dev libsqlite3-dev libthai-dev libvala-0.48-0 libvalacodegen-0.48-0 libwayland-bin libwayland-dev libwebkit2gtk-4.0-dev libxcb-render0-dev libxcb-shm0-dev
  libxcomposite-dev libxcursor-dev libxdamage-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev libxkbcommon-dev libxml2-dev libxrandr-dev libxrender-dev libxtst-dev m4 meson ninja-build pango1.0-tools python3-markdown python3-packaging
  python3-pygments python3-pyparsing uuid-dev valac valac-0.48-vapi valac-bin wayland-protocols x11proto-input-dev x11proto-randr-dev x11proto-record-dev x11proto-xext-dev x11proto-xinerama-dev zlib1g-dev
0 to upgrade, 115 to newly install, 0 to remove and 51 not to upgrade.
Need to get 30.1 MB of archives.

antony@antony-X570-AORUS-MASTER ~/I/nasc (master)> meson build --prefix=/usr
The Meson build system
Version: 0.53.2
Source dir: /home/antony/IdeaProjects/nasc
Build dir: /home/antony/IdeaProjects/nasc/build
Build type: native build
Project name: com.github.parnold_x.nasc
Project version: 0.8.0
C compiler for the host machine: cc (gcc 9.3.0 "cc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0")
C linker for the host machine: cc ld.bfd 2.34
C++ compiler for the host machine: c++ (gcc 9.3.0 "c++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0")
C++ linker for the host machine: c++ ld.bfd 2.34
Vala compiler for the host machine: valac (valac 0.48.6)
Host machine cpu family: x86_64
Host machine cpu: x86_64
Configuring config.vala using configuration
Submodule 'subprojects/libqalculate' (https://github.com/parnold-x/libqalculate.git) registered for path 'libqalculate'
Cloning into '/home/antony/IdeaProjects/nasc/subprojects/libqalculate'...
Submodule path 'libqalculate': checked out 'ad985fd77acfd54ee369d56f6066b1460b973cdb'

|Executing subproject libqalculate method meson 
|
|Project name: libqalculate
|Project version: 3.10.0
|C compiler for the host machine: cc (gcc 9.3.0 "cc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0")
|C linker for the host machine: cc ld.bfd 2.34
|C++ compiler for the host machine: c++ (gcc 9.3.0 "c++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0")
|C++ linker for the host machine: c++ ld.bfd 2.34
|Found pkg-config: /usr/bin/pkg-config (0.29.1)
|Run-time dependency gio-2.0 found: YES 2.64.6
|Found pkg-config: /usr/bin/pkg-config (0.29.1)
|Run-time dependency libcurl found: YES 7.68.0
|Run-time dependency icu-uc found: YES 66.1
|Library mpfr found: YES
|Library gmp found: YES
|Run-time dependency libxml-2.0 found: YES 2.9.10
|Run-time dependency threads found: YES
|Configuring config.h using configuration
|Configuring support.h using configuration
|Build targets in project: 11
|Subproject libqalculate finished.

Run-time dependency gee-0.8 found: YES 0.20.3
Run-time dependency glib-2.0 found: YES 2.64.6
Run-time dependency granite found: YES 5.3.0
Run-time dependency gtk+-3.0 found: YES 3.24.20
Run-time dependency gtksourceview-3.0 found: YES 3.24.11
Run-time dependency webkit2gtk-4.0 found: YES 2.34.1
Library posix found: YES
Library QalculateNasc found: YES
Program python3 found: YES (/usr/bin/python3)
Program /usr/bin/python3 found: YES (/usr/bin/python3)
Build targets in project: 20

com.github.parnold_x.nasc 0.8.0

  Subprojects
    libqalculate: YES

Found ninja-1.10.0 at /usr/bin/ninja
antony@antony-X570-AORUS-MASTER ~/I/nasc (master)> ninja -C build install
ninja: Entering directory `build'
[1/76] Generating intltool-merge-xml_file-prefixes.xml.in with a custom command.
Merging translations into subprojects/libqalculate/data/prefixes.xml.
CREATED subprojects/libqalculate/data/prefixes.xml
[2/76] Generating intltool-merge-xml_file-planets.xml.in with a custom command.
Merging translations into subprojects/libqalculate/data/planets.xml.
CREATED subprojects/libqalculate/data/planets.xml
[3/76] Generating intltool-merge-xml_file-datasets.xml.in with a custom command.
Merging translations into subprojects/libqalculate/data/datasets.xml.
CREATED subprojects/libqalculate/data/datasets.xml
[4/76] Generating intltool-merge-xml_file-elements.xml.in with a custom command.
Merging translations into subprojects/libqalculate/data/elements.xml.
CREATED subprojects/libqalculate/data/elements.xml
[5/76] Generating intltool-merge-xml_file-variables.xml.in with a custom command.
Merging translations into subprojects/libqalculate/data/variables.xml.
CREATED subprojects/libqalculate/data/variables.xml
[6/76] Generating intltool-merge-xml_file-currencies.xml.in with a custom command.
Merging translations into subprojects/libqalculate/data/currencies.xml.
CREATED subprojects/libqalculate/data/currencies.xml
[7/76] Generating intltool-merge-xml_file-units.xml.in with a custom command.
Merging translations into subprojects/libqalculate/data/units.xml.
CREATED subprojects/libqalculate/data/units.xml
[10/76] Generating intltool-merge-xml_file-functions.xml.in with a custom command.
Merging translations into subprojects/libqalculate/data/functions.xml.
CREATED subprojects/libqalculate/data/functions.xml
[14/76] Compiling Vala source ../src/Calculator.vala ../src/Controller.vala ../src/HelpBox.vala ../src/InputView.vala ../src/List...rc/PeriodicTable.vala ../src/ResultBoxWidget.vala ../src/ResultLine.vala ../src/ResultView.vala ../src/Tutorial.vala config.vala.
FAILED: com.github.parnold_x.nasc@exe/src/Calculator.c com.github.parnold_x.nasc@exe/src/Controller.c com.github.parnold_x.nasc@exe/src/HelpBox.c com.github.parnold_x.nasc@exe/src/InputView.c com.github.parnold_x.nasc@exe/src/ListFooter.c com.github.parnold_x.nasc@exe/src/MainWindow.c com.github.parnold_x.nasc@exe/src/Nasc.c com.github.parnold_x.nasc@exe/src/NascSettings.c com.github.parnold_x.nasc@exe/src/OpenBox.c com.github.parnold_x.nasc@exe/src/MathBinDialog.c com.github.parnold_x.nasc@exe/src/PeriodicTable.c com.github.parnold_x.nasc@exe/src/ResultBoxWidget.c com.github.parnold_x.nasc@exe/src/ResultLine.c com.github.parnold_x.nasc@exe/src/ResultView.c com.github.parnold_x.nasc@exe/src/Tutorial.c com.github.parnold_x.nasc@exe/build/config.c 
valac -C --debug --debug --pkg posix /home/antony/IdeaProjects/nasc/vapi/QalculateNasc.vapi --pkg posix --pkg webkit2gtk-4.0 --pkg gtksourceview-3.0 --pkg gtk+-3.0 --pkg granite --pkg glib-2.0 --pkg gee-0.8 --color=always --directory com.github.parnold_x.nasc@exe --basedir ../ --gresources=../subprojects/libqalculate/data/definitions.gresource.xml ../src/Calculator.vala ../src/Controller.vala ../src/HelpBox.vala ../src/InputView.vala ../src/ListFooter.vala ../src/MainWindow.vala ../src/Nasc.vala ../src/NascSettings.vala ../src/OpenBox.vala ../src/MathBinDialog.vala ../src/PeriodicTable.vala ../src/ResultBoxWidget.vala ../src/ResultLine.vala ../src/ResultView.vala ../src/Tutorial.vala config.vala
../src/NascSettings.vala:51.32-51.47: error: The name `Settings' does not exist in the context of `Granite' (granite)
        var granite_settings = Granite.Settings.get_default ();
                               ^^^^^^^^^^^^^^^^
../src/NascSettings.vala:55.99-55.114: error: The name `Settings' does not exist in the context of `Granite' (granite)
        gtk_settings.gtk_application_prefer_dark_theme = granite_settings.prefers_color_scheme == Granite.Settings.ColorScheme.DARK;
                                                                                                  ^^^^^^^^^^^^^^^^
../src/InputView.vala:70.25-70.65: warning: `Gtk.StyleContext.get_font' has been deprecated since 3.8
../src/InputView.vala:72.9-72.33: warning: `Gtk.Widget.override_font' has been deprecated since 3.16
../src/InputView.vala:304.29-304.41: warning: `Gtk.Alignment' has been deprecated since 3.14
../src/InputView.vala:304.13-304.21: warning: `Gtk.Alignment' has been deprecated since 3.14
../src/InputView.vala:310.13-310.42: warning: `Gtk.Widget.override_background_color' has been deprecated since 3.16
../src/ResultView.vala:40.27-40.39: warning: `Gtk.Alignment' has been deprecated since 3.14
../src/ResultView.vala:55.25-55.63: warning: `Gtk.StyleContext.get_font' has been deprecated since 3.8
../src/ResultView.vala:57.9-57.31: warning: `Gtk.Widget.override_font' has been deprecated since 3.16
../src/ResultView.vala:73.9-73.43: warning: `Gtk.Widget.override_background_color' has been deprecated since 3.16
../src/ResultView.vala:133.29-133.41: warning: `Gtk.Alignment' has been deprecated since 3.14
../src/ResultView.vala:133.13-133.21: warning: `Gtk.Alignment' has been deprecated since 3.14
../src/ResultView.vala:136.9-136.38: warning: `Gtk.Widget.override_background_color' has been deprecated since 3.16
../src/HelpBox.vala:240.9-240.43: warning: Access to possible `null'. Perform a check or use an unsafe cast.
        (cell as Gtk.CellRendererText).text = name;
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/HelpBox.vala:244.13-244.47: warning: Access to possible `null'. Perform a check or use an unsafe cast.
            (cell as HelpCellRenderer).category = true;
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/HelpBox.vala:246.13-246.47: warning: Access to possible `null'. Perform a check or use an unsafe cast.
            (cell as HelpCellRenderer).category = false;
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/MathBinDialog.vala:61.21-61.41: warning: implicit .begin is deprecated
../src/MathBinDialog.vala:63.21-63.41: warning: implicit .begin is deprecated
../src/Tutorial.vala:45.9-45.27: warning: `Gtk.Button.xalign' has been deprecated since 3.14
../src/Tutorial.vala:143.13-143.38: warning: Access to possible `null'. Perform a check or use an unsafe cast.
            (tp as TutorialPage).close.connect (() => {
            ^^^^^^^^^^^^^^^^^^^^^^^^^^
Compilation failed: 2 error(s), 19 warning(s)
[47/76] Compiling C++ object 'subprojects/libqalculate/libqalculate/163e77a@@qalculate@sta/Calculator-definitions.cc.o'.
ninja: build stopped: subcommand failed.
antony@antony-X570-AORUS-MASTER ~/I/nasc (master) [1]> 
parnoldx commented 2 years ago

Maybe you must install something else in Ubuntu. I don`t know. The class exist in Granite however https://github.com/elementary/granite/blob/master/lib/Services/Settings.vala

astubbs commented 2 years ago

Is the compile time dependency for Granite set to a high enough version?

Run-time dependency granite found: YES 5.3.0

antony@antony-X570-AORUS-MASTER ~ [1]> aptitude show libgranite-dev
Package: libgranite-dev           
Version: 5.3.0-1
State: installed
Automatically installed: no
Multi-Arch: same
Priority: optional
Section: universe/libdevel
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Uncompressed Size: 485 k
Depends: gir1.2-granite-1.0 (= 5.3.0-1), libgee-0.8-dev, libglib2.0-dev, libgranite5 (= 5.3.0-1), libgtk-3-dev (>= 3.3.14)
Description: extension of GTK+ libraries (development files)
 Granite is an extension of GTK+. Among other things, it provides complex widgets and convenience functions designed for use in apps built for elementary OS. 

 This package contains the static library and header files.
Homepage: https://github.com/elementary/granite
pawandubey commented 2 years ago

Maybe you must install something else in Ubuntu. I don`t know. The class exist in Granite however https://github.com/elementary/granite/blob/master/lib/Services/Settings.vala

This is not the class it's failing at. The missing class is Widgets/Settings, which was only introduced in 5.4.0: https://github.com/elementary/granite/commit/ca16d46d01df28323781f04086adea385fed4bc9#diff-9c051dce9be6e885ed087c778e6fdd6ddc239ef72313eb6846004d4fc72ea503

20.04 doesn't have anything over 5.3 in its repositories it seems.

parnoldx commented 2 years ago

Ah ok, thanks for the clarification