diff --git a/ci/cloudbuild/builds/demo-install.sh b/ci/cloudbuild/builds/demo-install.sh index bb8870d82a919..4f9ccd0343eae 100755 --- a/ci/cloudbuild/builds/demo-install.sh +++ b/ci/cloudbuild/builds/demo-install.sh @@ -47,7 +47,7 @@ fi PREFIX="${HOME}/google-cloud-cpp-installed" cmake -S . -B cmake-out \ "${cmake_config_testing_details[@]}" \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ diff --git a/ci/cloudbuild/builds/grpc-at-head.sh b/ci/cloudbuild/builds/grpc-at-head.sh index d9318cd45c389..1082a188d63ba 100755 --- a/ci/cloudbuild/builds/grpc-at-head.sh +++ b/ci/cloudbuild/builds/grpc-at-head.sh @@ -20,10 +20,11 @@ source "$(dirname "$0")/../../lib/init.sh" source module ci/cloudbuild/builds/lib/bazel.sh source module ci/cloudbuild/builds/lib/cloudcxxrc.sh source module ci/cloudbuild/builds/lib/integration.sh +source module ci/etc/quickstart-config.sh rm -fr /h/grpc && git -C /h clone -q --depth 1 https://github.com/grpc/grpc.git rm -fr /h/protobuf && mkdir -p /h/protobuf && - curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v25.0.tar.gz | + curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v31.1.tar.gz | tar -C /h/protobuf -xzf - --strip-components=1 mapfile -t args < <(bazel::common_args) @@ -35,3 +36,9 @@ bazel test "${args[@]}" --test_tag_filters=-integration-test "${BAZEL_TARGETS[@] mapfile -t integration_args < <(integration::bazel_args) integration::bazel_with_emulators test "${args[@]}" "${integration_args[@]}" + +for lib in $(quickstart::libraries); do + io::log_h2 "Building Bazel quickstart for ${lib} using MODULE" + USE_BAZEL_VERSION=8.5.1 io::run env -C "${PROJECT_ROOT}/google/cloud/${lib}/quickstart" \ + bazel build --noenable_workspace --enable_bzlmod "${args[@]}" :quickstart +done diff --git a/ci/cloudbuild/builds/lib/quickstart.sh b/ci/cloudbuild/builds/lib/quickstart.sh index a8f287157e386..274b9e1cdc685 100644 --- a/ci/cloudbuild/builds/lib/quickstart.sh +++ b/ci/cloudbuild/builds/lib/quickstart.sh @@ -38,7 +38,7 @@ function cleanup() { io::log_h2 "cleanup on EXIT with exit_status=${exit_status}" if ((exit_status != 0)); then io::run find . -name 'core' - gdb --exec="${quickstart_program}" --core=./core --eval-command="bt full" + io::run gdb --exec="${quickstart_program}" --core=./core --eval-command="thread apply all bt" fi } diff --git a/ci/cloudbuild/dockerfiles/demo-debian-bookworm.Dockerfile b/ci/cloudbuild/dockerfiles/demo-debian-bookworm.Dockerfile index cc397b4dca53e..74c5752c79754 100644 --- a/ci/cloudbuild/dockerfiles/demo-debian-bookworm.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-debian-bookworm.Dockerfile @@ -23,7 +23,7 @@ ARG NCPU=4 RUN apt-get update && \ apt-get --no-install-recommends install -y apt-transport-https apt-utils \ automake build-essential ca-certificates cmake curl git \ - gcc g++ m4 make ninja-build pkg-config tar wget zlib1g-dev + gcc g++ m4 make ninja-build pkg-config tar wget zlib1g-dev libc6-dbg # ``` # Install the development packages for direct `google-cloud-cpp` dependencies: @@ -62,7 +62,7 @@ WORKDIR /var/tmp/build/abseil-cpp 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_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ -DBUILD_SHARED_LIBS=yes \ @@ -79,7 +79,7 @@ WORKDIR /var/tmp/build/protobuf RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -Dprotobuf_BUILD_TESTS=OFF \ @@ -97,7 +97,7 @@ WORKDIR /var/tmp/build/opentelemetry-cpp RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ @@ -117,7 +117,7 @@ WORKDIR /var/tmp/build/c-ares RUN curl -fsSL https://github.com/c-ares/c-ares/archive/refs/tags/cares-1_17_1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ cmake --build cmake-out --target install && \ @@ -130,7 +130,7 @@ RUN curl -fsSL https://github.com/c-ares/c-ares/archive/refs/tags/cares-1_17_1.t WORKDIR /var/tmp/build/re2 RUN curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \ tar -xzf - --strip-components=1 && \ - cmake -DCMAKE_BUILD_TYPE=Release \ + cmake -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_SHARED_LIBS=ON \ -DRE2_BUILD_TESTING=OFF \ -S . -B cmake-out && \ @@ -145,7 +145,7 @@ WORKDIR /var/tmp/build/grpc RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DgRPC_INSTALL=ON \ diff --git a/ci/cloudbuild/dockerfiles/demo-debian-bullseye.Dockerfile b/ci/cloudbuild/dockerfiles/demo-debian-bullseye.Dockerfile index af638951d5552..d1b311d689a8a 100644 --- a/ci/cloudbuild/dockerfiles/demo-debian-bullseye.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-debian-bullseye.Dockerfile @@ -24,7 +24,7 @@ RUN apt-get update && \ apt-get --no-install-recommends install -y apt-transport-https apt-utils \ automake build-essential ca-certificates curl git \ gcc g++ libc-ares-dev libc-ares2 libcurl4-openssl-dev \ - libssl-dev m4 make ninja-build pkg-config tar wget zlib1g-dev + libssl-dev m4 make ninja-build pkg-config tar wget zlib1g-dev libc6-dbg # ``` # #### Install CMake v3.22 @@ -40,7 +40,7 @@ WORKDIR /var/tmp/build/abseil-cpp 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_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ -DBUILD_SHARED_LIBS=yes \ @@ -71,7 +71,7 @@ WORKDIR /var/tmp/build/protobuf RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -Dprotobuf_BUILD_TESTS=OFF \ @@ -91,7 +91,7 @@ RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz WORKDIR /var/tmp/build/re2 RUN curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \ tar -xzf - --strip-components=1 && \ - cmake -DCMAKE_BUILD_TYPE=Release \ + cmake -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_SHARED_LIBS=ON \ -DRE2_BUILD_TESTING=OFF \ -S . -B cmake-out && \ @@ -107,7 +107,7 @@ WORKDIR /var/tmp/build/grpc RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DgRPC_INSTALL=ON \ @@ -130,7 +130,7 @@ WORKDIR /var/tmp/build/opentelemetry-cpp RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ diff --git a/ci/cloudbuild/dockerfiles/demo-fedora.Dockerfile b/ci/cloudbuild/dockerfiles/demo-fedora.Dockerfile index 196c9a0e14126..302e5b7bf392a 100644 --- a/ci/cloudbuild/dockerfiles/demo-fedora.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-fedora.Dockerfile @@ -22,7 +22,8 @@ ARG NCPU=4 # ```bash RUN dnf makecache && \ dnf install -y cmake curl findutils gcc-c++ git make ninja-build \ - patch unzip tar wget zip + patch unzip tar wget zip dnf-utils +RUN dnf makecache && dnf debuginfo-install -y glibc # ``` # Fedora:40 includes packages, with recent enough versions, for most of the diff --git a/ci/cloudbuild/dockerfiles/demo-rockylinux-9.Dockerfile b/ci/cloudbuild/dockerfiles/demo-rockylinux-9.Dockerfile index a2ddb2fa8961c..7b795b7d4a574 100644 --- a/ci/cloudbuild/dockerfiles/demo-rockylinux-9.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-rockylinux-9.Dockerfile @@ -27,7 +27,9 @@ RUN dnf makecache && \ dnf makecache && \ dnf install -y cmake findutils gcc-c++ git make openssl-devel \ patch zlib-devel libcurl-devel c-ares-devel tar wget which \ - autoconf automake libtool binutils + autoconf automake libtool binutils dnf-utils +RUN dnf makecache && dnf debuginfo-install -y glibc + # ``` # Set some useful environment variables. @@ -73,7 +75,7 @@ WORKDIR /var/tmp/build/abseil-cpp 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_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ -DBUILD_SHARED_LIBS=yes \ @@ -94,7 +96,7 @@ WORKDIR /var/tmp/build/protobuf RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -Dprotobuf_BUILD_TESTS=OFF \ @@ -115,7 +117,7 @@ RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz WORKDIR /var/tmp/build/re2 RUN curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \ tar -xzf - --strip-components=1 && \ - cmake -DCMAKE_BUILD_TYPE=Release \ + cmake -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_SHARED_LIBS=ON \ -DRE2_BUILD_TESTING=OFF \ -S . -B cmake-out && \ @@ -137,7 +139,7 @@ RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_CXX_STANDARD=17 \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_SHARED_LIBS=yes \ -DgRPC_INSTALL=ON \ -DgRPC_BUILD_TESTS=OFF \ @@ -165,7 +167,7 @@ WORKDIR /var/tmp/build/json RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_SHARED_LIBS=yes \ -DBUILD_TESTING=OFF \ -DJSON_BuildTests=OFF \ @@ -181,8 +183,8 @@ WORKDIR /var/tmp/build/opentelemetry-cpp RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_CXX_STANDARD=17 \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ -DWITH_STL=CXX17 \ diff --git a/ci/cloudbuild/dockerfiles/demo-ubuntu-24.04.Dockerfile b/ci/cloudbuild/dockerfiles/demo-ubuntu-24.04.Dockerfile index 5de8cd219e19c..4a60238f3f675 100644 --- a/ci/cloudbuild/dockerfiles/demo-ubuntu-24.04.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-ubuntu-24.04.Dockerfile @@ -23,7 +23,7 @@ ARG NCPU=4 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ apt-get --no-install-recommends install -y apt-transport-https apt-utils \ - cmake ca-certificates curl git gcc g++ m4 make tar + cmake ca-certificates curl git gcc g++ m4 make tar libc6-dbg # ``` # Ubuntu:24 includes packages for most of the direct dependencies of @@ -66,7 +66,7 @@ WORKDIR /var/tmp/build/abseil-cpp 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_BUILD_TYPE=Debug \ -DABSL_BUILD_TESTING=OFF \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ @@ -81,7 +81,7 @@ WORKDIR /var/tmp/build/protobuf RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -Dprotobuf_BUILD_TESTS=OFF \ @@ -98,7 +98,7 @@ WORKDIR /var/tmp/build/opentelemetry-cpp RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ -DWITH_STL=CXX17 \ @@ -117,7 +117,7 @@ WORKDIR /var/tmp/build/c-ares RUN curl -fsSL https://github.com/c-ares/c-ares/archive/refs/tags/cares-1_17_1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ cmake --build cmake-out --target install && \ @@ -130,7 +130,7 @@ RUN curl -fsSL https://github.com/c-ares/c-ares/archive/refs/tags/cares-1_17_1.t WORKDIR /var/tmp/build/re2 RUN curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \ tar -xzf - --strip-components=1 && \ - cmake -DCMAKE_BUILD_TYPE=Release \ + cmake -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_SHARED_LIBS=ON \ -DRE2_BUILD_TESTING=OFF \ -S . -B cmake-out && \ @@ -145,7 +145,7 @@ WORKDIR /var/tmp/build/grpc RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=ON \ -DgRPC_INSTALL=ON \ diff --git a/ci/cloudbuild/dockerfiles/demo-ubuntu-jammy.Dockerfile b/ci/cloudbuild/dockerfiles/demo-ubuntu-jammy.Dockerfile index 289c65b38c2bd..5716b5500acad 100644 --- a/ci/cloudbuild/dockerfiles/demo-ubuntu-jammy.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-ubuntu-jammy.Dockerfile @@ -25,7 +25,7 @@ RUN apt-get update && \ apt-get --no-install-recommends install -y apt-transport-https apt-utils \ automake build-essential cmake ca-certificates curl git \ gcc g++ libc-ares-dev libc-ares2 libcurl4-openssl-dev libre2-dev \ - libssl-dev m4 make pkg-config tar wget zlib1g-dev + libssl-dev m4 make pkg-config tar wget zlib1g-dev libc6-dbg # ``` # #### Abseil @@ -35,7 +35,7 @@ WORKDIR /var/tmp/build/abseil-cpp 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_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ -DBUILD_SHARED_LIBS=yes \ @@ -55,7 +55,7 @@ WORKDIR /var/tmp/build/protobuf RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -Dprotobuf_BUILD_TESTS=OFF \ @@ -76,7 +76,7 @@ WORKDIR /var/tmp/build/grpc RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DgRPC_INSTALL=ON \ @@ -105,7 +105,7 @@ WORKDIR /var/tmp/build/json RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_SHARED_LIBS=yes \ -DBUILD_TESTING=OFF \ -DJSON_BuildTests=OFF \ @@ -121,7 +121,7 @@ WORKDIR /var/tmp/build/opentelemetry-cpp RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ diff --git a/doc/packaging.md b/doc/packaging.md index d4d6b22d4e012..4bbfb82114fe9 100644 --- a/doc/packaging.md +++ b/doc/packaging.md @@ -212,7 +212,7 @@ We can now compile and install `google-cloud-cpp`: # Pick a location to install the artifacts, e.g., `/usr/local` or `/opt` PREFIX="${HOME}/google-cloud-cpp-installed" cmake -S . -B cmake-out \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ @@ -235,7 +235,8 @@ Install the minimal development tools: ```bash sudo dnf makecache && \ sudo dnf install -y cmake curl findutils gcc-c++ git make ninja-build \ - patch unzip tar wget zip + patch unzip tar wget zip dnf-utils +sudo dnf makecache && sudo dnf debuginfo-install -y glibc ``` Fedora:40 includes packages, with recent enough versions, for most of the direct @@ -303,7 +304,7 @@ We can now compile and install `google-cloud-cpp`: # Pick a location to install the artifacts, e.g., `/usr/local` or `/opt` PREFIX="${HOME}/google-cloud-cpp-installed" cmake -S . -B cmake-out \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ @@ -387,7 +388,7 @@ We can now compile and install `google-cloud-cpp`: # Pick a location to install the artifacts, e.g., `/usr/local` or `/opt` PREFIX="${HOME}/google-cloud-cpp-installed" cmake -S . -B cmake-out \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ @@ -411,7 +412,7 @@ Install the minimal development tools, libcurl, OpenSSL and libc-ares: export DEBIAN_FRONTEND=noninteractive sudo apt-get update && \ sudo apt-get --no-install-recommends install -y apt-transport-https apt-utils \ - cmake ca-certificates curl git gcc g++ m4 make tar + cmake ca-certificates curl git gcc g++ m4 make tar libc6-dbg ``` Ubuntu:24 includes packages for most of the direct dependencies of @@ -454,7 +455,7 @@ mkdir -p $HOME/Downloads/abseil-cpp && cd $HOME/Downloads/abseil-cpp curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DABSL_BUILD_TESTING=OFF \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ @@ -469,7 +470,7 @@ mkdir -p $HOME/Downloads/protobuf && cd $HOME/Downloads/protobuf curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -Dprotobuf_BUILD_TESTS=OFF \ @@ -486,7 +487,7 @@ mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-c curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ -DWITH_STL=CXX17 \ @@ -505,7 +506,7 @@ mkdir -p $HOME/Downloads/c-ares && cd $HOME/Downloads/c-ares curl -fsSL https://github.com/c-ares/c-ares/archive/refs/tags/cares-1_17_1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ sudo cmake --build cmake-out --target install && \ @@ -518,7 +519,7 @@ sudo ldconfig mkdir -p $HOME/Downloads/re2 && cd $HOME/Downloads/re2 curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \ tar -xzf - --strip-components=1 && \ - cmake -DCMAKE_BUILD_TYPE=Release \ + cmake -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_SHARED_LIBS=ON \ -DRE2_BUILD_TESTING=OFF \ -S . -B cmake-out && \ @@ -533,7 +534,7 @@ mkdir -p $HOME/Downloads/grpc && cd $HOME/Downloads/grpc curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=ON \ -DgRPC_INSTALL=ON \ @@ -559,7 +560,7 @@ We can now compile and install `google-cloud-cpp`: # Pick a location to install the artifacts, e.g., `/usr/local` or `/opt` PREFIX="${HOME}/google-cloud-cpp-installed" cmake -S . -B cmake-out \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ @@ -585,7 +586,7 @@ sudo apt-get update && \ sudo apt-get --no-install-recommends install -y apt-transport-https apt-utils \ automake build-essential cmake ca-certificates curl git \ gcc g++ libc-ares-dev libc-ares2 libcurl4-openssl-dev libre2-dev \ - libssl-dev m4 make pkg-config tar wget zlib1g-dev + libssl-dev m4 make pkg-config tar wget zlib1g-dev libc6-dbg ``` #### Abseil @@ -595,7 +596,7 @@ mkdir -p $HOME/Downloads/abseil-cpp && cd $HOME/Downloads/abseil-cpp curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ -DBUILD_SHARED_LIBS=yes \ @@ -615,7 +616,7 @@ mkdir -p $HOME/Downloads/protobuf && cd $HOME/Downloads/protobuf curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -Dprotobuf_BUILD_TESTS=OFF \ @@ -636,7 +637,7 @@ mkdir -p $HOME/Downloads/grpc && cd $HOME/Downloads/grpc curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DgRPC_INSTALL=ON \ @@ -665,7 +666,7 @@ mkdir -p $HOME/Downloads/json && cd $HOME/Downloads/json curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_SHARED_LIBS=yes \ -DBUILD_TESTING=OFF \ -DJSON_BuildTests=OFF \ @@ -681,7 +682,7 @@ mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-c curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ @@ -702,7 +703,7 @@ We can now compile and install `google-cloud-cpp`: # Pick a location to install the artifacts, e.g., `/usr/local` or `/opt` PREFIX="${HOME}/google-cloud-cpp-installed" cmake -S . -B cmake-out \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ @@ -726,7 +727,7 @@ Install the minimal development tools. sudo apt-get update && \ sudo apt-get --no-install-recommends install -y apt-transport-https apt-utils \ automake build-essential ca-certificates cmake curl git \ - gcc g++ m4 make ninja-build pkg-config tar wget zlib1g-dev + gcc g++ m4 make ninja-build pkg-config tar wget zlib1g-dev libc6-dbg ``` Install the development packages for direct `google-cloud-cpp` dependencies: @@ -765,7 +766,7 @@ mkdir -p $HOME/Downloads/abseil-cpp && cd $HOME/Downloads/abseil-cpp curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ -DBUILD_SHARED_LIBS=yes \ @@ -782,7 +783,7 @@ mkdir -p $HOME/Downloads/protobuf && cd $HOME/Downloads/protobuf curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -Dprotobuf_BUILD_TESTS=OFF \ @@ -800,7 +801,7 @@ mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-c curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ @@ -820,7 +821,7 @@ mkdir -p $HOME/Downloads/c-ares && cd $HOME/Downloads/c-ares curl -fsSL https://github.com/c-ares/c-ares/archive/refs/tags/cares-1_17_1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ sudo cmake --build cmake-out --target install && \ @@ -833,7 +834,7 @@ sudo ldconfig mkdir -p $HOME/Downloads/re2 && cd $HOME/Downloads/re2 curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \ tar -xzf - --strip-components=1 && \ - cmake -DCMAKE_BUILD_TYPE=Release \ + cmake -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_SHARED_LIBS=ON \ -DRE2_BUILD_TESTING=OFF \ -S . -B cmake-out && \ @@ -848,7 +849,7 @@ mkdir -p $HOME/Downloads/grpc && cd $HOME/Downloads/grpc curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DgRPC_INSTALL=ON \ @@ -873,7 +874,7 @@ We can now compile and install `google-cloud-cpp`: # Pick a location to install the artifacts, e.g., `/usr/local` or `/opt` PREFIX="${HOME}/google-cloud-cpp-installed" cmake -S . -B cmake-out \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ @@ -898,7 +899,7 @@ sudo apt-get update && \ sudo apt-get --no-install-recommends install -y apt-transport-https apt-utils \ automake build-essential ca-certificates curl git \ gcc g++ libc-ares-dev libc-ares2 libcurl4-openssl-dev \ - libssl-dev m4 make ninja-build pkg-config tar wget zlib1g-dev + libssl-dev m4 make ninja-build pkg-config tar wget zlib1g-dev libc6-dbg ``` #### Install CMake v3.22 @@ -915,7 +916,7 @@ mkdir -p $HOME/Downloads/abseil-cpp && cd $HOME/Downloads/abseil-cpp curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ -DBUILD_SHARED_LIBS=yes \ @@ -947,7 +948,7 @@ mkdir -p $HOME/Downloads/protobuf && cd $HOME/Downloads/protobuf curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -Dprotobuf_BUILD_TESTS=OFF \ @@ -967,7 +968,7 @@ planning to use pkg-config. mkdir -p $HOME/Downloads/re2 && cd $HOME/Downloads/re2 curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \ tar -xzf - --strip-components=1 && \ - cmake -DCMAKE_BUILD_TYPE=Release \ + cmake -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_SHARED_LIBS=ON \ -DRE2_BUILD_TESTING=OFF \ -S . -B cmake-out && \ @@ -983,7 +984,7 @@ mkdir -p $HOME/Downloads/grpc && cd $HOME/Downloads/grpc curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DgRPC_INSTALL=ON \ @@ -1006,7 +1007,7 @@ mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-c curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ @@ -1027,7 +1028,7 @@ We can now compile and install `google-cloud-cpp`: # Pick a location to install the artifacts, e.g., `/usr/local` or `/opt` PREFIX="${HOME}/google-cloud-cpp-installed" cmake -S . -B cmake-out \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ @@ -1055,7 +1056,9 @@ sudo dnf install -y epel-release && \ sudo dnf makecache && \ sudo dnf install -y cmake findutils gcc-c++ git make openssl-devel \ patch zlib-devel libcurl-devel c-ares-devel tar wget which \ - autoconf automake libtool binutils + autoconf automake libtool binutils dnf-utils +sudo dnf makecache && sudo dnf debuginfo-install -y glibc + ``` Set some useful environment variables. @@ -1101,7 +1104,7 @@ mkdir -p $HOME/Downloads/abseil-cpp && cd $HOME/Downloads/abseil-cpp curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ -DBUILD_SHARED_LIBS=yes \ @@ -1122,7 +1125,7 @@ mkdir -p $HOME/Downloads/protobuf && cd $HOME/Downloads/protobuf curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -Dprotobuf_BUILD_TESTS=OFF \ @@ -1143,7 +1146,7 @@ planning to use pkg-config. mkdir -p $HOME/Downloads/re2 && cd $HOME/Downloads/re2 curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \ tar -xzf - --strip-components=1 && \ - cmake -DCMAKE_BUILD_TYPE=Release \ + cmake -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_SHARED_LIBS=ON \ -DRE2_BUILD_TESTING=OFF \ -S . -B cmake-out && \ @@ -1165,7 +1168,7 @@ curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_CXX_STANDARD=17 \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_SHARED_LIBS=yes \ -DgRPC_INSTALL=ON \ -DgRPC_BUILD_TESTS=OFF \ @@ -1193,7 +1196,7 @@ mkdir -p $HOME/Downloads/json && cd $HOME/Downloads/json curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_SHARED_LIBS=yes \ -DBUILD_TESTING=OFF \ -DJSON_BuildTests=OFF \ @@ -1209,8 +1212,8 @@ mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-c curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_CXX_STANDARD=17 \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ -DWITH_STL=CXX17 \ @@ -1230,7 +1233,7 @@ We can now compile and install `google-cloud-cpp`: # Pick a location to install the artifacts, e.g., `/usr/local` or `/opt` PREFIX="${HOME}/google-cloud-cpp-installed" cmake -S . -B cmake-out \ - -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \