From 34c7aa99a3d061f1b4f008d5a06d679fcf38ed34 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Sat, 13 Aug 2022 16:15:10 +0200 Subject: [PATCH] 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 --- projects/protobuf-java/Dockerfile | 2 +- projects/protobuf-java/build.sh | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/projects/protobuf-java/Dockerfile b/projects/protobuf-java/Dockerfile index b14084f45..73537f853 100644 --- a/projects/protobuf-java/Dockerfile +++ b/projects/protobuf-java/Dockerfile @@ -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 && \ diff --git a/projects/protobuf-java/build.sh b/projects/protobuf-java/build.sh index e5f7363d9..571b3dc20 100755 --- a/projects/protobuf-java/build.sh +++ b/projects/protobuf-java/build.sh @@ -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/