Skip to content

Commit d5d2213

Browse files
committed
use gcc8 to build otel in opensuse-leap
1 parent baa0cbc commit d5d2213

File tree

1 file changed

+121
-10
lines changed

1 file changed

+121
-10
lines changed

ci/cloudbuild/dockerfiles/demo-opensuse-leap.Dockerfile

Lines changed: 121 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,42 @@ ARG NCPU=4
2727
# ```bash
2828
RUN zypper refresh && \
2929
zypper install --allow-downgrade -y automake cmake curl \
30-
gcc gcc-c++ gcc8 gcc8-c++ git gzip libtool make patch tar wget
30+
gcc8 gcc8-c++ git gzip libtool make patch tar wget
3131
# ```
3232

33+
RUN zypper refresh && \
34+
zypper install --allow-downgrade -y gdb
35+
36+
#RUN zypper refresh && \
37+
# zypper install --allow-downgrade -y krb5-debuginfo-1.20.1-150600.11.14.1.x86_64 \
38+
# libabsl2401_0_0-debuginfo-20240116.3-150600.19.3.15.x86_64 \
39+
# libbrotlidec1-debuginfo-1.0.7-150200.3.5.1.x86_64 \
40+
# libcares2-debuginfo-1.19.1-150000.3.26.1.x86_64 \
41+
# libcom_err2-debuginfo-1.47.0-150600.4.6.2.x86_64 \
42+
# libcrc32c1-debuginfo-1.1.2-150400.9.3.1.x86_64 \
43+
# libcurl4-debuginfo-8.14.1-150600.4.31.1.x86_64 \
44+
# libgcc_s1-debuginfo-15.2.0+git10201-150000.1.3.3.x86_64 \
45+
# libgrpc++1_60-debuginfo-1.60.0-150600.15.3.1.x86_64 \
46+
# libgrpc37-debuginfo-1.60.0-150600.15.3.1.x86_64 \
47+
# libidn2-0-debuginfo-2.2.0-3.6.1.x86_64 \
48+
# libjitterentropy3-debuginfo-3.4.1-150000.1.12.1.x86_64 \
49+
# libkeyutils1-debuginfo-1.6.3-5.6.1.x86_64 \
50+
# libldap-2_4-2-debuginfo-2.4.46-150600.23.21.x86_64 \
51+
# libnghttp2-14-debuginfo-1.40.0-150600.23.2.x86_64 \
52+
# libopenssl3-debuginfo-3.1.4-150600.5.39.1.x86_64 libpcre2-8-0-debuginfo-10.42-150600.1.26.x86_64 libprotobuf25_1_0-debuginfo-25.1-150600.16.13.1.x86_64 libpsl5-debuginfo-0.20.1-150000.3.3.1.x86_64 libre2-11-debuginfo-20240201-150600.14.2.x86_64 libsasl2-3-debuginfo-2.1.28-150600.7.14.1.x86_64 libselinux1-debuginfo-3.5-150600.3.3.1.x86_64 libstdc++6-debuginfo-15.2.0+git10201-150000.1.3.3.x86_64 libunistring2-debuginfo-0.9.10-1.1.x86_64 libupb37-debuginfo-1.60.0-150600.15.3.1.x86_64 libz1-debuginfo-1.2.13-150500.4.3.1.x86_64 libzstd1-debuginfo-1.5.5-150600.1.3.x86_64
53+
3354
# Install some of the dependencies for `google-cloud-cpp`.
3455

3556
# ```bash
57+
#RUN zypper refresh && \
58+
# zypper install --allow-downgrade -y c-ares-devel \
59+
# libcurl-devel libopenssl-devel libcrc32c-devel nlohmann_json-devel
60+
# ```
61+
3662
RUN zypper refresh && \
3763
zypper install --allow-downgrade -y abseil-cpp-devel c-ares-devel \
3864
libcurl-devel libopenssl-devel libcrc32c-devel nlohmann_json-devel \
3965
grpc-devel libprotobuf-devel
40-
# ```
4166

4267
# The following steps will install libraries and tools in `/usr/local`. openSUSE
4368
# does not search for shared libraries in these directories by default. There
@@ -50,6 +75,100 @@ ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig
5075
ENV PATH=/usr/local/bin:${PATH}
5176
# ```
5277

