Skip to content

Build failed with gcc 11.2.0 with ENABLE_METRICS_PREVIEW #1028

@owent

Description

@owent

Describe your environment

System: CentOS 7

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/gcc-11/libexec/gcc/x86_64-pc-linux-gnu/11.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-11.2.0/configure --prefix=/opt/gcc-11 --with-gmp=/opt/gcc-11 --with-mpc=/opt/gcc-11 --with-mpfr=/opt/gcc-11 --with-isl=/opt/gcc-11 --with-zstd=/opt/gcc-11 --with-target-bdw-gc=/opt/gcc-11/multilib/64,32=/opt/gcc-11/multilib/32 --enable-shared --enable-static --enable-gnu-unique-object --enable-bootstrap --enable-build-with-cxx --disable-libjava-multilib --enable-checking=release --enable-gold --enable-ld --enable-libada --enable-libssp --enable-lto --enable-objc-gc --enable-vtable-verify --enable-linker-build-id --enable-rpath --enable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.0 (GCC)

Steps to reproduce

cmake [...] -DWITH_METRICS_PREVIEW=ON

What is the expected behavior?
Build success

What is the actual behavior?

[ 43%] Building CXX object sdk/src/metrics/CMakeFiles/opentelemetry_metrics.dir/meter_provider.cc.o
In file included from /data/home/owent/workspace/github/atframework/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.0.1/sdk/include/opentelemetry/sdk/metrics/meter.h:12,
                 from /data/home/owent/workspace/github/atframework/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.0.1/sdk/include/opentelemetry/sdk/metrics/meter_provider.h:9,
                 from /data/home/owent/workspace/github/atframework/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.0.1/sdk/src/metrics/meter_provider.cc:5:
/data/home/owent/workspace/github/atframework/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.0.1/sdk/include/opentelemetry/sdk/metrics/sync_instruments.h:192:25: error: expected unqualified-id before ')' token
  192 |   BoundUpDownCounter<T>() = default;
      |                         ^
/data/home/owent/workspace/github/atframework/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.0.1/sdk/include/opentelemetry/sdk/metrics/sync_instruments.h:194:43: error: expected ')' before 'name'
  194 |   BoundUpDownCounter<T>(nostd::string_view name,
      |                        ~                  ^~~~~
      |                                           )
gmake[2]: *** [sdk/src/metrics/CMakeFiles/opentelemetry_metrics.dir/meter_provider.cc.o] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions