Skip to content

fix: #5784 declare ALSA and libgbm dependencies in Linux packages - #5785

Merged
Jocs merged 2 commits into
marktext:developfrom
kukirin-ui:fix/deb-alsa-dependency
Oct 20, 2026
Merged

Jocs merged 2 commits into
marktext:developfrom
kukirin-ui:fix/deb-alsa-dependency

Conversation

@kukirin-ui

Copy link
Copy Markdown
Contributor

Closes #5784

Summary

The Electron binary links libasound.so.2 and libgbm.so.1, but electron-builder's default deb and rpm dependency lists include neither. On a system without them, the package installs and the app then fails with error while loading shared libraries. We found this while testing the arm64 deb from #5778, and the x64 deb has the same gap. Details and logs are in #5784.

This PR sets deb.depends and rpm.depends in packages/desktop/electron-builder.yml. Setting depends replaces electron-builder's defaults, so the defaults are repeated unchanged and two entries are added:

  • deb: libasound2t64 | libasound2 and libgbm1. Ubuntu 24.04+ and Debian trixie ship ALSA as libasound2t64; the alternative keeps 22.04 and older working, where the package is still libasound2.
  • rpm: (alsa-lib or libasound2) and (mesa-libgbm or libgbm1), using the same (a or b) style electron-builder already uses for libXtst and libuuid. These are the Fedora and openSUSE package names.

The other defaults (libgtk-3-0, libatspi2.0-0) already resolve on t64 systems through the Provides of libgtk-3-0t64 and libatspi2.0-0t64, so they stay as they are.

Type of change

  • Bug fix (non-breaking, fixes an issue)
  • New feature (non-breaking, adds functionality)
  • Breaking change (causes existing functionality to change)
  • Documentation update

Test plan

  • New tests added (or explain why not needed)
  • Manually tested on: Linux (clean Ubuntu roots and GitHub Actions builds, details below)

There's no test suite for package metadata, so we tested it like this:

  • Before: the x64 deb from the feat: #5695 ship Linux arm64 packages in releases #5778 PR build (0.22.0-dev) installed into clean ubuntu-base 26.10 and 24.04 roots, and marktext --version failed with libasound.so.2: cannot open shared object file. On 22.04, libgbm.so.1 was missing too.
  • After: the x64 deb (0.23.0-dev) built with this change in the run below, installed into fresh clean ubuntu-base 26.10, 24.04 and 22.04 roots. apt-get install pulls in libasound2t64 and libgbm1 on 26.10 and 24.04, and libasound2 and libgbm1 on 22.04. marktext --version prints MarkText: v0.23.0-dev and Electron: 42.1.0 on all three.
  • Built x64 and arm64 on our fork using only the Linux entries of the PR Build workflow: https://github.com/kukirin-ui/marktext/actions/runs/39125979084. dpkg-deb -I on both debs shows the new Depends line, and the rpm requires include (alsa-lib or libasound2) and (mesa-libgbm or libgbm1).

After, on 24.04:

ii libasound2t64:amd64 1.2.11-1ubuntu0.3
ii libgbm1:amd64 25.2.8-0ubuntu0.24.04.4
MarkText: v0.23.0-dev
Electron: 42.1.0

Notes for reviewers [optional]

We didn't install the rpm on Fedora or openSUSE; the rpm change only adds two requirements next to the existing defaults. The snap, AppImage and tar.gz don't use these lists and are unchanged.


By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@Jocs
Jocs requested a review from Tkaixiang October 18, 2026 15:30
@Jocs
Jocs merged commit bac7325 into marktext:develop Oct 20, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Linux deb/rpm don't declare ALSA and libgbm, app fails to start on minimal systems

2 participants