Skip to content

fix: resolve build failures for missing xi library and anyhow macro#7

Open
lucasrcezimbra wants to merge 2 commits intobyteowlz:mainfrom
lucasrcezimbra:fix/build-errors
Open

fix: resolve build failures for missing xi library and anyhow macro#7
lucasrcezimbra wants to merge 2 commits intobyteowlz:mainfrom
lucasrcezimbra:fix/build-errors

Conversation

@lucasrcezimbra
Copy link
Copy Markdown

Summary

Two build errors prevented just install-ears from completing:

Fix 1: justfile — missing libxi / libxtst dependency checks

The check-deps recipe only checked for sentencepiece on Linux. The x11 crate requires libxi >= 1.7 (xi.pc) at compile time, but libxi-dev (and libxtst-dev) were never installed by the recipe, causing the build to fail with:

The system library xi required by crate x11 was not found.

Fix: Added pkg-config presence checks and auto-install steps for libxi and libxtst across Debian/Ubuntu, Fedora/RHEL, and Arch Linux. Also improved the unsupported-distro error message to list all required libraries.

Fix 2: src/virtual_keyboard.rs — missing anyhow! macro import

The anyhow! macro was used in virtual_keyboard.rs but only the anyhow crate itself was imported, not the macro, causing:

error: cannot find macro `anyhow` in this scope

Fix: Added anyhow to the existing import:

use anyhow::{Context, Result, anyhow};

The check-deps recipe was only checking for sentencepiece on Linux,
causing builds to fail when libxi-dev (xi.pc) was not installed.
The x11 crate requires libxi >= 1.7, so add pkg-config checks and
auto-install steps for libxi and libxtst across Debian/Ubuntu,
Fedora/RHEL, and Arch Linux. Also improve the unsupported distro
error message to list all required libraries.
The anyhow! macro was used on line 215 but only the anyhow crate was
in scope, not the macro. Add the macro to the existing use statement:
  use anyhow::{Context, Result, anyhow};
@lucasrcezimbra lucasrcezimbra marked this pull request as ready for review March 30, 2026 19:41
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.

1 participant