78+
# Use the following environment variables to configure the compiler used by
79+
# CMake.
80+
81+
#ENV CC=gcc-8
82+
#ENV CXX=g++-8
83+
84+
# #### Abseil
85+
86+
# ```bash
87+
#WORKDIR /var/tmp/build/abseil-cpp
88+
#RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \
89+
# tar -xzf - --strip-components=1 && \
90+
# cmake \
91+
# -DCMAKE_BUILD_TYPE=Release \
92+
# -DCMAKE_CXX_STANDARD=17 \
93+
# -DABSL_BUILD_TESTING=OFF \
94+
# -DABSL_PROPAGATE_CXX_STD=ON \
95+
# -DBUILD_SHARED_LIBS=yes \
96+
# -S . -B cmake-out && \
97+
# cmake --build cmake-out -- -j ${NCPU:-4} && \
98+
# cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
99+
# ldconfig
100+
# ```
101+
102+
# #### Protobuf
103+
104+
# Unless you are only using the Google Cloud Storage library the project
105+
# needs Protobuf and gRPC. Unfortunately the version of Protobuf that ships
106+
# with Debian 11 is not recent enough to support the protos published by
107+
# Google Cloud. We need to build from source:
108+
109+
# ```bash
110+
#WORKDIR /var/tmp/build/protobuf
111+
#RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v31.1.tar.gz | \
112+
# tar -xzf - --strip-components=1 && \
113+
# cmake \
114+
# -DCMAKE_BUILD_TYPE=Release \
115+
# -DCMAKE_CXX_STANDARD=17 \
116+
# -DBUILD_SHARED_LIBS=yes \
117+
# -Dprotobuf_BUILD_TESTS=OFF \
118+
# -Dprotobuf_ABSL_PROVIDER=package \
119+
# -S . -B cmake-out && \
120+
# cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
121+
# ldconfig
122+
# ```
123+
124+
# #### RE2
125+
126+
# The version of RE2 included with this distro hard-codes C++11 in its
127+
# pkg-config file. You can skip this build and use the system's package if
128+
# you are not planning to use pkg-config.
129+
130+
# ```bash
131+
#WORKDIR /var/tmp/build/re2
132+
#RUN curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \
133+
# tar -xzf - --strip-components=1 && \
134+
# cmake -DCMAKE_BUILD_TYPE=Release \
135+
# -DCMAKE_CXX_STANDARD=17 \
136+
# -DBUILD_SHARED_LIBS=ON \
137+
# -DRE2_BUILD_TESTING=OFF \
138+
# -S . -B cmake-out && \
139+
# cmake --build cmake-out -- -j ${NCPU:-4} && \
140+
# cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
141+
# ldconfig
142+
# ```
143+
144+
# #### gRPC
145+
146+
# Finally, we build gRPC from source:
147+
148+
# ```bash
149+
#WORKDIR /var/tmp/build/grpc
150+
#RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.74.1.tar.gz | \
151+
# tar -xzf - --strip-components=1 && \
152+
# cmake \
153+
# -DCMAKE_BUILD_TYPE=Release \
154+
# -DCMAKE_CXX_STANDARD=17 \
155+
# -DBUILD_SHARED_LIBS=yes \
156+
# -DgRPC_INSTALL=ON \
157+
# -DgRPC_BUILD_TESTS=OFF \
158+
# -DgRPC_ABSL_PROVIDER=package \
159+
# -DgRPC_CARES_PROVIDER=package \
160+
# -DgRPC_PROTOBUF_PROVIDER=package \
161+
# -DgRPC_RE2_PROVIDER=package \
162+
# -DgRPC_SSL_PROVIDER=package \
163+
# -DgRPC_ZLIB_PROVIDER=package \
164+
# -S . -B cmake-out && \
165+
# cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
166+
# ldconfig
167+
# ```
168+
169+
ENV CC=gcc-8
170+
ENV CXX=g++-8
171+
53172
# #### opentelemetry-cpp
54173

55174
# The project has an **optional** dependency on the OpenTelemetry library.
@@ -67,7 +186,6 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24
67186
-DBUILD_SHARED_LIBS=yes \
68187
-DWITH_EXAMPLES=OFF \
69188
-DWITH_STL=CXX17 \
70-
-DWITH_ABSEIL=ON \
71189
-DBUILD_TESTING=OFF \
72190
-DOPENTELEMETRY_INSTALL=ON \
73191
-DOPENTELEMETRY_ABI_VERSION_NO=2 \
@@ -76,13 +194,6 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24
76194
ldconfig
77195
# ```
78196

79-
# Use the following environment variables to configure the compiler used by
80-
# CMake.
81-
82-
ENV CXX=g++-8
83-
84-
ENV CC=gcc-8
85-
86197
## [DONE packaging.md]
87198

88199
WORKDIR /var/tmp/sccache

0 commit comments

Comments
 (0)