Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 937412 - dev-cpp/yaml-cpp-0.8.0: [gcc-15] error: ‘uint16_t’ was not declared in this scope
Summary: dev-cpp/yaml-cpp-0.8.0: [gcc-15] error: ‘uint16_t’ was not declared in this s...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alexey
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: gcc-15
  Show dependency tree
 
Reported: 2024-08-05 23:55 UTC by tdr
Modified: 2024-08-06 05:17 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build fail (yaml-cpp-0.8.0-build-failure.log,27.60 KB, text/plain)
2024-08-05 23:56 UTC, tdr
Details
include <cstdint> patch (yaml-cpp-0.8.0-gcc15-fix.patch,35.74 KB, patch)
2024-08-05 23:57 UTC, tdr
Details | Diff
build log (successful) (yaml-cpp-0.8.0-build-successful.log,35.73 KB, text/plain)
2024-08-05 23:57 UTC, tdr
Details
info (emerge--info.txt,6.10 KB, text/plain)
2024-08-06 00:00 UTC, tdr
Details
include fix (yaml-cpp-0.8.0-gcc15-fix.patch,178 bytes, patch)
2024-08-06 02:30 UTC, tdr
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tdr 2024-08-05 23:55:27 UTC
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.
Comment 1 tdr 2024-08-05 23:56:05 UTC
Created attachment 899183 [details]
build fail
Comment 2 tdr 2024-08-05 23:57:01 UTC
Created attachment 899184 [details, diff]
include <cstdint> patch
Comment 3 tdr 2024-08-05 23:57:28 UTC
Created attachment 899185 [details]
build log (successful)
Comment 4 tdr 2024-08-06 00:00:24 UTC
Created attachment 899186 [details]
info
Comment 5 tdr 2024-08-06 02:30:02 UTC
Created attachment 899187 [details, diff]
include fix