nng-sys: statically specifiy the lib output directory#39
nng-sys: statically specifiy the lib output directory#39flxo wants to merge 1 commit intonanomsg:mainfrom
Conversation
CMake's GNUInstallDirs module sets CMAKE_INSTALL_LIBDIR to lib64 on some 64-bit Linux distributions (e.g., Ubuntu with multilib), but the build script only searches in lib/, causing "could not find native static library nng" errors. Explicitly set CMAKE_INSTALL_LIBDIR to lib to ensure consistent library output path across all platforms. Fixes nanomsg#38
📝 WalkthroughWalkthroughThe nng-sys build script is modified to explicitly set CMAKE_INSTALL_LIBDIR to "lib" during the CMake configuration, ensuring the vendored NNG library is installed to a consistent directory path regardless of platform-specific defaults that may use lib64 on certain Linux distributions. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
|
This PR also need to be applied to the |
|
Feels potentially more reasonable to me to update the build.rs to search in both |
CMake's
GNUInstallDirsmodule setsCMAKE_INSTALL_LIBDIRtolib64on some 64-bit Linux distributions (e.g., Ubuntu with multilib), but the build script only searches inlib, causing "could not find native static library nng" errors.Explicitly set
CMAKE_INSTALL_LIBDIRto lib to ensure consistent library output path across all platforms.Fixes #38
Summary by CodeRabbit