Skip to content

Fix GCC 15 build failure by connecting bundled yaml-cpp for rocprofiler-sdk#4066

Open
Muhamed-Husic wants to merge 6 commits intoROCm:mainfrom
Muhamed-Husic:fix/venv-lit-pytest-cmake
Open

Fix GCC 15 build failure by connecting bundled yaml-cpp for rocprofiler-sdk#4066
Muhamed-Husic wants to merge 6 commits intoROCm:mainfrom
Muhamed-Husic:fix/venv-lit-pytest-cmake

Conversation

@Muhamed-Husic
Copy link
Contributor

@Muhamed-Husic Muhamed-Husic commented Mar 19, 2026

Motivation

Partially solves: #3517

As already established GCC 15 defaults to -std=gnu23 and no longer pulls in headers like <cstdint> transitively. The vendored yaml-cpp inside rocprofiler-sdk fails to build under GCC 15.

This PR implements the approach recommended by the mainteier.

Technical Details

Added THEROCK_BUNDLED_YAMLCPP to CMakeLists.txt following the same pattern as other bundeled sysdeps like sqlite3 and zstd.

In profiler/CMakeLists.txt connected it so that _rocprof_use_sys_yaml_cpp is derived from wheather THEROCK_BUNDLED_YAMLCPP is set, and passes ${THEROCK_BUNDLED_YAMLCPP} as a runtime dep to the rocprofiler-sdk component.

Submission Checklist

Related

  • Connected to PR that is in rocm-systems that adds the ROCPROF_USE_SYS_YAML_CPP here.

Notes

Issue pointed that rocm-systems/projects/rocprofiler-systems/source/lib/logger/logger.hpp produces error because there is no #include <algorithm> in that file, however there is (at least now). See here..

Also rocm-libraries/projects/hipdnn/plugins/miopen_legacy_plugin/MiopenContainer.hpp was mentioned in the description of the issue, however it was moved (I assume it is this file), but it doesn't make any problems.

@Muhamed-Husic
Copy link
Contributor Author

While working on this issue, I have noticed syntax typo in root's CMakeLists.txt. I opened PR for it here.

@marbre
Copy link
Member

marbre commented Mar 19, 2026

While working on this issue, I have noticed syntax typo in root's CMakeLists.txt. I opened PR for it here.

Thanks, already approved and landed that.

@marbre marbre self-requested a review March 19, 2026 18:52
Copy link
Member

@marbre marbre left a comment

Choose a reason for hiding this comment

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

Thanks, I think this would work. Let's wait until the patch this depends on went into rocm-systems. Please then ping for a re-review. Feel free to fix the double whitespaces in the meantime :) Your work is definitely appreciated.

CMakeLists.txt Outdated
if(THEROCK_ENABLE_SYSDEPS_AMD_MESA)
set(THEROCK_BUNDLED_AMDMESA therock-amd-mesa)
endif()
set(THEROCK_BUNDLED_YAMLCPP therock-yaml-cpp)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
set(THEROCK_BUNDLED_YAMLCPP therock-yaml-cpp)
set(THEROCK_BUNDLED_YAMLCPP therock-yaml-cpp)

Seems there is one whitespace too much.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the quick feedback. I fixed the whitespace issues and will ping you for a re-review once the dependent patch is merged into rocm-systems.

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.

2 participants