Skip to content

Add missing cmake dependencies to library -devel packages#6787

Open
lucbruni-amd wants to merge 1 commit into
mainfrom
users/lucbruni-amd/fix-6447-devel-cmake-deps
Open

Add missing cmake dependencies to library -devel packages#6787
lucbruni-amd wants to merge 1 commit into
mainfrom
users/lucbruni-amd/fix-6447-devel-cmake-deps

Conversation

@lucbruni-amd

Copy link
Copy Markdown
Contributor

Summary

The *-config.cmake files shipped in the math-library -devel packages call find_dependency(hip), find_dependency(hipblas-common) and find_dependency(rocblas), but the -devel packages did not declare dependencies on the packages that provide those cmake configs. Installing a -dev package therefore produced a broken cmake config, and downstream find_package() failed at configure time.

This addresses ROCm/ROCm#6447, where find_package(hipblas) fails with:

Could not find a package configuration file provided by "hipblas-common"

Changes

build_tools/packaging/linux/package.json, adding to DEBDepends and RPMRequires:

-devel package added dependency satisfies
blas amdrocm-runtime-devel, amdrocm-hipblas-common-devel hip, hipblas-common
solver amdrocm-runtime-devel, amdrocm-blas-devel hip, rocblas
fft, rand, sparse, ccl, rccl, dnn, rocalution, hiptensor amdrocm-runtime-devel hip (dnn also amd_comgr, via runtime-devel)

Why these dependencies survive packaging

The published no-suffix -dev packages are the GFX_HOST variant, whose dependency branch strips gfxarch dependencies. amdrocm-runtime-devel is non-gfxarch, and -devel dependencies are classified non-gfxarch, so all of the added dependencies persist into the shipped packages.

Known limitation (tracked separately)

A -dev-only install still cannot complete find_package(hipblas) because the runtime library (libhipblas.so, shipped by amdrocm-blas-host) is not pulled in by the -dev package. That is a separate design question about the dev/runtime split and is tracked in #6786. This PR resolves the find_dependency (cmake config) failures reported in #6447.

Testing

  • Generated the GFX_HOST control file for each affected -devel package via the packaging harness; every one now lists the expected dependencies (previously Depends: libc6 only).
  • Existing packaging unit tests pass (build_package_test.py, 21/21).

The *-config.cmake files shipped in the math-library -devel packages call
find_dependency(hip), find_dependency(hipblas-common) and
find_dependency(rocblas), but the -devel packages did not depend on the
packages that provide those cmake configs. A dev-only install produced a
broken cmake config where find_package() failed at configure time
(ROCm/ROCm#6447).

Add the missing dependencies:
- blas: amdrocm-runtime-devel, amdrocm-hipblas-common-devel
- solver: amdrocm-runtime-devel, amdrocm-blas-devel
- fft, rand, sparse, ccl, rccl, dnn, rocalution, hiptensor: amdrocm-runtime-devel

amdrocm-runtime-devel is non-gfxarch and the -devel providers are
classified non-gfxarch, so these deps survive the host-variant dependency
filtering and appear in the published no-suffix -dev packages.
@therock-pr-bot

therock-pr-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

✅ All Checks Passed — Ready for Review

Check Status Details
🌿 Branch Name ✅ Pass
📝 PR Title/Description ✅ Pass
Forbidden Files ✅ Pass
🧪 Unit Test ✅ Pass PR does not contain code files — Unit Test auto-passed
🔎 pre-commit ✅ Pass
🚫 Draft PR 🔜 To Be Enabled
🚩 Feature Flag 🔜 To Be Enabled
📊 Code Coverage 🔜 To Be Enabled
🤖 therock-pr-bot ✅ Pass

🎉 All checks passed! This PR is ready for review.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

@therock-pr-bot

Copy link
Copy Markdown

🎉 All checks passed! This PR is ready for review.

@lucbruni-amd

Copy link
Copy Markdown
Contributor Author

@nunnikri maybe you can help with this. Also filed #6786 for follow-up.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes broken downstream CMake consumption for ROCm math-library development packages by ensuring that *-config.cmake files’ find_dependency(...) calls are backed by declared package dependencies. It updates the Linux packaging manifest so -devel packages depend on the packages that actually ship the required CMake package configs (notably HIP and certain common math components).

Changes:

  • Add amdrocm-runtime-devel as a dependency to multiple math-library -devel packages so find_dependency(hip) can succeed.
  • Add amdrocm-hipblas-common-devel to amdrocm-blas-devel to satisfy find_dependency(hipblas-common).
  • Add amdrocm-blas-devel to amdrocm-solver-devel to satisfy find_dependency(rocblas).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"libc6",
"amdrocm-fft"
"amdrocm-fft",
"amdrocm-runtime-devel"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes looks fine. But thie runtime-devel will install llvm-devel package which usually is huge.

cc: @raramakr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: TODO

Development

Successfully merging this pull request may close these issues.

3 participants