Skip to content

[rocprofiler-sdk] Improve build with system libraries. - #2319

Merged
superm1 merged 4 commits into
ROCm:developfrom
lubosz:rocprofiler-system-libs
Apr 2, 2026
Merged

superm1 merged 4 commits into
ROCm:developfrom
lubosz:rocprofiler-system-libs

Conversation

@lubosz

@lubosz lubosz commented Dec 16, 2025 •

Copy link
Copy Markdown
Contributor

Motivation

This series improves building rocprofiler-sdk / rocprofv3 with system libraries.

  • It fixes a bug in the CMake build when ROCPROFILER_BUILD_GLOG was off
  • It adds the possibility to build with the system's yaml-cpp
  • It fixes the build with fmt 12.1.0, keeping it backwards compatible with the currently submoduled fmt version
  • It proposes updating the fmt submodule to 12.1.0

This series is the result of packaging rocprofv3 in Arch Linux.
See https://gitlab.archlinux.org/archlinux/packaging/packages/rocprofiler/-/merge_requests/3

Technical Details

Add option to use system yaml-cpp.

Adds ROCPROFILER_BUILD_YAML_CPP CMake variable, defaulting to ON, which keeps the previous behaviour as default.

This enables building with a system yaml-cpp.

Since the submodule uses yaml-cpp's master branch, set the required version to the latest release 0.8.0.

Inlcude CPack before calling it

This resolves a bug in the CMake code, which relied on the glog submodule to include CPack, which was included too late.

Resolves following CMake error when building with -D ROCPROFILER_BUILD_GLOG=OFF:

CMake Error at cmake/rocprofiler_config_packaging.cmake:124 (cpack_add_component_group):
  Unknown CMake command "cpack_add_component_group".
Call Stack (most recent call first):
  CMakeLists.txt:135 (include)

Fix build with fmt 12.1.0.

This enables building with fmt versions 12.1.0 and higher by including
the now required <fmt/ranges.h> header for fmt::join.

This change is backwards compatible with the current submodule version
of fmt which is an old main branch, 15 commits above 10.1.0.

Update fmt submodule to 12.1.0

This patch is optional and I can drop it if required.

This updates the fmt submodule to 12.1.0, which is now possible with the previous patch and a good opportunity to change the submodule to a release version. Currently it uses an old main branch, 15 commits above the 10.1.0 release.

Test Plan

I am able to rocprofiler-sdk with and without system libraries with this patch set.
Running a CI build should ensure the validity of this patch set.

Test Result

Works for me.

Submission Checklist

Comment thread projects/rocprofiler-sdk/external/fmt Resolved
@jrmadsen

Copy link
Copy Markdown
Contributor

@lubosz Regarding:

Inlcude CPack before calling it

This resolves a bug in the CMake code, which relied on the glog submodule to include CPack, which was included too late.

Resolves following CMake error when building with -D ROCPROFILER_BUILD_GLOG=OFF:

CMake Error at cmake/rocprofiler_config_packaging.cmake:124 (cpack_add_component_group):
  Unknown CMake command "cpack_add_component_group".
Call Stack (most recent call first):
  CMakeLists.txt:135 (include)

I think what you actually want is include(CPackComponent) not include(CPack) before cpack_add_component_group because the file MUST end with include(CPack).

@lubosz
lubosz force-pushed the rocprofiler-system-libs branch from 7091bab to f0b2a63 Compare December 22, 2025 08:43
@lubosz

lubosz commented Dec 22, 2025

Copy link
Copy Markdown
Contributor Author

@lubosz Regarding:

Inlcude CPack before calling it

This resolves a bug in the CMake code, which relied on the glog submodule to include CPack, which was included too late.
Resolves following CMake error when building with -D ROCPROFILER_BUILD_GLOG=OFF:

CMake Error at cmake/rocprofiler_config_packaging.cmake:124 (cpack_add_component_group):
  Unknown CMake command "cpack_add_component_group".
Call Stack (most recent call first):
  CMakeLists.txt:135 (include)

I think what you actually want is include(CPackComponent) not include(CPack) before cpack_add_component_group because the file MUST end with include(CPack).

Good catch! I have updated the patch.

@lubosz
lubosz requested a review from jrmadsen December 22, 2025 11:42
@jrmadsen jrmadsen changed the title rocprofiler-sdk: Improve build with system libraries. [rocprofiler-sdk] Improve build with system libraries. Jan 6, 2026
@jrmadsen
jrmadsen force-pushed the rocprofiler-system-libs branch from f0b2a63 to 26aef84 Compare January 6, 2026 12:09
@jrmadsen
jrmadsen requested review from a team as code owners January 6, 2026 12:09
@lubosz
lubosz force-pushed the rocprofiler-system-libs branch from 26aef84 to 7a096df Compare January 12, 2026 10:45
@lubosz
lubosz force-pushed the rocprofiler-system-libs branch from 7a096df to 27a5a70 Compare March 23, 2026 12:30
Copilot AI review requested due to automatic review settings March 23, 2026 12:30
@lubosz

lubosz commented Mar 23, 2026

Copy link
Copy Markdown
Contributor Author

I rebased the branch onto current develop.
Some of my include fixes were already addresses by 36d9d33

I updated my patch so it adds the ones still remaining.

@jrmadsen What is missing to get this merged?

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

Improve rocprofiler-sdk/rocprofv3 builds when preferring system-provided dependencies (yaml-cpp, fmt) and fix a CMake packaging issue when glog is disabled.

Changes:

  • Add ROCPROFILER_BUILD_YAML_CPP option to switch between vendored yaml-cpp submodule and system yaml-cpp (>= 0.8.0).
  • Fix fmt 12.1.0+ compilation by including <fmt/ranges.h> where fmt::join/range formatting is used.
  • Fix packaging configuration by explicitly including CPackComponent before using component-group macros; update fmt submodule to 12.1.0.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/counters/metrics.hpp Add missing standard header include.
projects/rocprofiler-sdk/source/lib/python/rocpd/source/sql_generator.hpp Include <fmt/ranges.h> to support fmt 12.1.0+ range utilities.
projects/rocprofiler-sdk/source/lib/output/sql/common.hpp Include <fmt/ranges.h> to support fmt 12.1.0+ range utilities.
projects/rocprofiler-sdk/external/fmt Update fmt submodule revision to 12.1.0.
projects/rocprofiler-sdk/external/CMakeLists.txt Add switch to use system yaml-cpp or build vendored yaml-cpp submodule.
projects/rocprofiler-sdk/cmake/rocprofiler_options.cmake Add ROCPROFILER_BUILD_YAML_CPP CMake option.
projects/rocprofiler-sdk/cmake/rocprofiler_config_packaging.cmake Include CPackComponent explicitly to avoid missing macro errors.

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

@lubosz
lubosz force-pushed the rocprofiler-system-libs branch from 27a5a70 to 9f0bf40 Compare March 23, 2026 13:02
@superm1
superm1 force-pushed the rocprofiler-system-libs branch from 9f0bf40 to 3b7dbe5 Compare March 24, 2026 16:04
@lubosz
lubosz force-pushed the rocprofiler-system-libs branch from 3b7dbe5 to 8135832 Compare March 24, 2026 16:43
@superm1
superm1 force-pushed the rocprofiler-system-libs branch 2 times, most recently from 1ad781b to 598cd94 Compare March 26, 2026 15:08
lubosz added 4 commits March 27, 2026 09:18
Add ROCPROFILER_BUILD_YAML_CPP cmake variable, defaulting to ON, which
keeps the previous behaviour as default.

This enables building with a system yaml-cpp.

Link rocprofiler-sdk-yaml-cpp with yaml-cpp::yaml-cpp in that case,
as is also done with fmt, glog, etc.

Since the submodule uses yaml-cpp's master branch, set the required
version to the latest release 0.8.0.

Signed-off-by: Lubosz Sarnecki <lubosz@gmail.com>
Resolves following error when building with
`-D ROCPROFILER_BUILD_GLOG=OFF`:
```
CMake Error at cmake/rocprofiler_config_packaging.cmake:124 (cpack_add_component_group):
  Unknown CMake command "cpack_add_component_group".
Call Stack (most recent call first):
  CMakeLists.txt:135 (include)
```

Signed-off-by: Lubosz Sarnecki <lubosz@gmail.com>
This enables building with fmt versions 12.1.0 and higher by including
the now required <fmt/ranges.h> header for fmt::join.

This change is backwards compatible with the current submodule version
of fmt which is an old main branch, 15 commits above 10.1.0.

Signed-off-by: Lubosz Sarnecki <lubosz@gmail.com>
Signed-off-by: Lubosz Sarnecki <lubosz@gmail.com>
@lubosz
lubosz force-pushed the rocprofiler-system-libs branch from 598cd94 to 52e825f Compare March 27, 2026 08:18
@superm1
superm1 merged commit 86ee7b2 into ROCm:develop Apr 2, 2026
27 of 37 checks passed
Snektron added a commit that referenced this pull request Apr 15, 2026
This adds a new option, ROCPROFILER_BUILD_JSON, which can be set to OFF to
make rocprofiler-sdk use a system dependency for nlohmann_json instead of trying
to build it manually. To mimick old behavior, ROCPROFILER_BUILD_JSON is set to
ON by default.

Related: #2319
Snektron added a commit that referenced this pull request Apr 17, 2026
This adds a new option, ROCPROFILER_BUILD_ELFIO, which can be set to OFF to
make rocprofiler use a system dependency for ELFIO instead of trying to build
it manually. To mimick old behavior, ROCPROFILER_BUILD_ELFIO is set to ON by
default.

Related: #2319
Snektron added a commit that referenced this pull request Apr 17, 2026
This adds a new option, ROCPROFILER_BUILD_OTF2, which can be set to OFF to
make rocprofiler-sdk use a system dependency for OTF2 instead of trying to
build it manually. To mimick old behavior, ROCPROFILER_BUILD_OTF2 is set to
ON by default.

Related: #2319
Snektron added a commit that referenced this pull request Apr 17, 2026
This adds a new option, ROCPROFILER_BUILD_JSON, which can be set to OFF to
make rocprofiler-sdk use a system dependency for nlohmann_json instead of trying
to build it manually. To mimick old behavior, ROCPROFILER_BUILD_JSON is set to
ON by default.

Related: #2319
Snektron added a commit that referenced this pull request Jun 24, 2026
This adds a new option, ROCPROFILER_BUILD_ELFIO, which can be set to OFF to
make rocprofiler use a system dependency for ELFIO instead of trying to build
it manually. To mimick old behavior, ROCPROFILER_BUILD_ELFIO is set to ON by
default.

Related: #2319
Snektron added a commit that referenced this pull request Jun 24, 2026
This adds a new option, ROCPROFILER_BUILD_OTF2, which can be set to OFF to
make rocprofiler-sdk use a system dependency for OTF2 instead of trying to
build it manually. To mimick old behavior, ROCPROFILER_BUILD_OTF2 is set to
ON by default.

Related: #2319
Snektron added a commit that referenced this pull request Jun 24, 2026
This adds a new option, ROCPROFILER_BUILD_JSON, which can be set to OFF to
make rocprofiler-sdk use a system dependency for nlohmann_json instead of trying
to build it manually. To mimick old behavior, ROCPROFILER_BUILD_JSON is set to
ON by default.

Related: #2319
Snektron added a commit that referenced this pull request Jul 14, 2026
This adds a new option, ROCPROFILER_BUILD_ELFIO, which can be set to OFF to
make rocprofiler use a system dependency for ELFIO instead of trying to build
it manually. To mimick old behavior, ROCPROFILER_BUILD_ELFIO is set to ON by
default.

Related: #2319
Snektron added a commit that referenced this pull request Jul 14, 2026
This adds a new option, ROCPROFILER_BUILD_OTF2, which can be set to OFF to
make rocprofiler-sdk use a system dependency for OTF2 instead of trying to
build it manually. To mimick old behavior, ROCPROFILER_BUILD_OTF2 is set to
ON by default.

Related: #2319
Snektron added a commit that referenced this pull request Jul 14, 2026
This adds a new option, ROCPROFILER_BUILD_JSON, which can be set to OFF to
make rocprofiler-sdk use a system dependency for nlohmann_json instead of trying
to build it manually. To mimick old behavior, ROCPROFILER_BUILD_JSON is set to
ON by default.

Related: #2319
Snektron added a commit that referenced this pull request Aug 18, 2026
This adds a new option, ROCPROFILER_BUILD_ELFIO, which can be set to OFF to
make rocprofiler use a system dependency for ELFIO instead of trying to build
it manually. To mimick old behavior, ROCPROFILER_BUILD_ELFIO is set to ON by
default.

