Skip to content

Fix duplicate libmps_parser.so in libcuopt wheel#1092

Merged
rapids-bot[bot] merged 1 commit intomainfrom
fix/remove-duplicate-libmps-parser
Apr 15, 2026
Merged

Fix duplicate libmps_parser.so in libcuopt wheel#1092
rapids-bot[bot] merged 1 commit intomainfrom
fix/remove-duplicate-libmps-parser

Conversation

@rgsl888prabhu
Copy link
Copy Markdown
Collaborator

Summary

  • The mps_parser install target in cpp/libmps_parser/CMakeLists.txt hardcoded DESTINATION lib, while the parent cpp/CMakeLists.txt installs to the platform-correct lib64 (on x86_64) via rapids_cmake_install_lib_dir(). This caused libmps_parser.so to appear in both lib/ and lib64/ in the libcuopt wheel, wasting ~350 KB.
  • Replaced the hardcoded lib with rapids_cmake_install_lib_dir() so both install commands resolve to the same directory, eliminating the duplicate.

Details

In the current libcuopt_cu13 wheel (libcuopt_cu13-26.6.0a103), libmps_parser.so (357,240 bytes) appears twice:

357240  libcuopt/lib/libmps_parser.so
357240  libcuopt/lib64/libmps_parser.so

The root cause is two independent install(TARGETS mps_parser ...) commands:

  1. cpp/libmps_parser/CMakeLists.txt:139DESTINATION lib (hardcoded)
  2. cpp/CMakeLists.txt:576DESTINATION ${_LIB_DEST}lib64 (via rapids_cmake_install_lib_dir)

Test plan

  • Verify the libcuopt wheel only contains libmps_parser.so in lib64/, not in lib/
  • Verify standalone mps_parser build still installs to the correct platform lib directory
  • Verify cuopt-mps-parser Python wheel build is unaffected (uses EXCLUDE_FROM_ALL + custom destinations)

🤖 Generated with Claude Code

@rgsl888prabhu rgsl888prabhu requested review from a team as code owners April 10, 2026 19:29
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d0703ed7-f47e-4b1d-ae25-27f9a7434059

📥 Commits

Reviewing files that changed from the base of the PR and between 00c4500 and 208d3bb.

📒 Files selected for processing (1)
  • cpp/libmps_parser/CMakeLists.txt
✅ Files skipped from review due to trivial changes (1)
  • cpp/libmps_parser/CMakeLists.txt

📝 Walkthrough

Walkthrough

Updated CMake install for mps_parser to install the built shared library into a configurable library directory variable instead of hardcoding lib. The variable is initialized via rapids_cmake_install_lib_dir(mps_parser_lib_dir) before the install(TARGETS ...) call; other install/export logic unchanged.

Changes

Cohort / File(s) Summary
CMake Install Configuration
cpp/libmps_parser/CMakeLists.txt
Replaced hardcoded install destination lib with ${mps_parser_lib_dir} and added rapids_cmake_install_lib_dir(mps_parser_lib_dir) immediately before the install(TARGETS mps_parser ...) invocation. No changes to exports or include installation.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main fix: removing a duplicate libmps_parser.so library from the libcuopt wheel.
Description check ✅ Passed The description is directly related to the changeset, providing clear context about the duplicate install issue, root cause, and the solution implemented in the CMakeLists.txt file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/remove-duplicate-libmps-parser

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

@rgsl888prabhu rgsl888prabhu self-assigned this Apr 10, 2026
@rgsl888prabhu rgsl888prabhu added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels Apr 10, 2026
The mps_parser install in libmps_parser/CMakeLists.txt hardcoded
`DESTINATION lib` while the parent cuopt CMakeLists.txt installs to
the platform-correct lib directory (lib64 on x86_64) via
rapids_cmake_install_lib_dir(). This caused libmps_parser.so to appear
in both lib/ and lib64/ in the wheel, wasting ~350 KB.

Use rapids_cmake_install_lib_dir() to resolve the correct library
directory, eliminating the duplicate.
@rgsl888prabhu rgsl888prabhu force-pushed the fix/remove-duplicate-libmps-parser branch from 00c4500 to 208d3bb Compare April 10, 2026 20:20
@rgsl888prabhu
Copy link
Copy Markdown
Collaborator Author

/merge

@rapids-bot rapids-bot bot merged commit 4c304db into main Apr 15, 2026
307 of 312 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants