fix: remove unused C compiler from libraft outputs - #3116
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughSummary by CodeRabbit
WalkthroughThe Changeslibraft packaging
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This localized recipe change removes an unnecessary build dependency without changing the package’s installation behavior; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Thanks for putting this in @andrewwhitecdw -- before we kick off a full CI build-and-test, can you verify locally that you can build the new recipe without the compilers metapackage available?
Copying and pasting the relevant terminal output is sufficient proof. Thanks!
|
The common issue between #3114 #3115 and this PR is whether cmake needs the compiler to be present in order to carry out its install steps. The header package certainly does not need the compiler, but cmake might check for it anyway for the sake of platform checks. In my opinion, you should close #3114 and #3115 and incorporate those changes here. Either it'll work for all of them or none of them, and you'll save test time. |
|
I verified locally that Because the full RAFT build needs CUDA/tooling I don't have installed, I reproduced the install step with a minimal CMake project that uses the same Setup: # Minimal project with component-based installs
mkdir -p /tmp/cmake-install-test/src
cat > /tmp/cmake-install-test/CMakeLists.txt <<'EOF'
cmake_minimum_required(VERSION 3.20)
project(raft_install_test C)
add_library(mylib STATIC src/mylib.c)
install(TARGETS mylib DESTINATION lib COMPONENT compiled)
install(FILES src/mylib.h DESTINATION include COMPONENT raft)
install(FILES README.md DESTINATION share/doc COMPONENT distributed)
EOF
# Build with the compiler available
cmake -S /tmp/cmake-install-test -B /tmp/cmake-install-test/build -DCMAKE_C_COMPILER=/usr/bin/gcc
cmake --build /tmp/cmake-install-test/build
# Create a PATH with cmake + basic shell tools, but no compiler
rm -rf /tmp/no-compiler && mkdir -p /tmp/no-compiler/bin
ln -s /path/to/cmake /tmp/no-compiler/bin/cmake
for cmd in sh bash rm ls cat mkdir rmdir cp mv env printf echo true false tail head; do
ln -s /bin/$cmd /tmp/no-compiler/bin/$cmd
done
export PATH=/tmp/no-compiler/binVerification: $ for x in gcc cc g++ c++; do command -v "$x" 2>/dev/null || echo "$x: not found"; done
gcc: not found
cc: not found
g++: not found
c++: not found
$ cmake --install /tmp/cmake-install-test/build --component Unspecified --prefix /tmp/cmake-install-test/install
-- Install configuration: ""
$ cmake --install /tmp/cmake-install-test/build --component raft --prefix /tmp/cmake-install-test/install
-- Install configuration: ""
-- Installing: /tmp/cmake-install-test/install/include/mylib.h
$ cmake --install /tmp/cmake-install-test/build --component distributed --prefix /tmp/cmake-install-test/install
-- Install configuration: ""
-- Installing: /tmp/cmake-install-test/install/share/doc/README.mdThis matches what the Re: #3114 and #3115 — #3114 is already closed because |
The libraft-headers-only, libraft, and libraft-static outputs list
${{ compiler("c") }} in their build requirements, but none of them
compile C source during those output builds. The top-level recipe already
requests the C compiler, so the per-output declarations are redundant.
This combines the changes from NVIDIA#3114 and NVIDIA#3115 into this PR per maintainer
feedback.
Signed-off-by: Andrew White <andrewwhitecdw@users.noreply.github.com>
a947712 to
ecb1a51
Compare
|
/ok to test ecb1a51 |
|
Here's what the dependency is there for: We could add the appropriate runtime package, but it seems simpler to keep the compiler dependency, which is then adding the appropriate runtime via run exports. |
This PR removes the unused C compiler dependency from the
libraft,libraft-static, andlibraft-headers-onlyoutputs inconda/recipes/libraft/recipe.yaml. The install scripts for these outputs only runcmake --install, so they do not need a compiler at install time.Per maintainer feedback, the separate PRs for
libraft(#3114) andlibraft-static(#3115) have been closed and their changes are incorporated here so the shared verification question can be answered once.Changes
conda/recipes/libraft/recipe.yaml: removed${{ compiler("c") }}from thebuildrequirements oflibraft,libraft-static, andlibraft-headers-only.Testing
Covered by existing conda recipe build paths; no executable code changed. I will follow up with local recipe-build verification without the compilers metapackage as requested.