Skip to content

Upgrade prometheus-cpp #5278

@YangKeao

Description

@YangKeao

Enhancement

The current prometheus-cpp version is too old, with some bugs in compilation:

/home/yangkeao/Project/github.com/YangKeao/tiflash/contrib/prometheus-cpp/core/src/histogram.cc:53:38: error: no member named 'numeric_limits' in namespace 'std'
                              ? std::numeric_limits<double>::infinity()
                                ~~~~~^
/home/yangkeao/Project/github.com/YangKeao/tiflash/contrib/prometheus-cpp/core/src/histogram.cc:53:59: error: expected '(' for function-style cast or type construction
                              ? std::numeric_limits<double>::infinity()
                                                    ~~~~~~^
/home/yangkeao/Project/github.com/YangKeao/tiflash/contrib/prometheus-cpp/core/src/histogram.cc:53:62: error: no member named 'infinity' in the global namespace
                              ? std::numeric_limits<double>::infinity()

This has been fixed in jupp0r/prometheus-cpp#442, Jan 5, 2021. The current version of prometheus-cpp in tiflash is ca1f34 in Oct 25, 2019.

This problem only occurs with libstdc++ >= 11 (as described in fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementThe issue or PR belongs to an enhancement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions