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/