[FEA] Static-link gRPC, protobuf, abseil, tbb, libgomp into libcuopt.so
@akifcorduk is already working on this.
Since May 12, 2026.
- Dominant language
- Cuda
- Stars
- 1k
- Forks
- 233
- Avg merge
- 4d 4h
- Merged PRs (30d)
- 95
Description
Is your feature request related to a problem? Please describe.
libcuopt.so currently has dynamic dependencies on several non-CUDA, non-RAPIDS shared libraries — libgrpc++.so, libgrpc.so, libgpr.so, libprotobuf.so, multiple libabsl_*.so, libtbb.so, libgomp.so. These get installed automatically when users use the conda channel, but they create friction for users who don't:
- Java distribution (cuopt-java, PR #1192): The classifier JAR can safely bundle RAPIDS libs (rmm, rapids_logger, mps_parser), CUDA toolkit is excluded per convention, but bundling gRPC/protobuf/abseil is unsafe due to global state and ABI instability conflicting with user-app native deps. So users have to install these via the system package manager or conda.
- Standalone C/C++ users: Same friction — every consumer needs the full transitive dep set, not just libcuopt.
- Container images: Each base image variant needs the full lib set installed.
Describe the solution you'd like
Have the C++ build static-link the following into libcuopt.so:
libgrpc++,libgrpc,libgpr(gRPC C++)libprotobuf(protocol buffers C++)libabsl_*(Abseil; gRPC dep)libtbb(Intel TBB)libgomp(OpenMP runtime)
What stays dynamic:
- CUDA toolkit libs (
libcublas,libcusparse,libcudss,libcublasLt,libcudart,libnvJitLink) — user-installed for licensing/size reasons - RAPIDS libs (
librmm,librapids_logger) — bundled in JAR or conda-installed libmps_parser— sibling library in this repo- C/C++ runtime (
libstdc++,libgcc_s,libc, etc.) — system
Describe alternatives you've considered
- Bundle in each downstream artifact (Java JAR, future Rust/Go crates) — risky for gRPC/protobuf/abseil because they have global registries; two copies of
libprotobufin one process can crash or corrupt data. TensorFlow has been bitten by this repeatedly. - Document the transitive deps as system prerequisites — current state. Works but adds friction for non-conda users.
Static linking is the standard fix used by TensorFlow's libtensorflow.so and ONNX Runtime's libonnxruntime.so, both of which static-link their gRPC/protobuf/abseil deps.
Additional context
Confirmed dynamic deps via ldd cpp/build/libcuopt.so:
```
libtbb.so.12, libgrpc++.so.1.78, libgrpc.so.52, libgpr.so.52,
libprotobuf.so.33.5.0, libabsl_*.so.2601.0.0 (many),
libgomp.so.1
```
Related: #1202 (C API stats getters — separate concern), PR #1192 (cuopt-java, which prompted this).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.