Skip to content

Fix the text-only (stdio) lowkey build on current Linux - #3463

Merged
vizicist merged 1 commit into
masterfrom
linux-build-gcc15
Oct 12, 2026
Merged

vizicist merged 1 commit into
masterfrom
linux-build-gcc15

Conversation

@vizicist

Copy link
Copy Markdown
Collaborator

make install_stdio fails on current Linux (tested on Ubuntu 26.04: GCC 15.2, glibc 2.42). This PR makes the text-only lowkey build work again, with four one-line changes:

File Change Why
mdep/stdio/mdep1.c Skip <termio.h> on Linux (as already done on FreeBSD) Modern glibc no longer ships termio.h. The termio code is only under TTYSTUFF/TRYWITHOUT, which are never defined.
byacc/makefile.stdio Add -std=gnu89 to CFLAGS GCC 15 defaults to C23 and rejects byacc's K&R-style declarations (e.g. conflicting types for 'strcpy').
mdep/stdio/makefile Add -std=gnu89 to CFLAGS Same C23 issue in the KeyKit sources.
makefile Run updateversion.py with python3 when available, else python Current Ubuntu has no python command.

Testing: a fresh clone of master plus this change builds bin/lowkey on Ubuntu 26.04 x86-64 with no extra packages beyond build-essential, and lowkey -c 'print(6*7)' prints 42. The macOS and GUI (install_linux) builds aren't touched apart from the shared updateversion step, which still falls back to python.

Context: this came up moving timthompson.com's KeyKit-powered music pages (museomatic, expresso, roast, mixup, pieces, life) to a Linux server.

🤖 Generated with Claude Code

Building `make install_stdio` on Ubuntu 26.04 (GCC 15, glibc 2.42)
failed in three places:

- mdep/stdio/mdep1.c included <termio.h>, which modern glibc no longer
  ships. The termio code is only compiled under TTYSTUFF/TRYWITHOUT,
  which are never defined, so skip the header on Linux as on FreeBSD.
- GCC 15 defaults to C23, which rejects the K&R-style declarations in
  byacc and the stdio sources. Compile both with -std=gnu89.
- The updateversion step ran `python`, which current Ubuntu does not
  provide. Use python3 when available, falling back to python.

Tested: fresh clone + this change builds bin/lowkey on Ubuntu 26.04
x86-64, and `lowkey -c 'print(6*7)'` runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vizicist
vizicist merged commit f2e79cb into master Oct 12, 2026
2 checks passed
@vizicist
vizicist deleted the linux-build-gcc15 branch October 12, 2026 02:58
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