intel / intel/metrics-discovery

master fails with gcc-17 due to needed #include <sstream>

Open Beginner friendly
#44 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
100
Forks
39
PR merge metrics
No merged PRs in 30d

Description

**Description**
gcc-17 has become more strict about including headers, easy patch

**Failure**
multiple of these:

In file included from /var/tmp/portage/dev-libs/intel-metrics-discovery-1.16.193/work/metrics-discovery-1.16.193/instrumentation/metrics_discovery/common/inc/internal/md_metric_set.h:16,
from /var/tmp/portage/dev-libs/intel-metrics-discovery-1.16.193/work/metrics-discovery-1.16.193/instrumentation/metrics_discovery/codegen/md_metric_sets_PVC_GT2.cpp:16:
/var/tmp/portage/dev-libs/intel-metrics-discovery-1.16.193/work/metrics-discovery-1.16.193/instrumentation/metrics_discovery/common/inc/internal/md_metric_prototype_manager.h:81:115: error: ‘std::stringstream’ has not been declared
81 | TCompletionCode AppendNormalizationsAndWorkarounds( CMetricPrototype& prototype, CMetric& metric, std::stringstream& snapshotReportReadEquation, std::stringstream& deltaReportReadEquation );
| ^~~
/var/tmp/portage/dev-libs/intel-metrics-discovery-1.16.193/work/metrics-discovery-1.16.193/instrumentation/metrics_discovery/common/inc/internal/md_metric_prototype_manager.h:18:1: note: ‘std::stringstream’ is defined in header ‘’; this is probably fixable by adding ‘#include ’
17 | #include "md_register_manager.h"
+++ |+#include

**Fix**
add include os sstream to md_metric_prototype_manager.h

**system info**
sh bash 5.3_p15
ld GNU ld (Gentoo 2.46.1 p1) 2.46.1
app-misc/pax-utils: 1.3.11::gentoo
app-shells/bash: 5.3_p15::gentoo
dev-build/autoconf: 2.13-r9::gentoo, 2.73-r2::gentoo
dev-build/automake: 1.18.1-r1::gentoo
dev-build/cmake: 4.3.5::gentoo
dev-build/libtool: 2.5.4::gentoo
dev-build/make: 4.4.1-r102::gentoo
dev-build/meson: 1.12.0::gentoo
dev-lang/perl: 5.44.0::gentoo
dev-lang/python: 3.12.14::gentoo, 3.13.15::gentoo, 3.14.7::gentoo
dev-lang/rust: 1.94.1::gentoo, 1.96.1::gentoo, 1.97.1::gentoo
llvm-core/clang: 17.0.6-r1::gentoo, 21.1.8::gentoo, 22.1.8::gentoo
llvm-core/lld: 17.0.6::gentoo
llvm-core/llvm: 17.0.6-r3::gentoo, 21.1.8::gentoo, 22.1.8::gentoo
sys-apps/baselayout: 2.18-r1::gentoo
sys-apps/openrc: 0.63.3::gentoo
sys-apps/sandbox: 2.49::gentoo
sys-devel/binutils: 2.46.1::gentoo, 2.47::gentoo
sys-devel/binutils-config: 5.6::gentoo
sys-devel/gcc: 11.5.0::gentoo, 12.5.0::gentoo, 13.4.1_p20260603::gentoo, 14.4.1_p20260716::gentoo, 15.3.1_p20260717::gentoo, 16.2.0::gentoo, 17.0.0_p20260906::gentoo
sys-devel/gcc-config: 2.12.2::gentoo
sys-kernel/linux-headers: 7.1::gentoo (virtual/os-headers)
sys-libs/glibc: 2.43-r4::gentoo

[metrics-discovery-build-fail.log](https://github.com/user-attachments/files/32219397/metrics-discovery-build-fail.log)

Contributor guide

Open the contributing guide

Research direction

Start in instrumentation/metrics_discovery/common/inc/internal/md_metric_prototype_manager.h, where std::stringstream is used, and review the GCC 17 failure in the linked build log. Re-run the project build with GCC 17 to confirm the missing declaration; done means the build completes without these errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
90/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.