Skip to content

Fix readline path resolution for Apple Silicon - #70

Merged
mellowcandle merged 2 commits into
mellowcandle:masterfrom
petrostrak:fix_readline_path_resolution_for_Apple_Silicon
Aug 18, 2026
Merged

Fix readline path resolution for Apple Silicon#70
mellowcandle merged 2 commits into
mellowcandle:masterfrom
petrostrak:fix_readline_path_resolution_for_Apple_Silicon

Conversation

@petrostrak

@petrostrak petrostrak commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Fix readline path resolution for Apple Silicon (CI + build docs)

  • Both CI pipelines and the "Building from source" docs hardcoded the Intel-Mac Homebrew prefix (/usr/local/opt/readline) for readline's include/lib paths. On Apple Silicon, Homebrew installs to /opt/homebrew, so that path silently doesn't exist and the build falls back to Apple's SDK readline.h (a libedit compatibility shim), causing rl_resize_terminal and related symbols to be undeclared.
  • .github/workflows/build-osx.yaml: removed the hardcoded CPPFLAGS/LDFLAGS and resolve the readline prefix dynamically via brew --prefix readline, so it works on both arm64 and x86_64 runners.
  • .github/workflows/c-cpp.yml: added libreadline-dev to the apt-get install step — the Linux job was missing the readline dev headers entirely, so configure fell back to a minimal extern declaration missing rl_point, rl_line_buffer, rl_display_prompt, rl_catch_signals, etc.
  • README.md: updated the Mac build instructions to use $(brew --prefix readline) instead of the hardcoded path, so the documented steps work on any Mac architecture.

Test plan

  • Local macOS (Apple Silicon) build verified with corrected CPPFLAGS/LDFLAGS
  • Local linux build verified
  • CI green on push (both C build (OSX) and C/C++ CI workflows)

@mellowcandle
mellowcandle merged commit 53f87a7 into mellowcandle:master Aug 18, 2026
2 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