Related: #2319
Snektron added a commit that referenced this pull request Aug 18, 2026
This adds a new option, ROCPROFILER_BUILD_OTF2, which can be set to OFF to
make rocprofiler-sdk use a system dependency for OTF2 instead of trying to
build it manually. To mimick old behavior, ROCPROFILER_BUILD_OTF2 is set to
ON by default.

Related: #2319
Snektron added a commit that referenced this pull request Aug 18, 2026
This adds a new option, ROCPROFILER_BUILD_JSON, which can be set to OFF to
make rocprofiler-sdk use a system dependency for nlohmann_json instead of trying
to build it manually. To mimick old behavior, ROCPROFILER_BUILD_JSON is set to
ON by default.

Related: #2319
MythreyaK pushed a commit that referenced this pull request Aug 19, 2026
This adds a new option, ROCPROFILER_BUILD_ELFIO, which can be set to OFF to
make rocprofiler use a system dependency for ELFIO instead of trying to build
it manually. To mimick old behavior, ROCPROFILER_BUILD_ELFIO is set to ON by
default.

Related: #2319
MythreyaK pushed a commit that referenced this pull request Aug 19, 2026
This adds a new option, ROCPROFILER_BUILD_OTF2, which can be set to OFF to
make rocprofiler-sdk use a system dependency for OTF2 instead of trying to
build it manually. To mimick old behavior, ROCPROFILER_BUILD_OTF2 is set to
ON by default.

Related: #2319
MythreyaK pushed a commit that referenced this pull request Aug 19, 2026
This adds a new option, ROCPROFILER_BUILD_JSON, which can be set to OFF to
make rocprofiler-sdk use a system dependency for nlohmann_json instead of trying
to build it manually. To mimick old behavior, ROCPROFILER_BUILD_JSON is set to
ON by default.

Related: #2319
MythreyaK pushed a commit that referenced this pull request Aug 21, 2026
This adds a new option, ROCPROFILER_BUILD_ELFIO, which can be set to OFF to
make rocprofiler use a system dependency for ELFIO instead of trying to build
it manually. To mimick old behavior, ROCPROFILER_BUILD_ELFIO is set to ON by
default.

Related: #2319
MythreyaK pushed a commit that referenced this pull request Aug 21, 2026
This adds a new option, ROCPROFILER_BUILD_OTF2, which can be set to OFF to
make rocprofiler-sdk use a system dependency for OTF2 instead of trying to
build it manually. To mimick old behavior, ROCPROFILER_BUILD_OTF2 is set to
ON by default.

Related: #2319
MythreyaK pushed a commit that referenced this pull request Aug 21, 2026
This adds a new option, ROCPROFILER_BUILD_JSON, which can be set to OFF to
make rocprofiler-sdk use a system dependency for nlohmann_json instead of trying
to build it manually. To mimick old behavior, ROCPROFILER_BUILD_JSON is set to
ON by default.

Related: #2319
Snektron added a commit that referenced this pull request Aug 28, 2026
…ng (#4721)

## Motivation

These changes were required in order to properly package rocprofiler-sdk
for NixOS, see NixOS/nixpkgs#506820.

## Technical Details

There should be nothing shocking, but its a mixed bag of miscellaneous
stuff:
- Add missing c++ headers, revealed by building without GHC FS.
- Add missing dependencies on comgr on several test targets
- Fix `find_package()` scoping issues. The problem and solution is
described in more detail
[here](#1243), I've applied the
same fix of passing `GLOBAL` to `find_package()`.
- Add options for using system dependencies for elfio, otf2 and
nlohmann/json. This is the same problem & solution as applied recently
for yaml-cpp. See [previous pull
request](#2319).
- Replaces most custom warning flags set on integration tests with
rocprofiler-sdk::test-build-flags or a related dependency. The
motivation for this was to disable -Werror, and these targets already
handle that. Some targets also required -Wpedantic, I've left those were
they were to avoid changing anything VS the normal CI build.

Most changes should either not affect the build by much (like adding
missing includes or dependencies) or are optional and disabled by
default (like using system versions of dependencies).

## JIRA ID

Closes #4721

## Test Plan

Built rocprofiler-sdk on NixOS and ran a few manual tests, did not build
a non-NixOS version but I think that if it passes CI then it should be
fine.

## Test Result

Works on my machine.

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
corey-derochie-amd pushed a commit that referenced this pull request Oct 8, 2026
…ng (#4721)

## Motivation

These changes were required in order to properly package rocprofiler-sdk
for NixOS, see NixOS/nixpkgs#506820.

## Technical Details

There should be nothing shocking, but its a mixed bag of miscellaneous
stuff:
- Add missing c++ headers, revealed by building without GHC FS.
- Add missing dependencies on comgr on several test targets
- Fix `find_package()` scoping issues. The problem and solution is
described in more detail
[here](#1243), I've applied the
same fix of passing `GLOBAL` to `find_package()`.
- Add options for using system dependencies for elfio, otf2 and
nlohmann/json. This is the same problem & solution as applied recently
for yaml-cpp. See [previous pull
request](#2319).
- Replaces most custom warning flags set on integration tests with
rocprofiler-sdk::test-build-flags or a related dependency. The
motivation for this was to disable -Werror, and these targets already
handle that. Some targets also required -Wpedantic, I've left those were
they were to avoid changing anything VS the normal CI build.

Most changes should either not affect the build by much (like adding
missing includes or dependencies) or are optional and disabled by
default (like using system versions of dependencies).

## JIRA ID

Closes #4721

## Test Plan

Built rocprofiler-sdk on NixOS and ran a few manual tests, did not build
a non-NixOS version but I think that if it passes CI then it should be
fine.

## Test Result

Works on my machine.

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
corey-derochie-amd pushed a commit that referenced this pull request Oct 9, 2026
…ng (#4721)

## Motivation

These changes were required in order to properly package rocprofiler-sdk
for NixOS, see NixOS/nixpkgs#506820.

## Technical Details

There should be nothing shocking, but its a mixed bag of miscellaneous
stuff:
- Add missing c++ headers, revealed by building without GHC FS.
- Add missing dependencies on comgr on several test targets
- Fix `find_package()` scoping issues. The problem and solution is
described in more detail
[here](#1243), I've applied the
same fix of passing `GLOBAL` to `find_package()`.
- Add options for using system dependencies for elfio, otf2 and
nlohmann/json. This is the same problem & solution as applied recently
for yaml-cpp. See [previous pull
request](#2319).
- Replaces most custom warning flags set on integration tests with
rocprofiler-sdk::test-build-flags or a related dependency. The
motivation for this was to disable -Werror, and these targets already
handle that. Some targets also required -Wpedantic, I've left those were
they were to avoid changing anything VS the normal CI build.

Most changes should either not affect the build by much (like adding
missing includes or dependencies) or are optional and disabled by
default (like using system versions of dependencies).

## JIRA ID

Closes #4721

## Test Plan

Built rocprofiler-sdk on NixOS and ran a few manual tests, did not build
a non-NixOS version but I think that if it passes CI then it should be
fine.

## Test Result

Works on my machine.

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
corey-derochie-amd pushed a commit that referenced this pull request Oct 14, 2026
…ng (#4721)

## Motivation

These changes were required in order to properly package rocprofiler-sdk
for NixOS, see NixOS/nixpkgs#506820.

## Technical Details

There should be nothing shocking, but its a mixed bag of miscellaneous
stuff:
- Add missing c++ headers, revealed by building without GHC FS.
- Add missing dependencies on comgr on several test targets
- Fix `find_package()` scoping issues. The problem and solution is
described in more detail
[here](#1243), I've applied the
same fix of passing `GLOBAL` to `find_package()`.
- Add options for using system dependencies for elfio, otf2 and
nlohmann/json. This is the same problem & solution as applied recently
for yaml-cpp. See [previous pull
request](#2319).
- Replaces most custom warning flags set on integration tests with
rocprofiler-sdk::test-build-flags or a related dependency. The
motivation for this was to disable -Werror, and these targets already
handle that. Some targets also required -Wpedantic, I've left those were
they were to avoid changing anything VS the normal CI build.

Most changes should either not affect the build by much (like adding
missing includes or dependencies) or are optional and disabled by
default (like using system versions of dependencies).

## JIRA ID

Closes #4721

## Test Plan

Built rocprofiler-sdk on NixOS and ran a few manual tests, did not build
a non-NixOS version but I think that if it passes CI then it should be
fine.

## Test Result

Works on my machine.

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
corey-derochie-amd pushed a commit that referenced this pull request Oct 14, 2026
…ng (#4721)

## Motivation

These changes were required in order to properly package rocprofiler-sdk
for NixOS, see NixOS/nixpkgs#506820.

## Technical Details

There should be nothing shocking, but its a mixed bag of miscellaneous
stuff:
- Add missing c++ headers, revealed by building without GHC FS.
- Add missing dependencies on comgr on several test targets
- Fix `find_package()` scoping issues. The problem and solution is
described in more detail
[here](#1243), I've applied the
same fix of passing `GLOBAL` to `find_package()`.
- Add options for using system dependencies for elfio, otf2 and
nlohmann/json. This is the same problem & solution as applied recently
for yaml-cpp. See [previous pull
request](#2319).
- Replaces most custom warning flags set on integration tests with
rocprofiler-sdk::test-build-flags or a related dependency. The
motivation for this was to disable -Werror, and these targets already
handle that. Some targets also required -Wpedantic, I've left those were
they were to avoid changing anything VS the normal CI build.

Most changes should either not affect the build by much (like adding
missing includes or dependencies) or are optional and disabled by
default (like using system versions of dependencies).

## JIRA ID

Closes #4721

## Test Plan

Built rocprofiler-sdk on NixOS and ran a few manual tests, did not build
a non-NixOS version but I think that if it passes CI then it should be
fine.

## Test Result

Works on my machine.

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
corey-derochie-amd pushed a commit that referenced this pull request Oct 15, 2026
…ng (#4721)

## Motivation

These changes were required in order to properly package rocprofiler-sdk
for NixOS, see NixOS/nixpkgs#506820.

## Technical Details

There should be nothing shocking, but its a mixed bag of miscellaneous
stuff:
- Add missing c++ headers, revealed by building without GHC FS.
- Add missing dependencies on comgr on several test targets
- Fix `find_package()` scoping issues. The problem and solution is
described in more detail
[here](#1243), I've applied the
same fix of passing `GLOBAL` to `find_package()`.
- Add options for using system dependencies for elfio, otf2 and
nlohmann/json. This is the same problem & solution as applied recently
for yaml-cpp. See [previous pull
request](#2319).
- Replaces most custom warning flags set on integration tests with
rocprofiler-sdk::test-build-flags or a related dependency. The
motivation for this was to disable -Werror, and these targets already
handle that. Some targets also required -Wpedantic, I've left those were
they were to avoid changing anything VS the normal CI build.

Most changes should either not affect the build by much (like adding
missing includes or dependencies) or are optional and disabled by
default (like using system versions of dependencies).

## JIRA ID

Closes #4721

## Test Plan

Built rocprofiler-sdk on NixOS and ran a few manual tests, did not build
a non-NixOS version but I think that if it passes CI then it should be
fine.

## Test Result

Works on my machine.

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
corey-derochie-amd pushed a commit that referenced this pull request Oct 15, 2026
…ng (#4721)

## Motivation

These changes were required in order to properly package rocprofiler-sdk
for NixOS, see NixOS/nixpkgs#506820.

## Technical Details

There should be nothing shocking, but its a mixed bag of miscellaneous
stuff:
- Add missing c++ headers, revealed by building without GHC FS.
- Add missing dependencies on comgr on several test targets
- Fix `find_package()` scoping issues. The problem and solution is
described in more detail
[here](#1243), I've applied the
same fix of passing `GLOBAL` to `find_package()`.
- Add options for using system dependencies for elfio, otf2 and
nlohmann/json. This is the same problem & solution as applied recently
for yaml-cpp. See [previous pull
request](#2319).
- Replaces most custom warning flags set on integration tests with
rocprofiler-sdk::test-build-flags or a related dependency. The
motivation for this was to disable -Werror, and these targets already
handle that. Some targets also required -Wpedantic, I've left those were
they were to avoid changing anything VS the normal CI build.

Most changes should either not affect the build by much (like adding
missing includes or dependencies) or are optional and disabled by
default (like using system versions of dependencies).

## JIRA ID

Closes #4721

## Test Plan

Built rocprofiler-sdk on NixOS and ran a few manual tests, did not build
a non-NixOS version but I think that if it passes CI then it should be
fine.

## Test Result

Works on my machine.

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants