Skip to content

Commit 91b0572

Browse files
authored
fix compilation error with protobuf 3.5 (#1289)
1 parent 2c9ce39 commit 91b0572

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

docker/Dockerfile.centos

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
FROM centos:7
22

3+
ARG TOOLSET_VER=11
4+
35
RUN yum update -y && yum install -y centos-release-scl epel-release
4-
RUN yum install -y devtoolset-11 \
6+
RUN yum install -y devtoolset-${TOOLSET_VER} \
57
cmake3 git \
68
openssl-devel \
79
libcurl-devel \
8-
&& source /opt/rh/devtoolset-11/enable
10+
&& source /opt/rh/devtoolset-${TOOLSET_VER}/enable
911

10-
RUN echo "source /opt/rh/devtoolset-11/enable" >> /etc/bashrc
12+
RUN echo "source /opt/rh/devtoolset-${TOOLSET_VER}/enable" >> /etc/bashrc
1113
RUN echo "BOOST_LIBRARYDIR=/usr/lib64/boost169" >> /etc/bashrc
1214
RUN echo "BOOST_INCLUDEDIR=/usr/include/boost169" >> /etc/bashrc
1315

@@ -17,7 +19,7 @@ ARG GRPC_VERSION=v1.43.2
1719
RUN git clone --depth=1 -b $GRPC_VERSION https://github.com/grpc/grpc.git \
1820
&& cd grpc && git submodule update --init \
1921
&& mkdir -p "third_party/abseil-cpp/build" && cd "third_party/abseil-cpp/build" \
20-
&& source /opt/rh/devtoolset-11/enable \
22+
&& source /opt/rh/devtoolset-${TOOLSET_VER}/enable \
2123
&& cmake3 -DCMAKE_CXX_STANDARD=17 -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE .. \
2224
&& make -j${nproc} install && cd ../../.. \
2325
&& mkdir build && cd build \
@@ -40,7 +42,7 @@ RUN yum install -y \
4042
&& wget https://github.com/apache/thrift/archive/refs/tags/v$THRIFT_VERSION.tar.gz \
4143
&& tar -xvf v$THRIFT_VERSION.tar.gz \
4244
&& mkdir -p thrift-$THRIFT_VERSION/build && cd thrift-$THRIFT_VERSION/build \
43-
&& source /opt/rh/devtoolset-11/enable \
45+
&& source /opt/rh/devtoolset-${TOOLSET_VER}/enable \
4446
&& export BOOST_INCLUDEDIR=/usr/include/boost169 \
4547
&& export BOOST_LIBRARYDIR=/usr/lib64/boost169 \
4648
&& cmake3 \
@@ -66,7 +68,7 @@ RUN yum install -y \
6668
RUN git clone --depth=1 https://github.com/open-telemetry/opentelemetry-cpp.git \
6769
&& cd opentelemetry-cpp && git submodule update --init \
6870
&& mkdir -p build && cd build \
69-
&& source /opt/rh/devtoolset-11/enable \
71+
&& source /opt/rh/devtoolset-${TOOLSET_VER}/enable \
7072
&& export BOOST_INCLUDEDIR=/usr/include/boost169 \
7173
&& export BOOST_LIBRARYDIR=/usr/lib64/boost169 \
7274
&& cmake3 \

exporters/otlp/include/opentelemetry/exporters/otlp/otlp_environment.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ inline const std::string GetOtlpDefaultHttpEndpoint()
5353
return endpoint.size() ? endpoint : kOtlpEndpointDefault;
5454
}
5555

56-
inline const bool GetOtlpDefaultIsSslEnable()
56+
inline bool GetOtlpDefaultIsSslEnable()
5757
{
5858
constexpr char kOtlpTracesIsSslEnableEnv[] = "OTEL_EXPORTER_OTLP_TRACES_SSL_ENABLE";
5959
constexpr char kOtlpIsSslEnableEnv[] = "OTEL_EXPORTER_OTLP_SSL_ENABLE";

exporters/otlp/src/otlp_http_client.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "google/protobuf/message.h"
1919
#include "google/protobuf/reflection.h"
2020
#include "google/protobuf/stubs/common.h"
21+
#include "google/protobuf/stubs/stringpiece.h"
2122
#include "nlohmann/json.hpp"
2223

2324
#if defined(GOOGLE_PROTOBUF_VERSION) && GOOGLE_PROTOBUF_VERSION >= 3007000

0 commit comments

Comments
 (0)