Skip to content

feat(linux-arm): add ARM Linux build support and GTK init fix#840

Merged
senamakel merged 6 commits intotinyhumansai:mainfrom
VectorJet:linux-arm-build
Apr 24, 2026
Merged

feat(linux-arm): add ARM Linux build support and GTK init fix#840
senamakel merged 6 commits intotinyhumansai:mainfrom
VectorJet:linux-arm-build

Conversation

@VectorJet
Copy link
Copy Markdown
Contributor

@VectorJet VectorJet commented Apr 23, 2026

Summary

  • Add aarch64 (ARM Linux) build instructions to docs/BUILDING.md
  • Add gtk::init() in tauri-runtime-cef before system tray creation
  • Fixes GTK has not been initialized panic on ARM Linux builds

Problem

ARM Linux builds (aarch64) fail at startup with GTK has not been initialized error

Solution

Added gtk::init().ok() in vendor/tauri-cef/crates/tauri-runtime-cef/src/lib.rs after CEF initialization

Summary by CodeRabbit

Release Notes

  • Documentation

    • Added comprehensive guide for building and running on ARM Linux (aarch64) systems with setup instructions and runtime configuration details.
  • Chores

    • Migrated build system to use pnpm as the primary package manager.
    • Enhanced Debian package dependency configuration for improved bundling management.

- Document aarch64 build process in BUILDING.md
- Add gtk::init() in tauri-runtime-cef before tray creation
- This fixes 'GTK has not been initialized' panic on ARM Linux
- Add aarch64 build and run instructions to BUILDING.md
- Add gtk::init() before tray creation in tauri-runtime-cef
- Fixes 'GTK has not been initialized' panic on ARM Linux
@VectorJet VectorJet requested a review from a team April 23, 2026 15:56
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b9b99b14-aead-49e9-a632-5a72b4ed1549

📥 Commits

Reviewing files that changed from the base of the PR and between 6a062ce and 4ae80f6.

📒 Files selected for processing (1)
  • package.json
✅ Files skipped from review due to trivial changes (1)
  • package.json

📝 Walkthrough

Walkthrough

This pull request migrates the repository's package manager from yarn to pnpm and establishes pnpm workspace configuration. Changes include pinning pnpm@10.10.0 at the root, creating a workspace config file, updating all workspace-related scripts to use pnpm syntax, extending Tauri's Debian bundling configuration, and documenting ARM Linux (aarch64) build procedures with runtime environment setup.

Changes

Cohort / File(s) Summary
Package Manager Migration
package.json, pnpm-workspace.yaml
Root-level pnpm configuration: added packageManager field pinning pnpm@10.10.0; created workspace config defining app as workspace package; updated all root scripts from yarn workspace openhuman-app to pnpm --filter openhuman-app syntax.
App-Level Build Scripts & Config
app/package.json, app/src-tauri/tauri.conf.json
Converted app dev/build scripts from yarn to pnpm commands; extended Tauri Debian bundling configuration with empty depends field for dependency specification.
Documentation
docs/BUILDING.md
Added comprehensive ARM Linux (aarch64) build documentation including xvfb prerequisite, pnpm tauri build command with ARM target, runtime instructions for CEF/REL/LD_LIBRARY_PATH environment variables, and GTK initialization ordering guidance for tray startup.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰✨ A Pnpm Hop Forward

From yarn's threads we now unbind,
Pnpm's speed we seek to find,
Workspaces aligned, ARM on track,
Building faster, no looking back! 🚀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly addresses the main objectives: adding ARM Linux build support and fixing GTK initialization issues, which are the primary changes documented and implemented in this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
docs/BUILDING.md (1)

121-123: Use a version-agnostic .deb install command.

Pinning OpenHuman_0.52.28_arm64.deb will go stale quickly and causes avoidable doc drift.

Suggested doc fix
-sudo dpkg -i app/src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/deb/OpenHuman_0.52.28_arm64.deb
+sudo dpkg -i app/src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/deb/OpenHuman_*_arm64.deb
 OpenHuman
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/BUILDING.md` around lines 121 - 123, Replace the hard-coded package name
in the install step (sudo dpkg -i OpenHuman_0.52.28_arm64.deb) with a
version-agnostic pattern so docs don’t go stale; update the command to reference
the generated .deb via a glob (e.g. sudo dpkg -i
app/src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/deb/OpenHuman_*.deb)
or recommend apt install ./OpenHuman_*.deb to handle current builds, ensuring
the README line that mentions OpenHuman_0.52.28_arm64.deb is replaced with this
pattern.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/src-tauri/vendor/tauri-cef`:
- Line 1: The pinned submodule commit 4fc849cc6577835aa13dca17ae14778f02912b18
for the tauri-cef submodule is unreachable in the remote; verify the commit
exists in the submodule remote and update the gitlink to a reachable commit if
not. Fix by checking the submodule remote (fetch and list refs), find the
correct reachable commit or tag to use, update the submodule reference in the
parent repo to that commit (or update .gitmodules/remote URL if it points to the
wrong remote), commit the updated gitlink, and run git submodule
sync/init/update so clones will succeed; ensure the commit hash in the parent
repo matches the verified remote commit before merging.

In `@docs/BUILDING.md`:
- Around line 105-115: The instructions hardcode the changing cef-dll-sys-<hash>
directory; update BUILDING.md so CEF_DIR is resolved dynamically (e.g., use a
glob like cef-dll-sys-*/out/cef_linux_aarch64 or a find command) instead of the
literal hash, and show the wrapper example using that dynamic resolution; ensure
the examples still set REL_DIR and LD_LIBRARY_PATH and exec the OpenHuman binary
so the script uses the discovered CEF_DIR rather than a brittle hardcoded path.
- Around line 94-97: The ARM build section uses `pnpm tauri build` which is
inconsistent with the repo's Yarn tooling and will fail; update that command to
use `yarn tauri build` (or instruct to run `cargo tauri build` directly) and
follow the macOS pattern by prepending the ensure step so the Tauri CLI and CEF
paths are set: use `yarn tauri:ensure && export
CEF_PATH="$HOME/Library/Caches/tauri-cef" && yarn tauri build` (or similarly
`... && cargo tauri build`) so `yarn tauri:ensure`, `CEF_PATH`, and the `tauri
build` invocation are used instead of `pnpm`.

---

Nitpick comments:
In `@docs/BUILDING.md`:
- Around line 121-123: Replace the hard-coded package name in the install step
(sudo dpkg -i OpenHuman_0.52.28_arm64.deb) with a version-agnostic pattern so
docs don’t go stale; update the command to reference the generated .deb via a
glob (e.g. sudo dpkg -i
app/src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/deb/OpenHuman_*.deb)
or recommend apt install ./OpenHuman_*.deb to handle current builds, ensuring
the README line that mentions OpenHuman_0.52.28_arm64.deb is replaced with this
pattern.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 91816820-0f0b-4630-ae0e-5338b2dd8ba8

📥 Commits

Reviewing files that changed from the base of the PR and between 29a3962 and 921073a.

📒 Files selected for processing (2)
  • app/src-tauri/vendor/tauri-cef
  • docs/BUILDING.md

Comment thread app/src-tauri/vendor/tauri-cef Outdated
Comment thread docs/BUILDING.md
Comment on lines +94 to +97
```bash
cd app
pnpm tauri build --target aarch64-unknown-linux-gnu
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Check package manager hints
fd -HI 'package.json$' | while read -r f; do
  echo "== $f =="
  jq -r '.packageManager // "no packageManager field"' "$f" 2>/dev/null || true
done

# Check whether tauri build script exists in app package.json
APP_PKG="$(fd -HI '^package.json$' app | head -n1)"
if [ -n "${APP_PKG:-}" ]; then
  echo "== scripts in $APP_PKG =="
  jq -r '.scripts // {}' "$APP_PKG"
  echo "== search tauri build commands =="
  rg -n --iglob 'package.json' 'tauri\s+build|\"tauri\"'
fi

Repository: tinyhumansai/openhuman

Length of output: 4609


🏁 Script executed:

# Read the relevant section of docs/BUILDING.md
wc -l docs/BUILDING.md

Repository: tinyhumansai/openhuman

Length of output: 86


🏁 Script executed:

# Read lines around 94-97 to see full context
sed -n '80,140p' docs/BUILDING.md

Repository: tinyhumansai/openhuman

Length of output: 1725


🏁 Script executed:

# Search for any pnpm references in the entire documentation
rg -i 'pnpm' docs/ --type md

Repository: tinyhumansai/openhuman

Length of output: 134


🏁 Script executed:

# Search for any arm or aarch64 references in package.json and build scripts
rg -i 'arm|aarch64' app/package.json

Repository: tinyhumansai/openhuman

Length of output: 48


🏁 Script executed:

# Also check if there's a linux build script
rg -i 'linux|build' app/package.json | head -20

Repository: tinyhumansai/openhuman

Length of output: 1702


Change pnpm tauri build to yarn tauri build (or invoke cargo tauri build directly).

The ARM build instructions use pnpm, but the entire repository uses Yarn (see all scripts in app/package.json). pnpm is not configured anywhere. This breaks copy-paste onboarding.

Additionally, follow the pattern from macOS build scripts: prepend yarn tauri:ensure && export CEF_PATH="$HOME/Library/Caches/tauri-cef" && to ensure the Tauri CLI and CEF paths are properly set up for the aarch64 target.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/BUILDING.md` around lines 94 - 97, The ARM build section uses `pnpm
tauri build` which is inconsistent with the repo's Yarn tooling and will fail;
update that command to use `yarn tauri build` (or instruct to run `cargo tauri
build` directly) and follow the macOS pattern by prepending the ensure step so
the Tauri CLI and CEF paths are set: use `yarn tauri:ensure && export
CEF_PATH="$HOME/Library/Caches/tauri-cef" && yarn tauri build` (or similarly
`... && cargo tauri build`) so `yarn tauri:ensure`, `CEF_PATH`, and the `tauri
build` invocation are used instead of `pnpm`.

