Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Tauri v2 has constrained compatibility on Linux #9039

Open
hjmallon opened this issue Feb 29, 2024 · 4 comments
Open

[bug] Tauri v2 has constrained compatibility on Linux #9039

hjmallon opened this issue Feb 29, 2024 · 4 comments
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@hjmallon
Copy link

hjmallon commented Feb 29, 2024

Describe the bug

(I guess this is just that the minimal version requirements for v2 are > RHEL9 and this is probably wontfix)?

With Tauri v1 we were building with CentOS7. I have just tried to update to Tauri v2 and have had to confront a couple of problems.

  1. Tauri v2 requires node v18+ (which seems fair), installing this on CentOS7 is not easy since nodejs dropped support for CentOS 7 in v18 in their upstream builds. There are some unsupported builds, but only for x86_64, not aarch64.
  2. Tauri v2 uses a more recent webkit (https://github.com/tauri-apps/tauri-docs/blob/425563db3849ceed10fcc5d1b6d73ea6bc7f1ec4/src/content/docs/blog/tauri-2-0-0-alpha-3.md?plain=1#L32)

In order to fix the first problem I decided to build on CentOS9 stream, which is quite similar to our target platform. However CentOS9 stream uses glib2 2.68.4. Unfortunately the rust crate soup3 requires gio 2.70 and so I can no longer build without moving to Fedora or Ubuntu. (Ubuntu 20.04 which is still in support has the same issue).

Reproduction

Try to build an example app on CentOS 9 Stream, or Rocky 9, or Ubuntu 20.04.

Expected behavior

I would expect Tauri v2 to be capable of building on modern enterprise Linux and/or this stuff to be listed in the What other breaking changes we are going to expect? section here https://github.com/tauri-apps/tauri-docs/blob/425563db3849ceed10fcc5d1b6d73ea6bc7f1ec4/src/content/docs/blog/tauri-2-0-0-alpha-3.md?plain=1#L32

Full tauri info output

$ yarn tauri info
yarn run v1.22.21
$ tauri info

[✘] Environment
    - OS: CentOS 9.0.0 X64
    ✘ webkit2gtk-4.1: not installed
      Visit https://tauri.app/v1/guides/getting-started/prerequisites to learn more about tauri prerequisites
    ✔ rsvg2: 2.50.7
    ✔ rustc: 1.75.0 (82e1608df 2023-12-21)
    ✔ cargo: 1.75.0 (1d8b05cdd 2023-11-20)
    ⚠ rustup: not installed!
      If you have rust installed some other way, we recommend uninstalling it
      then use rustup instead. Visit https://rustup.rs/
    ⚠ Rust toolchain: couldn't be detected!
      Maybe you don't have rustup installed? if so, Visit https://rustup.rs/
    - node: 20.9.0
    - yarn: 1.22.21
    - npm: 10.1.0

[-] Packages
    - tauri [RUST]: 2.0.0-beta.7
    - tauri-build [RUST]: 2.0.0-beta.5
    - wry [RUST]: 0.37.0
    - tao [RUST]: 0.26.0
    - @tauri-apps/api [NPM]: 2.0.0-beta.3
    - @tauri-apps/cli [NPM]: 2.0.0-beta.6

[-] App
    - build-type: bundle
    - CSP: default-src 'self'; style-src 'self' 'unsafe-inline'; img-src data:; connect-src ipc: http://ipc.localhost
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: React
    - bundler: Vite
Done in 6.22s.

Stack trace

No response

Additional context

No response

@hjmallon hjmallon added status: needs triage This issue needs to triage, applied to new issues type: bug labels Feb 29, 2024
@hjmallon
Copy link
Author

hjmallon commented Mar 1, 2024

OK I think this will be a wontfix, but it has led me to look into this webkit gtk stuff to work out where native support is possible and this might be useful to feed back into the docs.

Different webkit gtk apis

A. webkitgtk (WebKit1 API, gtk3, removed in webkitgtk 2.6.0)
B. webkit2gtk-3.0 (WebKit2 API, gtk3, webkitgtk <2.6.0)
C. webkit2gtk-4.0 (WebKit2 API, gtk3, libsoup2, webkitgtk >=2.6.0)
D. webkit2gtk-4.1 (WebKit2 API, gtk3, libsoup3)
E. webkit2gtk-5.0 (WebKit2 API, gtk4, unstable before...)
F. webkit2gtk-6.0 (WebKit2 API, gtk4)

(B and E appear to be academic and rare, A is so old as to not be relevant)

Tauri v1 uses webkit2gtk-4.0 (C), this is available on a lot of Linux distros (not limited to)

  • Ubuntu 15.04 - 23.10 (as libwebkit2gtk-4.0-dev)
  • Debian Jessie - Bookworm (as libwebkit2gtk-4.0-dev) [I didn't check older]
  • Fedora 37 - 39 (as webkit2gtk4.0-devel)
  • Fedora 28 - 36, CentOS/RHEL 8 - 9 (as webkit2gtk3-devel)
  • Fedora 21 - 27, CentOS 7 (as webkitgtk4-devel, wow this naming is bonkers)

Tauri v2 uses webkit2gtk-4.1 (D), this is available on recent Linux distros

  • Ubuntu 22.04 - 23.10 (as libwebkit2gtk-4.1-dev)
  • Fedora 37 - 39 (as webkit2gtk4.1-devel)

====================

So how can we use Tauri v2 for applications to be deployed into older environments?

AppImage: This bundles in the shared libs, but does not bundle in glibc (maybe it can in some configs??). So we probably cannot make a CentOS 9 builds with this

FlatPak: ? I have not used Flatpak before

Building libsoup3 and webkit2gtk-4.1 for CentOS 9 (this is what I will try next)

@hjmallon
Copy link
Author

hjmallon commented Mar 1, 2024

libsoup3 requires glib 2.69.1 (now 2.70) to build, so that would involve updating the system glib2, which seems a bit invasive.

https://gitlab.gnome.org/GNOME/libsoup/-/issues/292

@FabianLars
Copy link
Member

This is indeed a won't fix, we weren't fans of the 4.0 -> 4.1 update either but were kinda forced to do it (it kinda paves the way to the gtk4 upgrade which has the same version requirements so i guess that's good).

I would have loved to have support 4.0 and 4.1 at the same time (compile time flag) but yeah, that didn't happen.

So how can we use Tauri v2 for applications to be deployed into older environments?

Right now the only backwards compatible way (that i know of) is indeed flatpak (via flathub preferably) and indeed one of the main reasons for the 4.1 move apart from issues with 4.0/2.4 that weren't getting fixed. snap may also work, i don't know.

I also regularly try to make appimages work for this but so far it has never worked out.

@super-fun-surf
Copy link

We just tried an AppImage on Ubuntu 22 and got error
symbol lookup error: /tmp/.mount_APPNAME_0oPuCJo/usr/lib/libpango-1.0.so.0: undefined symbol hb_ot_layout_get_horizontal_baseline_tag_for_script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

3 participants