Skip to content

fixed protoc-plugin build failure #1483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion net/grpc/gateway/docker/prereqs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
FROM buildpack-deps:bullseye AS prepare

ARG BUILDIFIER_VERSION=1.0.0
ARG PROTOBUF_VERSION=3.19.4
ARG PROTOBUF_VERSION=27.1

RUN apt-get -qq update && apt-get -qq install -y curl unzip

Expand All @@ -45,6 +45,8 @@ RUN git clone https://github.com/grpc/grpc-web .
COPY ./scripts/init_submodules.sh ./scripts/
RUN ./scripts/init_submodules.sh

# Add this to ensure abseil-cpp is available
RUN git clone --depth 1 https://github.com/abseil/abseil-cpp.git third_party/abseil-cpp

######################################
# Stage 2: Copy source files and build
Expand Down
38 changes: 21 additions & 17 deletions net/grpc/gateway/docker/protoc_plugin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,28 @@ FROM grpcweb/prereqs
ARG MAKEFLAGS=-j8

RUN apt-get -qq update && apt-get -qq install -y \
autoconf \
automake \
build-essential \
curl \
git \
libtool \
libssl-dev \
make \
zip
cmake ninja-build \
pkg-config \
zlib1g-dev && \
rm -rf /var/lib/apt/lists/*

WORKDIR /github/grpc-web

RUN cd ./third_party/protobuf && \
./autogen.sh && \
./configure && \
make && \
make install && \
ldconfig
# Copy full source (including third_party)
COPY . /github/grpc-web

RUN cd ./javascript/net/grpc/web/generator && \
make protoc-gen-grpc-web
RUN rm -rf /usr/local/include/absl /usr/local/lib/libabsl*

WORKDIR /github/grpc-web/third_party/abseil-cpp
RUN cmake -S . -B cmake/build \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_BUILD_TYPE=Release && \
cmake --build cmake/build --target install

WORKDIR /github/grpc-web/third_party/protobuf
RUN cmake -S . -B cmake/build \
-DCMAKE_BUILD_TYPE=Release \
-Dprotobuf_BUILD_TESTS=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_CXX_STANDARD=17 && \
cmake --build cmake/build --target install
2 changes: 1 addition & 1 deletion scripts/init_submodules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ set -ex

cd "$(dirname "$0")"/..
git submodule --quiet update --init --recursive
(cd third_party/protobuf && git checkout tags/v3.15.6)
(cd third_party/protobuf && git checkout tags/v27.1)