Skip to content

release 0.8.0 fails to build on linux #1359

@ImOnALampshade

Description

@ImOnALampshade

Importing yaml-cpp via vcpkg is broken due to this.

When trying to build locally, the following error occurs:

FAILED: CMakeFiles/yaml-cpp.dir/src/emitterutils.cpp.o 
/usr/bin/c++ -DYAML_CPP_STATIC_DEFINE -I/home/faith/.local/share/vcpkg/buildtrees/yaml-cpp/src/0.8.0-eb57a68db8.clean/include -I/home/faith/.local/share/vcpkg/buildtrees/yaml-cpp/src/0.8.0-eb57a68db8.clean/src -fPIC -g -std=gnu++11 -fPIC -Wall -Wextra -Wshadow -Weffc++ -Wno-long-long -pedantic -pedantic-errors -MD -MT CMakeFiles/yaml-cpp.dir/src/emitterutils.cpp.o -MF CMakeFiles/yaml-cpp.dir/src/emitterutils.cpp.o.d -o CMakeFiles/yaml-cpp.dir/src/emitterutils.cpp.o -c /home/faith/.local/share/vcpkg/buildtrees/yaml-cpp/src/0.8.0-eb57a68db8.clean/src/emitterutils.cpp
/home/faith/.local/share/vcpkg/buildtrees/yaml-cpp/src/0.8.0-eb57a68db8.clean/src/emitterutils.cpp:221:11: error: ‘uint16_t’ was not declared in this scope
  221 | std::pair<uint16_t, uint16_t> EncodeUTF16SurrogatePair(int codePoint) {
      |           ^~~~~~~~
/home/faith/.local/share/vcpkg/buildtrees/yaml-cpp/src/0.8.0-eb57a68db8.clean/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"
/home/faith/.local/share/vcpkg/buildtrees/yaml-cpp/src/0.8.0-eb57a68db8.clean/src/emitterutils.cpp:221:21: error: ‘uint16_t’ was not declared in this scope
  221 | std::pair<uint16_t, uint16_t> EncodeUTF16SurrogatePair(int codePoint) {
      |                     ^~~~~~~~
/home/faith/.local/share/vcpkg/buildtrees/yaml-cpp/src/0.8.0-eb57a68db8.clean/src/emitterutils.cpp:221:21: note: ‘uint16_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
/home/faith/.local/share/vcpkg/buildtrees/yaml-cpp/src/0.8.0-eb57a68db8.clean/src/emitterutils.cpp:221:29: error: template argument 1 is invalid
  221 | std::pair<uint16_t, uint16_t> EncodeUTF16SurrogatePair(int codePoint) {
      |                             ^

The issue here seems to have been fixed in the master branch. If I clone my own version and build the master branch, everything compiles cleanly.

However, if I git checkout 0.8.0, the build fails with the same errors.

Perhaps a simple version tick would fix this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions