diff --git a/docker/Dockerfile.centos b/docker/Dockerfile.centos index 66ca8f24b3..66138ba60a 100644 --- a/docker/Dockerfile.centos +++ b/docker/Dockerfile.centos @@ -1,13 +1,15 @@ FROM centos:7 +ARG TOOLSET_VER=11 + RUN yum update -y && yum install -y centos-release-scl epel-release -RUN yum install -y devtoolset-11 \ +RUN yum install -y devtoolset-${TOOLSET_VER} \ cmake3 git \ openssl-devel \ libcurl-devel \ - && source /opt/rh/devtoolset-11/enable + && source /opt/rh/devtoolset-${TOOLSET_VER}/enable -RUN echo "source /opt/rh/devtoolset-11/enable" >> /etc/bashrc +RUN echo "source /opt/rh/devtoolset-${TOOLSET_VER}/enable" >> /etc/bashrc RUN echo "BOOST_LIBRARYDIR=/usr/lib64/boost169" >> /etc/bashrc RUN echo "BOOST_INCLUDEDIR=/usr/include/boost169" >> /etc/bashrc @@ -17,7 +19,7 @@ ARG GRPC_VERSION=v1.43.2 RUN git clone --depth=1 -b $GRPC_VERSION https://github.com/grpc/grpc.git \ && cd grpc && git submodule update --init \ && mkdir -p "third_party/abseil-cpp/build" && cd "third_party/abseil-cpp/build" \ - && source /opt/rh/devtoolset-11/enable \ + && source /opt/rh/devtoolset-${TOOLSET_VER}/enable \ && cmake3 -DCMAKE_CXX_STANDARD=17 -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE .. \ && make -j${nproc} install && cd ../../.. \ && mkdir build && cd build \ @@ -40,7 +42,7 @@ RUN yum install -y \ && wget https://github.com/apache/thrift/archive/refs/tags/v$THRIFT_VERSION.tar.gz \ && tar -xvf v$THRIFT_VERSION.tar.gz \ && mkdir -p thrift-$THRIFT_VERSION/build && cd thrift-$THRIFT_VERSION/build \ - && source /opt/rh/devtoolset-11/enable \ + && source /opt/rh/devtoolset-${TOOLSET_VER}/enable \ && export BOOST_INCLUDEDIR=/usr/include/boost169 \ && export BOOST_LIBRARYDIR=/usr/lib64/boost169 \ && cmake3 \ @@ -66,7 +68,7 @@ RUN yum install -y \ RUN git clone --depth=1 https://github.com/open-telemetry/opentelemetry-cpp.git \ && cd opentelemetry-cpp && git submodule update --init \ && mkdir -p build && cd build \ - && source /opt/rh/devtoolset-11/enable \ + && source /opt/rh/devtoolset-${TOOLSET_VER}/enable \ && export BOOST_INCLUDEDIR=/usr/include/boost169 \ && export BOOST_LIBRARYDIR=/usr/lib64/boost169 \ && cmake3 \ diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_environment.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_environment.h index c60de87eb9..bf7ea6a61c 100644 --- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_environment.h +++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_environment.h @@ -53,7 +53,7 @@ inline const std::string GetOtlpDefaultHttpEndpoint() return endpoint.size() ? endpoint : kOtlpEndpointDefault; } -inline const bool GetOtlpDefaultIsSslEnable() +inline bool GetOtlpDefaultIsSslEnable() { constexpr char kOtlpTracesIsSslEnableEnv[] = "OTEL_EXPORTER_OTLP_TRACES_SSL_ENABLE"; constexpr char kOtlpIsSslEnableEnv[] = "OTEL_EXPORTER_OTLP_SSL_ENABLE"; diff --git a/exporters/otlp/src/otlp_http_client.cc b/exporters/otlp/src/otlp_http_client.cc index 544f74ca7c..e3e1a8c467 100644 --- a/exporters/otlp/src/otlp_http_client.cc +++ b/exporters/otlp/src/otlp_http_client.cc @@ -18,6 +18,7 @@ #include "google/protobuf/message.h" #include "google/protobuf/reflection.h" #include "google/protobuf/stubs/common.h" +#include "google/protobuf/stubs/stringpiece.h" #include "nlohmann/json.hpp" #if defined(GOOGLE_PROTOBUF_VERSION) && GOOGLE_PROTOBUF_VERSION >= 3007000