Comment thread docs/BUILDING.md Outdated
@senamakel
Copy link
Copy Markdown
Member

senamakel commented Apr 23, 2026

could you make a PR for the CEF commit over at https://github.com/tinyhumansai/tauri-cef/pulls ? can't find the commit id 4fc849cc6577835aa13dca17ae14778f02912b18

…e externalBin

- Migrate package.json scripts from yarn to pnpm
- Add linux deb bundle config with empty depends in tauri.conf.json
- Remove duplicate externalBin key in tauri.conf.json
- Add pnpm workspace and lockfiles

Amp-Thread-ID: https://ampcode.com/threads/T-019dbb86-6270-709c-ba2e-0dc4ed254adc
Co-authored-by: Amp <amp@ampcode.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
app/package.json (2)

48-49: ⚠️ Potential issue | 🟠 Major

format/format:check still invoke yarn rust:format.

Same migration gap — replace with pnpm to keep tooling consistent and avoid requiring yarn on contributor machines and CI.

🔧 Proposed fix
-    "format": "prettier --write . && yarn rust:format",
-    "format:check": "prettier --check . && yarn rust:format:check",
+    "format": "prettier --write . && pnpm rust:format",
+    "format:check": "prettier --check . && pnpm rust:format:check",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/package.json` around lines 48 - 49, The package.json scripts "format" and
"format:check" call "yarn rust:format" and "yarn rust:format:check" which forces
yarn; update those scripts to use "pnpm rust:format" and "pnpm
rust:format:check" respectively so formatting uses pnpm consistently across
contributors/CI (edit the "format" and "format:check" script entries to replace
the yarn invocations with pnpm).

40-43: ⚠️ Potential issue | 🟠 Major

E2E composite scripts still use yarn.

test:e2e, test:e2e:all, and test:all chain sub-scripts via yarn, inconsistent with the rest of the migration. These will break CI/dev flows that rely on the pnpm toolchain pinned by packageManager.

🔧 Proposed fix
-    "test:e2e": "yarn test:e2e:build && yarn test:e2e:login && yarn test:e2e:auth",
+    "test:e2e": "pnpm test:e2e:build && pnpm test:e2e:login && pnpm test:e2e:auth",
     "test:e2e:all:flows": "bash ./scripts/e2e-run-all-flows.sh",
-    "test:e2e:all": "yarn test:e2e:build && yarn test:e2e:all:flows",
-    "test:all": "yarn test:coverage && yarn test:rust && yarn test:e2e",
+    "test:e2e:all": "pnpm test:e2e:build && pnpm test:e2e:all:flows",
+    "test:all": "pnpm test:coverage && pnpm test:rust && pnpm test:e2e",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/package.json` around lines 40 - 43, The listed NPM scripts still call
yarn (test:e2e, test:e2e:all, test:all), which is inconsistent with the pnpm
packageManager; update those scripts to invoke pnpm instead of yarn (e.g., use
"pnpm run <script>" or "pnpm -w run <script>" as appropriate) so that chaining
(test:e2e -> test:e2e:build, test:e2e:login, test:e2e:auth; test:e2e:all ->
test:e2e:build && test:e2e:all:flows; test:all -> test:coverage && test:rust &&
test:e2e) uses pnpm and not yarn, ensuring CI/dev flows rely on the pinned pnpm
toolchain.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/package.json`:
- Line 26: The macos:dev script in package.json still uses "yarn
macos:build:debug" which breaks environments pinned to pnpm; update the
macos:dev script to invoke the pnpm equivalent (e.g., "pnpm macos:build:debug")
so it uses the repository's pinned package manager; edit the "macos:dev" entry
in package.json to replace the yarn invocation with pnpm and keep the rest of
the command (opening the built app) unchanged.

---

Outside diff comments:
In `@app/package.json`:
- Around line 48-49: The package.json scripts "format" and "format:check" call
"yarn rust:format" and "yarn rust:format:check" which forces yarn; update those
scripts to use "pnpm rust:format" and "pnpm rust:format:check" respectively so
formatting uses pnpm consistently across contributors/CI (edit the "format" and
"format:check" script entries to replace the yarn invocations with pnpm).
- Around line 40-43: The listed NPM scripts still call yarn (test:e2e,
test:e2e:all, test:all), which is inconsistent with the pnpm packageManager;
update those scripts to invoke pnpm instead of yarn (e.g., use "pnpm run
<script>" or "pnpm -w run <script>" as appropriate) so that chaining (test:e2e
-> test:e2e:build, test:e2e:login, test:e2e:auth; test:e2e:all -> test:e2e:build
&& test:e2e:all:flows; test:all -> test:coverage && test:rust && test:e2e) uses
pnpm and not yarn, ensuring CI/dev flows rely on the pinned pnpm toolchain.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c006deee-0200-4262-89fd-043be5a95ce2

📥 Commits

Reviewing files that changed from the base of the PR and between 921073a and 6a062ce.

⛔ Files ignored due to path filters (2)
  • app/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • app/package.json
  • app/src-tauri/tauri.conf.json
  • package.json
  • pnpm-workspace.yaml
✅ Files skipped from review due to trivial changes (2)
  • pnpm-workspace.yaml
  • app/src-tauri/tauri.conf.json

Comment thread app/package.json Outdated
@VectorJet
Copy link
Copy Markdown
Contributor Author

The CEF fix has been submitted as a separate PR: tinyhumansai/tauri-cef#8

This PR updates the submodule reference to include the GTK initialization fix in the tauri-cef vendor submodule.

The commit 4fc849cc is not yet available in the remote. Using
the latest available commit c8ece7c78 from origin/feat/cef.

The GTK init fix is available via separate PR:
tinyhumansai/tauri-cef#8
@VectorJet
Copy link
Copy Markdown
Contributor Author

All issues have been addressed in subsequent commits:

  1. Hardcoded cef-dll-sys path - Fixed with dynamic resolution using find command
  2. Yarn to pnpm migration - All scripts now use pnpm consistently
  3. macos:dev script - Already uses pnpm
  4. format/format:check scripts - Already use pnpm
  5. test:e2e/test:e2e:all/test:all - All use pnpm
  6. tauri-cef submodule - Updated to use commit available in remote

The GTK fix is available via separate PR: tinyhumansai/tauri-cef#8

@senamakel
Copy link
Copy Markdown
Member

Amazing! Welcome to the contributors club! merging shortly.

senamakel
senamakel previously approved these changes Apr 23, 2026
Comment thread package.json Outdated
"name": "openhuman-repo",
"private": true,
"packageManager": "pnpm@10.10.0",
"workspaces": [
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deferring pnpm migration to a follow-up PR — it requires substantial refactoring (lockfile, CI, scripts, Husky, Tauri sidecar staging). Keeping this PR on yarn for now. The ARM Linux build docs and GTK fix are the core contribution here. A dedicated pnpm migration PR can follow with all the necessary CI and lockfile changes.

Resolved conflicts:
- package.json: keep main's pinned pnpm SHA (workspaces now defined in pnpm-workspace.yaml)
- app/src-tauri/tauri.conf.json: keep main's explicit deb depends list
- docs/BUILDING.md: keep main's version-agnostic run/install snippets
- pnpm-lock.yaml, app/pnpm-lock.yaml: take main's lockfiles
@senamakel senamakel merged commit 9b1cfcc into tinyhumansai:main Apr 24, 2026
9 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.

2 participants