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

Install on Linux Mint 22 - libwebkit2gtk-4.0-dev not installable and declare_dependency error #195

Open undecided opened 1 day ago

undecided commented 1 day ago

Describe the bug Does not install on latest version of Linux Mint (and probably ubuntu) - cannot install dependencies

To Reproduce Steps to reproduce the behavior:

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

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libwebkit2gtk-4.0-dev
E: Couldn't find any package by glob 'libwebkit2gtk-4.0-dev'

Available packages: libwebkit2gtk-4.1-dev - however, it doesn't build with that package

WARNING: CMake Toolchain: Failed to determine CMake compilers state
Run-time dependency webkit2gtk-4.0 found: NO (tried pkgconfig and cmake)

meson.build:89:8: ERROR: Dependency "webkit2gtk-4.0" not found, tried pkgconfig and cmake

If you manage to work around those, finally, subprojects/libqalculate/libqalculate/meson.build raises an error:

subprojects/libqalculate/libqalculate/meson.build:119:26: ERROR: declare_dependency keyword argument 'link_with' was of type array[str] but should have been array[BothLibraries | SharedLibrary | StaticLibrary | CustomTarget | CustomTargetIndex | Jar | Executable | Dependency]

Expected behavior Installable from instructions in BUILDING.md

Desktop (please complete the following information):

undecided commented 1 day ago

My current workarounds: temporarily adding the following to /etc/apt/sources.list.d/official-package-repositories.list

deb http://www.mirrorservice.org/sites/archive.ubuntu.com/ubuntu lunar main restricted universe multiverse

... before doing an apt update, then allows you to install all the dependencies. However, I'd strongly recommend against this, and in fact I think libwebkit2gtk-4.0-dev is the only package that needs this workaround - the latest packages in the repos for all the other dependencies are fine

And editing subprojects/libqalculate/libqalculate/meson.build replacing line 120

  link_with: 'libqalculate_lib_static',

becomes

  link_with: library('libqalculate_lib_static'),

seems to do the trick nicely!