Skip to content

[codex] Fix Linux GTK build compatibility#18

Merged
MarsDoge merged 1 commit into
mainfrom
codex/fix-linux-gtk-build
May 6, 2026
Merged

[codex] Fix Linux GTK build compatibility#18
MarsDoge merged 1 commit into
mainfrom
codex/fix-linux-gtk-build

Conversation

@MarsDoge

@MarsDoge MarsDoge commented May 6, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes the Linux GTK app build failure reported with newer GLib headers.

Root Cause

g_subprocess_launcher_set_environ() expects a mutable gchar **, but run_subprocess() declared envp as const gchar * const *. GCC rejects that incompatible pointer type when compiling linux/LLMTranslateLinux/src/main.c.

The same file also used G_APPLICATION_FLAGS_NONE, which is deprecated in GLib 2.74+.

Changes

  • Change run_subprocess() envp parameter to gchar ** to match GLib's API signature.
  • Use G_APPLICATION_DEFAULT_FLAGS on GLib 2.74+ while keeping G_APPLICATION_FLAGS_NONE for older GLib versions.

Validation

  • git diff --check -- linux/LLMTranslateLinux/src/main.c
  • bash -n install.sh linux/install-desktop.sh linux/llm-translate-linux bin/llm-translate lib/openai_compat.sh lib/stream.sh lib/providers/*.sh macos/LLMTranslateMac/scripts/build-app.sh
  • shellcheck bin/llm-translate install.sh linux/install-desktop.sh linux/llm-translate-linux lib/openai_compat.sh lib/stream.sh lib/providers/*.sh macos/LLMTranslateMac/scripts/build-app.sh

Full Linux GTK make was not run locally because this macOS environment does not have gtk+-3.0 pkg-config development files installed.

@MarsDoge MarsDoge marked this pull request as ready for review May 6, 2026 11:34
@MarsDoge MarsDoge merged commit dea100d into main May 6, 2026
1 check passed
@MarsDoge MarsDoge deleted the codex/fix-linux-gtk-build branch May 6, 2026 11:35
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