Skip to content

Commit

Permalink
otel: build abseil-cpp prior to protobuf
Browse files Browse the repository at this point in the history
This is not something that currently matters, but future versions of
protobuf require abseil as a build dependency.
  • Loading branch information
thresheek committed Jan 8, 2025
1 parent 400a444 commit 9cabefc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
14 changes: 7 additions & 7 deletions alpine/Makefile.module-otel
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ define MODULE_PREBUILD_otel
export PATH=$$builddir/prebuilt/bin/:$$PATH \&\& \
export NGX_OTEL_PROTO_DIR=$$builddir/../opentelemetry-proto-$(OPENTELEMETRY_PROTO_VERSION) \&\&
export CMAKE_PREFIX_PATH=$$builddir/prebuilt/ \&\& \
cd $$builddir/../protobuf-$(PROTOBUF_VERSION) \&\& mkdir build \&\& cd build \&\& \
cd $$builddir/../abseil-cpp-$(ABSEIL_VERSION) \&\& mkdir build \&\& cd build \&\& \
cmake \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_EXTENSIONS=OFF \
Expand All @@ -55,11 +55,12 @@ cd $$builddir/../protobuf-$(PROTOBUF_VERSION) \&\& mkdir build \&\& cd build \&\
-DCMAKE_INSTALL_PREFIX:STRING=$$builddir/prebuilt/ \
-DCMAKE_INSTALL_LIBDIR:STRING=lib \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-Dprotobuf_BUILD_TESTS=OFF \
-DBUILD_TESTING=OFF \
-DWITH_BENCHMARK=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
../cmake/ \&\& \
../ \&\& \
make $$_make_opts install \&\& \
cd $$builddir/../abseil-cpp-$(ABSEIL_VERSION) \&\& mkdir build \&\& cd build \&\& \
cd $$builddir/../protobuf-$(PROTOBUF_VERSION) \&\& mkdir build \&\& cd build \&\& \
cmake \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_EXTENSIONS=OFF \
Expand All @@ -69,10 +70,9 @@ cd $$builddir/../abseil-cpp-$(ABSEIL_VERSION) \&\& mkdir build \&\& cd build \&\
-DCMAKE_INSTALL_PREFIX:STRING=$$builddir/prebuilt/ \
-DCMAKE_INSTALL_LIBDIR:STRING=lib \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DBUILD_TESTING=OFF \
-DWITH_BENCHMARK=OFF \
-Dprotobuf_BUILD_TESTS=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
../ \&\& \
../cmake/ \&\& \
make $$_make_opts install \&\& \
cd $$builddir/../grpc-$(GRPC_VERSION) \&\& mkdir build \&\& cd build \&\& \
CXXFLAGS='-DGRPC_NO_XDS -DGRPC_NO_RLS' \
Expand Down
14 changes: 7 additions & 7 deletions debian/Makefile.module-otel
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ define MODULE_PREBUILD_otel
set -ex \&\& \
export PATH=$$builddir/prebuilt/bin/:$$$$PATH \&\& \
export CMAKE_PREFIX_PATH=$$builddir/prebuilt/ \&\& \
cd $$(BUILDDIR_nginx)/extra/protobuf-$(PROTOBUF_VERSION) \&\& mkdir build \&\& cd build \&\& \
cd $$(BUILDDIR_nginx)/extra/abseil-cpp-$(ABSEIL_VERSION) \&\& mkdir build \&\& cd build \&\& \
cmake \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_EXTENSIONS=OFF \
Expand All @@ -53,11 +53,12 @@ define MODULE_PREBUILD_otel
-DCMAKE_INSTALL_PREFIX:STRING=$$(BUILDDIR_nginx)/extra/prebuilt/ \
-DCMAKE_INSTALL_LIBDIR:STRING=lib \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-Dprotobuf_BUILD_TESTS=OFF \
-DBUILD_TESTING=OFF \
-DWITH_BENCHMARK=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
../cmake/ \&\& \
../ \&\& \
make -j$$(NUMJOBS) install \&\& \
cd $$(BUILDDIR_nginx)/extra/abseil-cpp-$(ABSEIL_VERSION) \&\& mkdir build \&\& cd build \&\& \
cd $$(BUILDDIR_nginx)/extra/protobuf-$(PROTOBUF_VERSION) \&\& mkdir build \&\& cd build \&\& \
cmake \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_EXTENSIONS=OFF \
Expand All @@ -67,10 +68,9 @@ define MODULE_PREBUILD_otel
-DCMAKE_INSTALL_PREFIX:STRING=$$(BUILDDIR_nginx)/extra/prebuilt/ \
-DCMAKE_INSTALL_LIBDIR:STRING=lib \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DBUILD_TESTING=OFF \
-DWITH_BENCHMARK=OFF \
-Dprotobuf_BUILD_TESTS=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
../ \&\& \
../cmake/ \&\& \
make -j$$(NUMJOBS) install \&\& \
cd $$(BUILDDIR_nginx)/extra/grpc-$(GRPC_VERSION) \&\& mkdir build \&\& cd build \&\& \
CXXFLAGS='-Wno-error=format-security -DGRPC_NO_XDS -DGRPC_NO_RLS' \
Expand Down
14 changes: 7 additions & 7 deletions rpm/SPECS/Makefile.module-otel
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ if [ $$_nproc -gt 1 ]; then
fi

cd %{bdir} \&\& mkdir prebuilt \&\& \
cd %{bdir}/protobuf-$(PROTOBUF_VERSION) \&\& mkdir build \&\& cd build \&\& \
cd %{bdir}/abseil-cpp-$(ABSEIL_VERSION) \&\& mkdir build \&\& cd build \&\& \
cmake \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_EXTENSIONS=OFF \
Expand All @@ -61,11 +61,12 @@ cd %{bdir}/protobuf-$(PROTOBUF_VERSION) \&\& mkdir build \&\& cd build \&\& \
-DCMAKE_INSTALL_PREFIX:STRING=%{bdir}/prebuilt/ \
-DCMAKE_INSTALL_LIBDIR:STRING=lib \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-Dprotobuf_BUILD_TESTS=OFF \
-DBUILD_TESTING=OFF \
-DWITH_BENCHMARK=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
../cmake/ \&\& \
../ \&\& \
make $$_make_opts install \&\& \
cd %{bdir}/abseil-cpp-$(ABSEIL_VERSION) \&\& mkdir build \&\& cd build \&\& \
cd %{bdir}/protobuf-$(PROTOBUF_VERSION) \&\& mkdir build \&\& cd build \&\& \
cmake \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_EXTENSIONS=OFF \
Expand All @@ -75,10 +76,9 @@ cd %{bdir}/abseil-cpp-$(ABSEIL_VERSION) \&\& mkdir build \&\& cd build \&\& \
-DCMAKE_INSTALL_PREFIX:STRING=%{bdir}/prebuilt/ \
-DCMAKE_INSTALL_LIBDIR:STRING=lib \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DBUILD_TESTING=OFF \
-DWITH_BENCHMARK=OFF \
-Dprotobuf_BUILD_TESTS=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
../ \&\& \
../cmake/ \&\& \
make $$_make_opts install \&\& \
cd %{bdir}/grpc-$(GRPC_VERSION) \&\& mkdir build \&\& cd build \&\& \
CXXFLAGS='-DGRPC_NO_XDS -DGRPC_NO_RLS' \
Expand Down

0 comments on commit 9cabefc

Please sign in to comment.