sonnyp / Tangram

Browser for your pinned tabs
https://apps.gnome.org/app/re.sonny.Tangram/
GNU General Public License v3.0
882 stars 37 forks source link

Cannot build from source (Help wanted / no bug) #204

Closed chiffshinz closed 1 year ago

chiffshinz commented 1 year ago

Tangram version

Source from main branch (00867d915df6348a90e0b8288e3f4cd1b9b6d344)

Linux distribution

Fedora 36

Flatpak version

Flatpak 1.12.7

Desktop environment

GNOME 42.4

I want to build Tangram from source. Problem is, I'm just starting out with Meson, GTK, etc. That's probably why I wasn't able to build it so far. I tried different paths, so far:

As far as I can tell from the README and #128 and #169, I should be able to clone the repository, initialize the troll git submodule, and then click on "build" in GNOME builder. I get the following error:

flatpak build --env=LANG=en_GB.UTF-8 --env=USER=chiff --env=HOME=/home/chiff --env=PATH=/usr/bin:/bin --env=TERM=xterm-256color --env=V=0 --env=CCACHE_DIR=/home/chiff/.cache/gnome-builder/flatpak-builder/ccache --env=FLATPAK_CONFIG_DIR=/home/chiff/.local/share/gnome-builder/flatpak/etc --env=PATH=/app/bin:/usr/bin --env=G_MESSAGES_DEBUG= --env=XDG_RUNTIME_DIR=/run/user/1000 --build-dir=/home/chiff/.cache/gnome-builder/projects/Tangram/builds/re.sonny.Tangram.json-flatpak-org.gnome.Platform-master-x86_64-main --share=network --nofilesystem=host --filesystem=/home/chiff/.cache/gnome-builder --filesystem=/home/chiff/Projects/Tangram --filesystem=/home/chiff/.cache/gnome-builder/projects/Tangram/builds/re.sonny.Tangram.json-flatpak-org.gnome.Platform-master-x86_64-main --env=NOCONFIGURE=1 /home/chiff/.cache/gnome-builder/projects/Tangram/flatpak/staging/x86_64-main ninja
[0/1] Regenerating build files.

ERROR: Neither directory contains a build file meson.build.
FAILED: build.ninja 
/usr/bin/meson --internal regenerate /home/chiff/dev/project/Tangram /home/chiff/.cache/gnome-builder/projects/Tangram/builds/re.sonny.Tangram.json-flatpak-org.gnome.Platform-master-x86_64-main --backend ninja
ninja: error: rebuilding 'build.ninja': subcommand failed

I also tried running run.sh but there I get the following error:

[chiff@fedora Tangram]$ ./run.sh
Failed to open file “data/re.sonny.Tangram.data.gresource.xml”: No such file or directory

(re.sonny.Tangram:799929): Gjs-WARNING **: 11:49:50.251: JS ERROR: Error: Requiring WebKit2, version 5.0: Typelib file for namespace 'WebKit2', version '5.0' not found
require@resource:///org/gnome/gjs/modules/esm/gi.js:14:24
@gi://WebKit2?version=5.0:3:25
@file:///home/chiff/Projects/Tangram/re.sonny.Tangram:67:6

I have installed the following packages, related to webkit:

[chiff@fedora Tangram]$ dnf list --installed | grep webkit
libproxy-webkitgtk4.x86_64                        0.4.18-1.fc36                       @updates                                         
qt5-qtwebkit.x86_64                               5.212.0-0.68.alpha4.fc36            @updates                                         
webkit2gtk3.x86_64                                2.38.0-2.fc36                       @updates                                         
webkit2gtk3-jsc.x86_64                            2.38.0-2.fc36                       @updates

I'm pretty sure, that it's quite simple to fix, but my knowledge of the GNOME development ecosystem is lacking.

If someone could give me some pointers, and the correct, recommended way to build Tangram from source, that would be much appreciated.

sonnyp commented 1 year ago

For ./run.sh to work you need to install webkit2gtk5.0

For GNOME Builder - I can reproduce - I'm gonna have a look.

sonnyp commented 1 year ago

Fixed in main - please try again with GNOME Builder and confirm.

chiffshinz commented 1 year ago

Thanks a lot! I'm now able to build it in GNOME Builder. At first, I still got the same error, but then messed around with Build Configurations. I'm now able to run it! I have set it to: re.sonny.Tangram.json and am targeting GNOME 43. This solves the issue with the missing webkit2gtk5.0, which I, at first, also encountered when running from GNOME builder.

This is now resolved, maybe you could specify in the README which build config we should choose. Thanks again.