protobuf-java: Fix build by building with Bazel (#8240)

* protobuf-java: Fix build by building with Bazel

* Fix typo

* Use bazel rather than bazelisk

* Install Bazel

* Install bazel

* Fix Java build
This commit is contained in:
Fabian Meumertzheim 2022-08-13 16:15:10 +02:00 committed by GitHub
parent d154d875ad
commit 34c7aa99a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 7 deletions

View File

@ -16,7 +16,7 @@
FROM gcr.io/oss-fuzz-base/base-builder-jvm
RUN apt-get update && apt-get install -y make autoconf automake libtool pkg-config
RUN curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.12.0/bazelisk-linux-amd64 -o /usr/bin/bazel && chmod +x /usr/bin/bazel
RUN curl -L https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.zip -o maven.zip && \
unzip maven.zip -d $SRC/maven && \

View File

@ -17,14 +17,11 @@
# Build protoc with default options.
unset CFLAGS CXXFLAGS
mkdir $SRC/protobuf-install/
cd $SRC/protobuf/
./autogen.sh
./configure --prefix=$SRC/protobuf-install
make -j$(nproc)
make install
bazel build :protoc
cp $SRC/protobuf/bazel-bin/protoc $SRC/protobuf/protoc
export PROTOC="$SRC/protobuf/bazel-bin/protoc"
export PROTOC="$SRC/protobuf-install/bin/protoc"
# Build protobuf-java (requires protoc in source tree).
cd $SRC/protobuf/java/