Skip to content

GlobalMetadataDBConfig.hpp fails to compile with GCC 13. #643

@junhaoliao

Description

@junhaoliao

Bug

enum class MetadataDBType : uint8_t {
references uint8_t; however, such reference no longer exists in GCC 13 according to https://gcc.gnu.org/gcc-13/porting_to.html#:~:text=Header%20dependency%20changes

Header dependency changes
Some C++ Standard Library headers have been changed to no longer include other headers that were being used internally by the library. As such, C++ programs that used standard library components without including the right headers will no longer compile.

The following headers are used less widely in libstdc++ and may need to be included explicitly when compiling with GCC 13:

<string> (for std::string, std::to_string, std::stoi etc.)
<system_error> (for std::error_code, std::error_category, std::system_error).
<cstdint> (for std::int8_t, std::int32_t etc.)
<cstdio> (for std::printf, std::fopen etc.)
<cstdlib> (for std::strtol, std::malloc etc.)

CLP version

329edf6

Environment

junhao@GIGABYTE:~/workspace/checkinstall$ gcc --version
gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

junhao@GIGABYTE:~/workspace/checkinstall$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.1 LTS
Release:        24.04
Codename:       noble
junhao@GIGABYTE:~/workspace/checkinstall$ cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.1 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo

Reproduction steps

In an environment where GCC 13 is installed (e.g., Ubuntu 2404), follow https://docs.yscope.com/clp/main/dev-guide/building-package.html#build to build the package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions