Repository navigation
Description
Describe your environment
Linux CentOS7 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
gcc 12.2.0
Steps to reproduce
- git clone master
- cmake3 -DBUILD_TESTING=OFF -DCMAKE_CXX_STANDARD=17 -DWITH_OTLP=ON ..
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building for architecture ARCH=x64
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
CMake Warning at /usr/share/cmake3/Modules/FindProtobuf.cmake:500 (message):
Protobuf compiler version 22.2 doesn't match library version 4.22.2
Call Stack (most recent call first):
CMakeLists.txt:333 (find_package)
-- Found Protobuf: /usr/local/lib64/libprotobuf.a;-lpthread (found version "4.22.2")
-- PROTOBUF_PROTOC_EXECUTABLE=/usr/local/bin/protoc
-- opentelemetry-proto dependency satisfied by: git submodule
-- Performing Test check_cxx_compiler_flag_-Wno-type-limits
-- Performing Test check_cxx_compiler_flag_-Wno-type-limits - Success
-- Performing Test check_cxx_compiler_flag_-Wno-deprecated-declarations
-- Performing Test check_cxx_compiler_flag_-Wno-deprecated-declarations - Success
-- Performing Test check_cxx_compiler_flag_-Wno-unused-parameter
-- Performing Test check_cxx_compiler_flag_-Wno-unused-parameter - Success
-- gRPC_CPP_PLUGIN_EXECUTABLE=/usr/local/bin/grpc_cpp_plugin
Building with nostd types...
PATH:/root/opentelemetry-cpp/examples/grpc/protos:/root/opentelemetry-cpp/examples/grpc/protos/messages.proto
-- Configuring done
-- Generating done
-- Build files have been written to: /root/opentelemetry-cpp/build
- make
What is the expected behavior?
success
What is the actual behavior?
failed
Additional context
error.txt
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
marcalff commentedon Apr 13, 2023
I suspect that
-DCMAKE_CXX_STANDARD=17in fact requires-DWITH_STLin practice, which should be documented and/or enforced in the makefile.Here, the compiler which supports C++17 compiles with replacement headers in the nostd namespace, which are meant to provide C++11 features to pre-C++11 compilers ... causing the errors reported.
See related options:
WITH_GSLWITH_ABSEILivgotcrazy commentedon May 2, 2023
thanks a lot, it seems to work.
lidavidm commentedon May 25, 2023
We ran into this on the conda-forge package when Protobuf got bumped.
WITH_STLmostly fixes things, but it seems Protobuf 4.23 also removedgoogle/protobuf/stubs/stringpiece.handgoogle/protobuf/stubs/strutil.hwhich causes issues for otlp_http_client.cc. (And removing the includes isn't enough, since that file callsgoogle::protobuf::Base64Escape; that appears to no longer be in the Protobuf API.)h-vetinari commentedon May 26, 2023
The commit for this is protocolbuffers/protobuf@a3c8e2d, and it seems to be due to the switch to abseil, e.g.:
[-]compile WITH_OTLP failed[/-][+][BUILD] Compile WITH_OTLP failed[/+]github-actions commentedon Aug 1, 2023
This issue was marked as stale due to lack of activity.