Bump grpc and reintroduce OTEL compilation (#11021)

* Bump grpc and reintroduce OTEL compilation

* Enable s390x again
This commit is contained in:
Ricardo Katz 2024-02-26 20:05:00 -03:00 committed by GitHub
parent e78af97ecd
commit 391a304b10
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 38 additions and 6 deletions

View file

@ -104,6 +104,11 @@ export LUA_RESTY_GLOBAL_THROTTLE_VERSION=v0.2.0
# Check for recent changes: https://github.com/microsoft/mimalloc/compare/v1.7.6...master
export MIMALOC_VERSION=v2.1.2
# Check on https://github.com/open-telemetry/opentelemetry-cpp
export OPENTELEMETRY_CPP_VERSION="v1.11.0"
# Check on https://github.com/open-telemetry/opentelemetry-proto
export OPENTELEMETRY_PROTO_VERSION="v1.1.0"
export BUILD_PATH=/tmp/build
ARCH=$(uname -m)
@ -119,6 +124,7 @@ get_src()
echo "Downloading $url"
curl -sSL "$url" -o "$f"
# TODO: Reenable checksum verification but make it smarter
# echo "$hash $f" | sha256sum -c - || exit 10
if [ ! -z "$dest" ]; then
mkdir ${BUILD_PATH}/${dest}
@ -177,7 +183,7 @@ apk add \
grpc-dev \
protobuf-dev
apk add -X http://dl-cdn.alpinelinux.org/alpine/edge/testing opentelemetry-cpp-dev
# apk add -X http://dl-cdn.alpinelinux.org/alpine/edge/testing opentelemetry-cpp-dev
# There is some bug with some platforms and git, so force HTTP/1.1
git config --global http.version HTTP/1.1
@ -195,6 +201,12 @@ get_src 66dc7081488811e9f925719e34d1b4504c2801c81dee2920e5452a86b11405ae \
get_src aa961eafb8317e0eb8da37eb6e2c9ff42267edd18b56947384e719b85188f58b \
"https://github.com/vision5/ngx_devel_kit/archive/$NDK_VERSION.tar.gz" "ngx_devel_kit"
get_src abc123 \
"https://github.com/open-telemetry/opentelemetry-cpp/archive/$OPENTELEMETRY_CPP_VERSION.tar.gz" "opentelemetry-cpp"
get_src abc123 \
"https://github.com/open-telemetry/opentelemetry-proto/archive/$OPENTELEMETRY_PROTO_VERSION.tar.gz" "opentelemetry-proto"
get_src cd5e2cc834bcfa30149e7511f2b5a2183baf0b70dc091af717a89a64e44a2985 \
"https://github.com/openresty/set-misc-nginx-module/archive/$SETMISC_VERSION.tar.gz" "set-misc-nginx-module"
@ -288,7 +300,27 @@ make install
ln -s /usr/local/bin/luajit /usr/local/bin/lua
ln -s "$LUAJIT_INC" /usr/local/include/lua
cd "$BUILD_PATH"
cd "$BUILD_PATH/opentelemetry-cpp"
export CXXFLAGS="-DBENCHMARK_HAS_NO_INLINE_ASSEMBLY"
cmake -B build -G Ninja -Wno-dev \
-DOTELCPP_PROTO_PATH="${BUILD_PATH}/opentelemetry-proto/" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING="OFF" \
-DBUILD_W3CTRACECONTEXT_TEST="OFF" \
-DCMAKE_BUILD_TYPE=None \
-DWITH_ABSEIL=ON \
-DWITH_STL=ON \
-DWITH_EXAMPLES=OFF \
-DWITH_ZPAGES=OFF \
-DWITH_OTLP_GRPC=ON \
-DWITH_OTLP_HTTP=ON \
-DWITH_ZIPKIN=ON \
-DWITH_PROMETHEUS=OFF \
-DWITH_ASYNC_EXPORT_PREVIEW=OFF \
-DWITH_METRICS_EXEMPLAR_PREVIEW=OFF
cmake --build build
cmake --install build
# Git tuning
git config --global --add core.compression -1