Files
anki/.github/workflows
xiaohan484 f13c15aef0 fix: build bundled fcitx5 plugin against the bundled Qt (#5142)
## Linked issue (required)

Fixes #5110

## Summary / motivation (required)

CI builds the fcitx5 plugin against one Qt but ships it inside PyQt6's
Qt — a
version mismatch that crashes Anki on startup for every fcitx5 user.

**Root cause:** the plugin subclasses `QPlatformInputContext`, a Qt
private API
with no ABI guarantee across minor versions. Built against Qt 6.2.4
headers but
run inside Qt 6.11.0, it dereferences a misplaced member and SIGSEGVs on
first
focus.

**Solution:** build the plugin against the same Qt as the bundled
`pyqt6-qt6`
and install it where the packaging step (`qt/tools/build_installer.py`)
looks.
The per-flag reasoning is in the commit message.

## Steps to reproduce (required, use N/A if not applicable)

1. On a Linux desktop configured to use fcitx5 as the input method,
install the
   official Anki 26.05 release.
2. Launch Anki normally.
3. It dies with SIGSEGV on startup, as soon as the main window takes
focus.

## How to test (required)

### Checklist (minimum)

- [x] I ran `./ninja check` or an equivalent relevant check locally.
- [ ] I added or updated tests when the change is non-trivial or
behavior changed.

### Details

`release.yml` is `workflow_dispatch`-only, so it can't run on the PR. I
reproduced its build step locally: rebuilt the plugin against Qt 6.11.0
(confirmed the `Qt_6.11` ELF tag and a clean `dlopen(RTLD_NOW)`),
dropped it into
an Anki 26.05 bundle, and typed Chinese and Japanese without the crash.

## Risk / compatibility / migration (optional)

1. Fixes `build-linux-x86` only. `build-linux-arm-installer` installs a
prebuilt
`fcitx5-frontend-qt6` from apt, built against Ubuntu's Qt rather than
the
bundled 6.11.0 — the same class of mismatch. I have no arm hardware to
confirm
   or fix it, so it's left for a follow-up.
2. Adds an `aqtinstall` step (~1.5 GB Qt download) to the Linux release
build.
3. **Not validated on CI.** `release.yml` is `workflow_dispatch`-only,
so an
external contributor can't run it; only its build step is reproduced
locally
   (see How to test). **Please confirm it in a real release build.**

## UI evidence (required for visual changes; otherwise N/A)

N/A

## Scope

- [x] This PR is focused on one change (no unrelated edits).
2026-07-15 16:19:30 +03:00
..