Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix compilation error with protobuf 3.5 #1289

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions docker/Dockerfile.centos
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
1 change: 1 addition & 0 deletions exporters/otlp/src/otlp_http_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down