Conversation
…irect
Some Linux distributions ship an autoconf site-script
(/usr/share/site/<triple>) that silently rewrites the configured libdir
from `${prefix}/lib` to `${prefix}/lib64` for 64-bit hosts (e.g. the
OpenSUSE aarch64 site script). jemalloc is compiled via `./configure`
inside the build script, so its static libraries end up in
`$OUT_DIR/lib64`. However, build.rs hard-codes the link-search path as
`$OUT_DIR/lib`, so cargo can't find `libjemalloc_pic.a` and the build
fails with:
error: could not find native static library `jemalloc_pic`,
perhaps an -L flag is missing?
Fix: pass `--libdir=${out_dir}/lib` explicitly to configure. This
overrides any site-script redirect and keeps the installed path
consistent with the search path already emitted by build.rs.
Reproduces on: OpenSUSE Leap 16 aarch64 (site script at
/usr/share/site/aarch64-unknown-linux-gnu).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: R Tyler Croy <rtyler@buoyantdata.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe jemalloc configure command now sets Changesjemalloc build configuration
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The library installation directory is aligned with the build’s search path, and no material merge risk is evident. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
|
Welcome @rtyler! It looks like this is your first PR to tikv/jemallocator 🎉 |
This was a 🦜 generated fix to a build error that has been buggin' the heck out of me in delta-io/delta-rs when using aarch64 machines.
Some Linux distributions ship an autoconf site-script (/usr/share/site/) that silently rewrites the configured libdir from
${prefix}/libto${prefix}/lib64for 64-bit hosts (e.g. the OpenSUSE aarch64 site script). jemalloc is compiled via./configureinside the build script, so its static libraries end up in$OUT_DIR/lib64. However, build.rs hard-codes the link-search path as$OUT_DIR/lib, so cargo can't findlibjemalloc_pic.aand the build fails with:error: could not find native static library
jemalloc_pic,perhaps an -L flag is missing?
Fix: pass
--libdir=${out_dir}/libexplicitly to configure. This overrides any site-script redirect and keeps the installed path consistent with the search path already emitted by build.rs.Reproduces on: OpenSUSE Leap 16 aarch64 (site script at /usr/share/site/aarch64-unknown-linux-gnu).
Summary by CodeRabbit