diff --git a/ci/cloudbuild/builds/lib/quickstart.sh b/ci/cloudbuild/builds/lib/quickstart.sh index 6d585b95537b5..73b1b3bcff371 100644 --- a/ci/cloudbuild/builds/lib/quickstart.sh +++ b/ci/cloudbuild/builds/lib/quickstart.sh @@ -59,6 +59,7 @@ function quickstart::build_one_quickstart() { "-S" "${src_dir}" "-B" "${cmake_bin_dir}" -DCMAKE_CXX_STANDARD=17 + -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH="${prefix}" ) if command -v /usr/local/bin/sccache >/dev/null 2>&1; then @@ -120,7 +121,11 @@ function quickstart::run_one_quickstart() { io::log "[ CMake ]" local cmake_bin_dir="${PROJECT_ROOT}/cmake-out/quickstart/cmake-${bin_dir_suffix}" - io::run "${cmake_bin_dir}/quickstart" "${run_args[@]}" + if command -v /usr/bin/valgrind >/dev/null 2>&1; then + io::run valgrind --leak-check=full "${cmake_bin_dir}/quickstart" "${run_args[@]}" + else + io::run env MALLOC_CHECK_=3 "${cmake_bin_dir}/quickstart" "${run_args[@]}" + fi # echo # io::log "[ Make ]" diff --git a/ci/cloudbuild/dockerfiles/demo-alpine-stable.Dockerfile b/ci/cloudbuild/dockerfiles/demo-alpine-stable.Dockerfile index d44f692b2e6ec..99e16943dd1ee 100644 --- a/ci/cloudbuild/dockerfiles/demo-alpine-stable.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-alpine-stable.Dockerfile @@ -58,7 +58,7 @@ ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig # ```bash RUN apk update && \ - apk add abseil-cpp-dev crc32c-dev c-ares-dev curl-dev grpc-dev \ + apk add abseil-cpp-dev c-ares-dev curl-dev grpc-dev \ protobuf-dev nlohmann-json openssl-dev re2-dev # ``` diff --git a/ci/cloudbuild/dockerfiles/demo-debian-bookworm.Dockerfile b/ci/cloudbuild/dockerfiles/demo-debian-bookworm.Dockerfile index d6c49d263665c..1960179aeff56 100644 --- a/ci/cloudbuild/dockerfiles/demo-debian-bookworm.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-debian-bookworm.Dockerfile @@ -60,12 +60,12 @@ ENV PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig # #### abseil WORKDIR /var/tmp/build/abseil-cpp -RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ cmake --build cmake-out -- -j ${NCPU:-4} && \ diff --git a/ci/cloudbuild/dockerfiles/demo-debian-bullseye.Dockerfile b/ci/cloudbuild/dockerfiles/demo-debian-bullseye.Dockerfile index d6ae0eaf807a1..5a637bc6a67b2 100644 --- a/ci/cloudbuild/dockerfiles/demo-debian-bullseye.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-debian-bullseye.Dockerfile @@ -29,20 +29,14 @@ RUN apt-get update && \ # #### Abseil -# Debian 11 ships with Abseil==20200923.3. Unfortunately, the current gRPC -# version needs Abseil >= 20210324. Enabling `ABSL_PROPAGATE_CXX_STD` -# propagates the version of C++ used to compile Abseil to anything that depends -# on Abseil. - # ```bash WORKDIR /var/tmp/build/abseil-cpp -RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ cmake --build cmake-out -- -j ${NCPU:-4} && \ @@ -50,27 +44,6 @@ RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | ldconfig # ``` -# #### crc32c - -# The project depends on the Crc32c library, we need to compile this from -# source: - -# ```bash -WORKDIR /var/tmp/build/crc32c -RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -S . -B cmake-out && \ - cmake --build cmake-out -- -j ${NCPU:-4} && \ - cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ - ldconfig -# ``` - # #### nlohmann_json library # Debian 11 also ships with nlohmann-json==3.9.1, which is recent enough for our needs: diff --git a/ci/cloudbuild/dockerfiles/demo-fedora.Dockerfile b/ci/cloudbuild/dockerfiles/demo-fedora.Dockerfile index 75732c47670e1..fbb9eb1d7ef08 100644 --- a/ci/cloudbuild/dockerfiles/demo-fedora.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-fedora.Dockerfile @@ -31,7 +31,7 @@ RUN dnf makecache && \ # ```bash RUN dnf makecache && \ dnf install -y protobuf-compiler protobuf-devel grpc-cpp grpc-devel \ - json-devel libcurl-devel google-crc32c-devel openssl-devel + json-devel libcurl-devel openssl-devel # ``` # #### Patching pkg-config @@ -54,14 +54,6 @@ RUN curl -fsSL https://distfiles.ariadne.space/pkgconf/pkgconf-2.2.0.tar.gz | \ ldconfig && cd /var/tmp && rm -fr build # ``` -# Older versions of Fedora hard-code RE2 to use C++11. It was fixed starting -# with Fedora:38. If you using Fedora >= 38 or you are not planning to use -# `pkg-config(1)` you can ignore this step. Alternatively, you can install RE2 -# and gRPC from source. -# ``` -# sed -i 's/-std=c\+\+11 //' /usr/lib64/pkgconfig/re2.pc -# ``` - # The following steps will install libraries and tools in `/usr/local`. By # default, pkgconf does not search in these directories. We need to explicitly # set the search path. diff --git a/ci/cloudbuild/dockerfiles/demo-opensuse-leap.Dockerfile b/ci/cloudbuild/dockerfiles/demo-opensuse-leap.Dockerfile index 8292f720ef64b..b384bd39b5ca5 100644 --- a/ci/cloudbuild/dockerfiles/demo-opensuse-leap.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-opensuse-leap.Dockerfile @@ -35,7 +35,7 @@ RUN zypper refresh && \ # ```bash RUN zypper refresh && \ zypper install --allow-downgrade -y abseil-cpp-devel c-ares-devel \ - libcurl-devel libopenssl-devel libcrc32c-devel nlohmann_json-devel \ + libcurl-devel libopenssl-devel nlohmann_json-devel \ grpc-devel libprotobuf-devel # ``` diff --git a/ci/cloudbuild/dockerfiles/demo-rockylinux-9.Dockerfile b/ci/cloudbuild/dockerfiles/demo-rockylinux-9.Dockerfile index 9cf4808143165..9abb7c200278d 100644 --- a/ci/cloudbuild/dockerfiles/demo-rockylinux-9.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-rockylinux-9.Dockerfile @@ -68,20 +68,14 @@ ENV PATH=/usr/local/bin:${PATH} # #### Abseil -# Rocky Linux 9 includes a package for Abseil, unfortunately, this package is -# incomplete, as it lacks the CMake support files for it. We need to compile -# Abseiil from source. Enabling `ABSL_PROPAGATE_CXX_STD` propagates the version -# of C++ used to compile Abseil to anything that depends on Abseil. - # ```bash WORKDIR /var/tmp/build/abseil-cpp -RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ cmake --build cmake-out -- -j ${NCPU:-4} && \ @@ -159,27 +153,6 @@ RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.74.1.tar.gz | \ ldconfig # ``` -# #### crc32c - -# The project depends on the Crc32c library, we need to compile this from -# source: - -# ```bash -WORKDIR /var/tmp/build/crc32c -RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -S . -B cmake-out && \ - cmake --build cmake-out -- -j ${NCPU:-4} && \ - cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ - ldconfig -# ``` - # #### nlohmann_json library # The project depends on the nlohmann_json library. We use CMake to diff --git a/ci/cloudbuild/dockerfiles/demo-ubuntu-24.04.Dockerfile b/ci/cloudbuild/dockerfiles/demo-ubuntu-24.04.Dockerfile index dbf368f57a9b3..43ca5f0adc81e 100644 --- a/ci/cloudbuild/dockerfiles/demo-ubuntu-24.04.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-ubuntu-24.04.Dockerfile @@ -64,12 +64,11 @@ RUN ln -s /usr/bin/pkgconf /usr/bin/pkg-config # #### abseil WORKDIR /var/tmp/build/abseil-cpp -RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ cmake --build cmake-out -- -j ${NCPU:-4} && \ diff --git a/ci/cloudbuild/dockerfiles/demo-ubuntu-focal.Dockerfile b/ci/cloudbuild/dockerfiles/demo-ubuntu-focal.Dockerfile index a22d83f75bdd0..6df4af569dce0 100644 --- a/ci/cloudbuild/dockerfiles/demo-ubuntu-focal.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-ubuntu-focal.Dockerfile @@ -30,19 +30,14 @@ RUN apt-get update && \ # #### Abseil -# We need a recent version of Abseil. Enabling `ABSL_PROPAGATE_CXX_STD` -# propagates the version of C++ used to compile Abseil to anything that depends -# on Abseil. - # ```bash WORKDIR /var/tmp/build/abseil-cpp -RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ cmake --build cmake-out -- -j ${NCPU:-4} && \ @@ -117,27 +112,6 @@ RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.74.1.tar.gz | \ ldconfig # ``` -# #### crc32c - -# The project depends on the Crc32c library, we need to compile this from -# source: - -# ```bash -WORKDIR /var/tmp/build/crc32c -RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -S . -B cmake-out && \ - cmake --build cmake-out -- -j ${NCPU:-4} && \ - cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ - ldconfig -# ``` - # #### nlohmann_json library # The project depends on the nlohmann_json library. We use CMake to diff --git a/ci/cloudbuild/dockerfiles/demo-ubuntu-jammy.Dockerfile b/ci/cloudbuild/dockerfiles/demo-ubuntu-jammy.Dockerfile index b977fc72ab615..7c36db76923a4 100644 --- a/ci/cloudbuild/dockerfiles/demo-ubuntu-jammy.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-ubuntu-jammy.Dockerfile @@ -30,19 +30,14 @@ RUN apt-get update && \ # #### Abseil -# We need a recent version of Abseil. Enabling `ABSL_PROPAGATE_CXX_STD` -# propagates the version of C++ used to compile Abseil to anything that depends -# on Abseil. - # ```bash WORKDIR /var/tmp/build/abseil-cpp -RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ cmake --build cmake-out -- -j ${NCPU:-4} && \ @@ -98,27 +93,6 @@ RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.74.1.tar.gz | \ ldconfig # ``` -# #### crc32c - -# The project depends on the Crc32c library, we need to compile this from -# source: - -# ```bash -WORKDIR /var/tmp/build/crc32c -RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -S . -B cmake-out && \ - cmake --build cmake-out -- -j ${NCPU:-4} && \ - cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ - ldconfig -# ``` - # #### nlohmann_json library # The project depends on the nlohmann_json library. We use CMake to diff --git a/ci/cloudbuild/dockerfiles/fedora-latest-cmake.Dockerfile b/ci/cloudbuild/dockerfiles/fedora-latest-cmake.Dockerfile index d020a1a95bdda..fc9969d9ba776 100644 --- a/ci/cloudbuild/dockerfiles/fedora-latest-cmake.Dockerfile +++ b/ci/cloudbuild/dockerfiles/fedora-latest-cmake.Dockerfile @@ -42,6 +42,8 @@ RUN dnf makecache && dnf debuginfo-install -y libstdc++ # These are used by the docfx tool. RUN dnf makecache && dnf install -y pugixml-devel yaml-cpp-devel +RUN dnf install -y valgrind + # Sets root's password to the empty string to enable users to get a root shell # inside the container with `su -` and no password. Sudo would not work because # we run these containers as the invoking user's uid, which does not exist in @@ -70,7 +72,7 @@ ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib # We disable the inline namespace because otherwise Abseil LTS updates break our # `check-api` build. WORKDIR /var/tmp/build -RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE="Release" \ @@ -102,19 +104,6 @@ RUN curl -fsSL https://github.com/google/benchmark/archive/v1.9.2.tar.gz | \ cmake --build cmake-out --target install && \ ldconfig && cd /var/tmp && rm -fr build -WORKDIR /var/tmp/build -RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -GNinja -S . -B cmake-out && \ - cmake --build cmake-out --target install && \ - ldconfig && cd /var/tmp && rm -fr build - WORKDIR /var/tmp/build RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \ tar -xzf - --strip-components=1 && \ diff --git a/ci/cloudbuild/dockerfiles/fedora-latest-cxx20.Dockerfile b/ci/cloudbuild/dockerfiles/fedora-latest-cxx20.Dockerfile index 36d0c5430e660..55484f4c40e66 100644 --- a/ci/cloudbuild/dockerfiles/fedora-latest-cxx20.Dockerfile +++ b/ci/cloudbuild/dockerfiles/fedora-latest-cxx20.Dockerfile @@ -73,13 +73,12 @@ ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib # with fewer layers). WORKDIR /var/tmp/build -RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_CXX_STANDARD=20 \ -DCMAKE_BUILD_TYPE=Release \ -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -GNinja -S . -B cmake-out && \ cmake --build cmake-out && cmake --install cmake-out && \ @@ -111,21 +110,6 @@ RUN curl -fsSL https://github.com/google/benchmark/archive/v1.9.2.tar.gz | \ ldconfig && \ cd /var/tmp && rm -fr build -WORKDIR /var/tmp/build -RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_CXX_STANDARD=20 \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -GNinja -S . -B cmake-out && \ - cmake --build cmake-out && cmake --install cmake-out && \ - ldconfig && \ - cd /var/tmp && rm -fr build - WORKDIR /var/tmp/build RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \ tar -xzf - --strip-components=1 && \ diff --git a/ci/cloudbuild/dockerfiles/fedora-latest-publish-docs.Dockerfile b/ci/cloudbuild/dockerfiles/fedora-latest-publish-docs.Dockerfile index fa0945ee79d52..c9aead6fb3e8a 100644 --- a/ci/cloudbuild/dockerfiles/fedora-latest-publish-docs.Dockerfile +++ b/ci/cloudbuild/dockerfiles/fedora-latest-publish-docs.Dockerfile @@ -27,7 +27,6 @@ RUN dnf makecache && \ dnf install -y \ gmock-devel \ google-benchmark-devel \ - google-crc32c-devel \ grpc-devel \ gtest-devel \ json-devel \ diff --git a/ci/cloudbuild/dockerfiles/fedora-m32.Dockerfile b/ci/cloudbuild/dockerfiles/fedora-m32.Dockerfile index 6435028d58989..29d7f9efeabe2 100644 --- a/ci/cloudbuild/dockerfiles/fedora-m32.Dockerfile +++ b/ci/cloudbuild/dockerfiles/fedora-m32.Dockerfile @@ -36,7 +36,6 @@ RUN dnf makecache && \ glibc-devel.i686 \ gmock-devel.i686 \ google-benchmark-devel.i686 \ - google-crc32c-devel.i686 \ grpc-devel.i686 \ gtest-devel.i686 \ libcurl-devel.i686 \ diff --git a/ci/cloudbuild/dockerfiles/gcc-oldest.Dockerfile b/ci/cloudbuild/dockerfiles/gcc-oldest.Dockerfile index ea44c79c90ef1..daaa346f90561 100644 --- a/ci/cloudbuild/dockerfiles/gcc-oldest.Dockerfile +++ b/ci/cloudbuild/dockerfiles/gcc-oldest.Dockerfile @@ -32,7 +32,6 @@ RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_BUILD_TYPE=Release \ -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -GNinja -S . -B cmake-out && \ cmake --build cmake-out && cmake --install cmake-out && \ diff --git a/ci/cloudbuild/dockerfiles/ubuntu-20.04-install.Dockerfile b/ci/cloudbuild/dockerfiles/ubuntu-20.04-install.Dockerfile index 2c6d761f16513..d6d0b67baff00 100644 --- a/ci/cloudbuild/dockerfiles/ubuntu-20.04-install.Dockerfile +++ b/ci/cloudbuild/dockerfiles/ubuntu-20.04-install.Dockerfile @@ -59,13 +59,12 @@ RUN apt update && apt install -y openjdk-13-jre # image smaller (and with fewer layers) WORKDIR /var/tmp/build/abseil-cpp -RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE="Release" \ -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out -GNinja && \ cmake --build cmake-out --target install && \ @@ -96,20 +95,6 @@ RUN curl -fsSL https://github.com/google/benchmark/archive/v1.9.2.tar.gz | \ ldconfig && \ cd /var/tmp && rm -fr build -WORKDIR /var/tmp/build/crc32c -RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE="Release" \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -S . -B cmake-out -GNinja && \ - cmake --build cmake-out --target install && \ - ldconfig && \ - cd /var/tmp && rm -fr build - WORKDIR /var/tmp/build/nlohmann-json RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \ tar -xzf - --strip-components=1 && \ diff --git a/doc/packaging.md b/doc/packaging.md index b2bd8cb7f5221..78d9a35c50c3b 100644 --- a/doc/packaging.md +++ b/doc/packaging.md @@ -188,7 +188,7 @@ development packages ```bash apk update && \ - apk add abseil-cpp-dev crc32c-dev c-ares-dev curl-dev grpc-dev \ + apk add abseil-cpp-dev c-ares-dev curl-dev grpc-dev \ protobuf-dev nlohmann-json openssl-dev re2-dev ``` @@ -256,7 +256,7 @@ dependencies of `google-cloud-cpp`. ```bash sudo dnf makecache && \ sudo dnf install -y protobuf-compiler protobuf-devel grpc-cpp grpc-devel \ - json-devel libcurl-devel google-crc32c-devel openssl-devel + json-devel libcurl-devel openssl-devel ``` #### Patching pkg-config @@ -279,15 +279,6 @@ sudo make install && \ sudo ldconfig && cd /var/tmp && rm -fr build ``` -Older versions of Fedora hard-code RE2 to use C++11. It was fixed starting with -Fedora:38. If you using Fedora >= 38 or you are not planning to use -`pkg-config(1)` you can ignore this step. Alternatively, you can install RE2 and -gRPC from source. - -``` -sed -i 's/-std=c\+\+11 //' /usr/lib64/pkgconfig/re2.pc -``` - The following steps will install libraries and tools in `/usr/local`. By default, pkgconf does not search in these directories. We need to explicitly set the search path. @@ -365,7 +356,7 @@ Install some of the dependencies for `google-cloud-cpp`. ```bash sudo zypper refresh && \ sudo zypper install --allow-downgrade -y abseil-cpp-devel c-ares-devel \ - libcurl-devel libopenssl-devel libcrc32c-devel nlohmann_json-devel \ + libcurl-devel libopenssl-devel nlohmann_json-devel \ grpc-devel libprotobuf-devel ``` @@ -478,12 +469,11 @@ ln -s /usr/bin/pkgconf /usr/bin/pkg-config #### abseil mkdir -p $HOME/Downloads/abseil-cpp && cd $HOME/Downloads/abseil-cpp curl -fsSL -https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ -DABSL_BUILD_TESTING=OFF \ --DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ cmake --build cmake-out -- -j ${NCPU:-4} && \ @@ -553,18 +543,14 @@ sudo apt-get --no-install-recommends install -y apt-transport-https apt-utils \ #### Abseil -We need a recent version of Abseil. Enabling `ABSL_PROPAGATE_CXX_STD` propagates -the version of C++ used to compile Abseil to anything that depends on Abseil. - ```bash mkdir -p $HOME/Downloads/abseil-cpp && cd $HOME/Downloads/abseil-cpp -curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ cmake --build cmake-out -- -j ${NCPU:-4} && \ @@ -620,26 +606,6 @@ sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ sudo ldconfig ``` -#### crc32c - -The project depends on the Crc32c library, we need to compile this from source: - -```bash -mkdir -p $HOME/Downloads/crc32c && cd $HOME/Downloads/crc32c -curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -S . -B cmake-out && \ - cmake --build cmake-out -- -j ${NCPU:-4} && \ -sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ -sudo ldconfig -``` - #### nlohmann_json library The project depends on the nlohmann_json library. We use CMake to install it as @@ -725,18 +691,14 @@ sudo apt-get --no-install-recommends install -y apt-transport-https apt-utils \ #### Abseil -We need a recent version of Abseil. Enabling `ABSL_PROPAGATE_CXX_STD` propagates -the version of C++ used to compile Abseil to anything that depends on Abseil. - ```bash mkdir -p $HOME/Downloads/abseil-cpp && cd $HOME/Downloads/abseil-cpp -curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ cmake --build cmake-out -- -j ${NCPU:-4} && \ @@ -811,26 +773,6 @@ sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ sudo ldconfig ``` -#### crc32c - -The project depends on the Crc32c library, we need to compile this from source: - -```bash -mkdir -p $HOME/Downloads/crc32c && cd $HOME/Downloads/crc32c -curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -S . -B cmake-out && \ - cmake --build cmake-out -- -j ${NCPU:-4} && \ -sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ -sudo ldconfig -``` - #### nlohmann_json library The project depends on the nlohmann_json library. We use CMake to install it as @@ -947,12 +889,12 @@ export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgcon #### abseil mkdir -p $HOME/Downloads/abseil-cpp && cd $HOME/Downloads/abseil-cpp curl -fsSL -https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ +-DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ --DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ cmake --build cmake-out -- -j ${NCPU:-4} && \ @@ -1022,19 +964,14 @@ sudo apt-get --no-install-recommends install -y apt-transport-https apt-utils \ #### Abseil -Debian 11 ships with Abseil==20200923.3. Unfortunately, the current gRPC version -needs Abseil >= 20210324. Enabling `ABSL_PROPAGATE_CXX_STD` propagates the -version of C++ used to compile Abseil to anything that depends on Abseil. - ```bash mkdir -p $HOME/Downloads/abseil-cpp && cd $HOME/Downloads/abseil-cpp -curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ cmake --build cmake-out -- -j ${NCPU:-4} && \ @@ -1042,26 +979,6 @@ sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ sudo ldconfig ``` -#### crc32c - -The project depends on the Crc32c library, we need to compile this from source: - -```bash -mkdir -p $HOME/Downloads/crc32c && cd $HOME/Downloads/crc32c -curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -S . -B cmake-out && \ - cmake --build cmake-out -- -j ${NCPU:-4} && \ -sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ -sudo ldconfig -``` - #### nlohmann_json library Debian 11 also ships with nlohmann-json==3.9.1, which is recent enough for our @@ -1238,20 +1155,14 @@ export PATH=/usr/local/bin:${PATH} #### Abseil -Rocky Linux 9 includes a package for Abseil, unfortunately, this package is -incomplete, as it lacks the CMake support files for it. We need to compile -Abseiil from source. Enabling `ABSL_PROPAGATE_CXX_STD` propagates the version of -C++ used to compile Abseil to anything that depends on Abseil. - ```bash mkdir -p $HOME/Downloads/abseil-cpp && cd $HOME/Downloads/abseil-cpp -curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ cmake --build cmake-out -- -j ${NCPU:-4} && \ @@ -1329,26 +1240,6 @@ sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ sudo ldconfig ``` -#### crc32c - -The project depends on the Crc32c library, we need to compile this from source: - -```bash -mkdir -p $HOME/Downloads/crc32c && cd $HOME/Downloads/crc32c -curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -S . -B cmake-out && \ - cmake --build cmake-out -- -j ${NCPU:-4} && \ -sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ -sudo ldconfig -``` - #### nlohmann_json library The project depends on the nlohmann_json library. We use CMake to install it as diff --git a/google/cloud/storage/config-grpc.cmake.in b/google/cloud/storage/config-grpc.cmake.in index 4a205b397ec52..ed7cab8090484 100644 --- a/google/cloud/storage/config-grpc.cmake.in +++ b/google/cloud/storage/config-grpc.cmake.in @@ -18,6 +18,5 @@ find_dependency(google_cloud_cpp_googleapis) find_dependency(google_cloud_cpp_grpc_utils) find_dependency(google_cloud_cpp_opentelemetry) find_dependency(absl) -find_dependency(Crc32c) include("${CMAKE_CURRENT_LIST_DIR}/storage_grpc-targets.cmake")