Skip to content

fix: seed ncurses pkg-config libdir#49

Merged
jdx merged 1 commit into
mainfrom
fix/ncurses-pkgconf-libdir
Jun 25, 2026
Merged

fix: seed ncurses pkg-config libdir#49
jdx merged 1 commit into
mainfrom
fix/ncurses-pkgconf-libdir

Conversation

@jdx

@jdx jdx commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • create the ncurses pkg-config output directory before configure
  • export PKG_CONFIG_LIBDIR for ncurses so its configure script validates the intended isolated pc-file path
  • build the temporary Ruby 3.2 matching baseruby with psych and zlib against source-built deps so RubyGems can install default gems and unpack bundled gems

Test plan

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jdx, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 47 minutes and 54 seconds. Learn how PR review limits work.

To continue reviewing without waiting, enable usage-based billing in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 1b2601fe-6b98-4f9c-9a6e-b8bc8e8b4670

📥 Commits

Reviewing files that changed from the base of the PR and between 2c06b52 and 963839e.

📒 Files selected for processing (1)
  • libexec/package.rb

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jun 25, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes two independent build issues in the portable Ruby packaging script. The ncurses fix creates the pkg-config output directory before running ./configure and sets PKG_CONFIG_LIBDIR so ncurses' configure validates the intended isolated .pc path rather than falling back to the host system. The matching baseruby fix switches to dependency_build_env, adds PKG_CONFIG_PATH pointing at the source-built libyaml and zlib, passes --with-libyaml-dir/--with-zlib-dir, and removes psych and zlib from --with-out-ext so the bootstrap Ruby can link them against the bundled dependencies.

  • ncurses: FileUtils.mkdir_p(ncurses_pkgconfig) + PKG_CONFIG_LIBDIR env var ensures the directory exists and the configure check is isolated from the host.
  • baseruby: dependency_build_env replaces build_env (adds -fPIC on Linux, needed for C extensions), and both psych and zlib extensions are now compiled in using the source-built deps.
  • Changes are limited to build-time packaging logic and have no effect on the shipped Ruby runtime.

Confidence Score: 5/5

All changes are confined to build-time packaging logic in package.rb; the shipped Ruby runtime is unaffected.

Both hunks are narrow, correct fixes — creating the pkgconfig directory before ncurses configure and wiring the matching baseruby to the same source-built deps as the main build. Build ordering is safe (libyaml and zlib are already built when build_ruby! runs), and the switch from build_env to dependency_build_env correctly adds -fPIC for the C extension (psych) that is now enabled.

No files require special attention.

Important Files Changed

Filename Overview
libexec/package.rb Three targeted build fixes: mkdir the ncurses pkgconfig dir before configure, set PKG_CONFIG_LIBDIR so ncurses configure only sees the isolated path, and rebuild the matching baseruby with psych+zlib linked against the source-built deps instead of excluding them.

Reviews (3): Last reviewed commit: "fix: seed ncurses pkg-config libdir" | Re-trigger Greptile

@jdx
jdx force-pushed the fix/ncurses-pkgconf-libdir branch from dfa6aa8 to f46a268 Compare June 25, 2026 17:58
@jdx
jdx force-pushed the fix/ncurses-pkgconf-libdir branch from f46a268 to 963839e Compare June 25, 2026 18:04
@jdx
jdx merged commit 95b86e3 into main Jun 25, 2026
16 checks passed
@jdx
jdx deleted the fix/ncurses-pkgconf-libdir branch June 25, 2026 18:20
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