Skip to content

Fix Makefile build: libhipcxx moved to include/hipccl breaks hipCUB/rocThrust/monte_carlo_pi - #599

Merged
zichguan-amd merged 1 commit into
amd-stagingfrom
zichguan/fix-libhipcxx-hipccl-path
Nov 26, 2026
Merged

zichguan-amd merged 1 commit into
amd-stagingfrom
zichguan/fix-libhipcxx-hipccl-path

Conversation

@zichguan-amd

@zichguan-amd zichguan-amd commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • The 2026-11-25 TheRock nightly (10.3.0a20261125) broke the plain-Makefile build for Libraries/hipCUB/device_sum, Libraries/hipCUB/device_radix_sort, all of Libraries/rocThrust/*, and Applications/monte_carlo_pi with error: "libhipcxx could not be found". The 2026-11-24 nightly built these targets fine, so this is a regression surfaced by a package layout change, not a code issue in those examples.
  • Root cause: TheRock#7024 moved the libhipcxx headers from the top-level include/ into include/hipccl. hipCUB's libcxx.hpp and rocThrust's thrust/detail/config/libcxx.h probe __has_include(<hip/std/version>) against the default include path and now fail to find it there.
  • Libraries/libhipcxx/* and Libraries/hipThreads/* Makefiles already carry a fallback for this exact move (added in libhipcxx: Clean up and apply review feedback #539), but it was never applied to the hipCUB/rocThrust Makefiles or monte_carlo_pi, which transitively depend on libhipcxx through <hipcub/...> and <thrust/...> headers. This PR applies the identical, already-established include/hipccl → include/libhipcxx fallback pattern to those remaining Makefiles.
  • Checked upstream (TheRock, hipCUB/rocThrust in ROCm/rocm-libraries) for an existing fix: the relocation is intentional on TheRock's side with no project-side workaround upstream (those projects build via CMake/ctest, not hand-written Makefiles), so the in-repo include/hipccl-detection convention already used by libhipcxx/hipThreads is the correct precedent to follow here.
  • CMake builds were unaffected (they resolve the correct include dir via the package's CMake config), so only the Makefile build path needed this fix.

Test plan

  • CI: Makefile build step passes for hipCUB, rocThrust, and Applications categories on the next nightly run.
  • Manually verify make -C Libraries/hipCUB, make -C Libraries/rocThrust, make -C Applications/monte_carlo_pi against a tarball install where libhipcxx lives under include/hipccl. Downloaded the exact nightly tarball that broke CI (therock-dist-linux-gfx110X-all-tests-10.3.0a20261125.tar.gz) and reproduced the failure pre-fix, then confirmed all 9 targets build and run correctly on gfx1100 post-fix.

🤖 Generated with Claude Code

…rocThrust, monte_carlo_pi

TheRock#7024 moved libhipcxx headers from the top-level include dir into
include/hipccl. hipCUB's and rocThrust's std-polyfill headers probe for
<hip/std/version> on the default include path and now hit
"libhipcxx could not be found" on the plain-Makefile builds, breaking
hipCUB/device_sum, hipCUB/device_radix_sort, all rocThrust examples, and
Applications/monte_carlo_pi (pulls in both).

Libraries/libhipcxx and Libraries/hipThreads already carry this same
include/hipccl (falling back to include/libhipcxx) detection; apply the
identical pattern to the remaining Makefiles that transitively depend on
libhipcxx.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@zichguan-amd
zichguan-amd requested a review from a team as a code owner November 25, 2026 20:24
@github-actions

Copy link
Copy Markdown
Security scan found no critical or high findings on lines changed by this pull request

View the security scan run for complete reports.

“New” means the finding is located in a changed file on an added or modified line; it is not a base-versus-head findings delta.

@zichguan-amd
zichguan-amd merged commit d3b145e into amd-staging Nov 26, 2026
26 checks passed
@zichguan-amd
zichguan-amd deleted the zichguan/fix-libhipcxx-hipccl-path branch November 26, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant