package failed with gcc:15 on emitterutils.cpp with multiple messages: error: ‘uint16_t’ was not declared in this scope emitterutils.cpp + note: ‘uint16_t’ is defined in header ‘<cstdint>’ Reproducible: Always Steps to Reproduce: enable gcc:15 compiler emerge =yaml-cpp-0.8.0 Actual Results: var/tmp/portage/dev-cpp/yaml-cpp-0.8.0/work/yaml-cpp-0.8.0/src/emitterutils.cpp:13:1: note: ‘uint16_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’ 12 | #include "yaml-cpp/null.h" +++ |+#include <cstdint> 13 | #include "yaml-cpp/ostream_wrapper.h" /var/tmp/portage/dev-cpp/yaml-cpp-0.8.0/work/yaml-cpp-0.8.0/src/emitterutils.cpp:221:21: error: ‘uint16_t’ was not declared in this scope 221 | std::pair<uint16_t, uint16_t> EncodeUTF16SurrogatePair(int codePoint) { | ^~~~~~~~ /var/tmp/portage/dev-cpp/yaml-cpp-0.8.0/work/yaml-cpp-0.8.0/src/emitterutils.cpp:221:21: note: ‘uint16_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’ /var/tmp/portage/dev-cpp/yaml-cpp-0.8.0/work/yaml-cpp-0.8.0/src/emitterutils.cpp:221:29: error: template argument 1 is invalid 221 | std::pair<uint16_t, uint16_t> EncodeUTF16SurrogatePair(int codePoint) { | ^ /var/tmp/portage/dev-cpp/yaml-cpp-0.8.0/work/yaml-cpp-0.8.0/src/emitterutils.cpp:221:29: error: template argument 2 is invalid /var/tmp/portage/dev-cpp/yaml-cpp-0.8.0/work/yaml-cpp-0.8.0/src/emitterutils.cpp: In function ‘int YAML::Utils::{anonymous}::EncodeUTF16SurrogatePair(int)’: /var/tmp/portage/dev-cpp/yaml-cpp-0.8.0/work/yaml-cpp-0.8.0/src/emitterutils.cpp:222:9: error: ‘uint32_t’ does not name a type 222 | const uint32_t leadOffset = 0xD800 - (0x10000 >> 10); patching src/emitterutils.cpp to add the missing header and allows gcc:15 to compile the package --- a/src/emitterutils.cpp +++ b/src/emitterutils.cpp @@ -1,4 +1,5 @@ #include <algorithm> +#include <cstdint> #include <iomanip> #include <sstream> #include "emitterutils.h" * =================================================================================================================================================================================================== * Applying user patches from /etc/portage/patches ... * Applying yaml-cpp-0.8.0-gcc15-fix.patch ... patching file src/emitterutils.cpp Hunk #1 succeeded at 1 with fuzz 1. [ ok ] * User patches applied.
Created attachment 899183 [details] build fail
Created attachment 899184 [details, diff] include <cstdint> patch
Created attachment 899185 [details] build log (successful)
Created attachment 899186 [details] info
Created attachment 899187 [details, diff] include fix
*** Bug 937557 has been marked as a duplicate of this bug. ***
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75c4eaca10479779ec6ef97d4f583d49e808ccfe commit 75c4eaca10479779ec6ef97d4f583d49e808ccfe Author: Christopher Fore <csfore@posteo.net> AuthorDate: 2024-08-15 13:59:39 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-08-15 14:06:25 +0000 dev-cpp/yaml-cpp: Fix compilation on GCC 15 - Include patch from upstream PR (refer to patch file) - Tests pass Closes: https://bugs.gentoo.org/937412 Signed-off-by: Christopher Fore <csfore@posteo.net> Closes: https://github.com/gentoo/gentoo/pull/38163 Signed-off-by: Sam James <sam@gentoo.org> .../files/yaml-cpp-0.8.0-include-cstdint.patch | 33 ++++++++++++++++++++++ dev-cpp/yaml-cpp/yaml-cpp-0.8.0.ebuild | 3 +- 2 files changed, 35 insertions(+), 1 deletion(-)