Skip to content

Commit 6dfebdb

Browse files
HADOOP-19065. Update Protocol Buffers installation to 3.21.12 (#6526)
Instructions and docker script for installing protobuf updated from 3.7.1 to 3.21.12 Contributed by huangzhaobo
1 parent d1daf26 commit 6dfebdb

7 files changed

+24
-24
lines changed

BUILDING.txt

+14-15
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Requirements:
77
* JDK 1.8
88
* Maven 3.3 or later
99
* Boost 1.72 (if compiling native code)
10-
* Protocol Buffers 3.7.1 (if compiling native code)
10+
* Protocol Buffers 3.21.12 (if compiling native code)
1111
* CMake 3.19 or newer (if compiling native code)
1212
* Zlib devel (if compiling native code)
1313
* Cyrus SASL devel (if compiling native code)
@@ -74,10 +74,10 @@ Refer to dev-support/docker/Dockerfile):
7474
$ ./bootstrap
7575
$ make -j$(nproc)
7676
$ sudo make install
77-
* Protocol Buffers 3.7.1 (required to build native code)
78-
$ curl -L -s -S https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protobuf-java-3.7.1.tar.gz -o protobuf-3.7.1.tar.gz
79-
$ mkdir protobuf-3.7-src
80-
$ tar xzf protobuf-3.7.1.tar.gz --strip-components 1 -C protobuf-3.7-src && cd protobuf-3.7-src
77+
* Protocol Buffers 3.21.12 (required to build native code)
78+
$ curl -L https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.21.12.tar.gz > protobuf-3.21.12.tar.gz
79+
$ tar -zxvf protobuf-3.21.12.tar.gz && cd protobuf-3.21.12
80+
$ ./autogen.sh
8181
$ ./configure
8282
$ make -j$(nproc)
8383
$ sudo make install
@@ -433,10 +433,10 @@ Installing required dependencies for clean install of macOS 10.14:
433433
* Install native libraries, only openssl is required to compile native code,
434434
you may optionally install zlib, lz4, etc.
435435
$ brew install openssl
436-
* Protocol Buffers 3.7.1 (required to compile native code)
437-
$ wget https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protobuf-java-3.7.1.tar.gz
438-
$ mkdir -p protobuf-3.7 && tar zxvf protobuf-java-3.7.1.tar.gz --strip-components 1 -C protobuf-3.7
439-
$ cd protobuf-3.7
436+
* Protocol Buffers 3.21.12 (required to compile native code)
437+
$ curl -L https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.21.12.tar.gz > protobuf-3.21.12.tar.gz
438+
$ tar -zxvf protobuf-3.21.12.tar.gz && cd protobuf-3.21.12
439+
$ ./autogen.sh
440440
$ ./configure
441441
$ make
442442
$ make check
@@ -472,11 +472,10 @@ Building on CentOS 8
472472
* Install python2 for building documentation.
473473
$ sudo dnf install python2
474474

475-
* Install Protocol Buffers v3.7.1.
476-
$ git clone https://github.com/protocolbuffers/protobuf
477-
$ cd protobuf
478-
$ git checkout v3.7.1
479-
$ autoreconf -i
475+
* Install Protocol Buffers v3.21.12.
476+
$ curl -L https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.21.12.tar.gz > protobuf-3.21.12.tar.gz
477+
$ tar -zxvf protobuf-3.21.12.tar.gz && cd protobuf-3.21.12
478+
$ ./autogen.sh
480479
$ ./configure --prefix=/usr/local
481480
$ make
482481
$ sudo make install
@@ -531,7 +530,7 @@ Requirements:
531530
* JDK 1.8
532531
* Maven 3.0 or later (maven.apache.org)
533532
* Boost 1.72 (boost.org)
534-
* Protocol Buffers 3.7.1 (https://github.com/protocolbuffers/protobuf/releases)
533+
* Protocol Buffers 3.21.12 (https://github.com/protocolbuffers/protobuf/tags)
535534
* CMake 3.19 or newer (cmake.org)
536535
* Visual Studio 2019 (visualstudio.com)
537536
* Windows SDK 8.1 (optional, if building CPU rate control for the container executor. Get this from

dev-support/docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
6666
ENV SPOTBUGS_HOME /opt/spotbugs
6767

6868
#######
69-
# Set env vars for Google Protobuf 3.7.1
69+
# Set env vars for Google Protobuf 3.21.12
7070
#######
7171
ENV PROTOBUF_HOME /opt/protobuf
7272
ENV PATH "${PATH}:/opt/protobuf/bin"

dev-support/docker/Dockerfile_aarch64

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-arm64
6666
ENV SPOTBUGS_HOME /opt/spotbugs
6767

6868
#######
69-
# Set env vars for Google Protobuf 3.7.1
69+
# Set env vars for Google Protobuf 3.21.12
7070
#######
7171
ENV PROTOBUF_HOME /opt/protobuf
7272
ENV PATH "${PATH}:/opt/protobuf/bin"

dev-support/docker/Dockerfile_centos_7

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ ENV JAVA_HOME /usr/lib/jvm/java-1.8.0
7676
ENV SPOTBUGS_HOME /opt/spotbugs
7777

7878
#######
79-
# Set env vars for Google Protobuf
79+
# Set env vars for Google Protobuf 3.21.12
8080
#######
8181
ENV PROTOBUF_HOME /opt/protobuf
8282
ENV PATH "${PATH}:/opt/protobuf/bin"

dev-support/docker/Dockerfile_centos_8

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ ENV JAVA_HOME /usr/lib/jvm/java-1.8.0
101101
ENV SPOTBUGS_HOME /opt/spotbugs
102102

103103
#######
104-
# Set env vars for Google Protobuf
104+
# Set env vars for Google Protobuf 3.21.12
105105
#######
106106
ENV PROTOBUF_HOME /opt/protobuf
107107
ENV PATH "${PATH}:/opt/protobuf/bin"

dev-support/docker/Dockerfile_debian_10

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
6666
ENV SPOTBUGS_HOME /opt/spotbugs
6767

6868
#######
69-
# Set env vars for Google Protobuf 3.7.1
69+
# Set env vars for Google Protobuf 3.21.12
7070
#######
7171
ENV PROTOBUF_HOME /opt/protobuf
7272
ENV PATH "${PATH}:/opt/protobuf/bin"

dev-support/docker/pkg-resolver/install-protobuf.sh

+5-4
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,26 @@ if [ $? -eq 1 ]; then
2727
exit 1
2828
fi
2929

30-
default_version="3.7.1"
30+
default_version="3.21.12"
3131
version_to_install=$default_version
3232
if [ -n "$2" ]; then
3333
version_to_install="$2"
3434
fi
3535

36-
if [ "$version_to_install" != "3.7.1" ]; then
36+
if [ "$version_to_install" != "3.21.12" ]; then
3737
echo "WARN: Don't know how to install version $version_to_install, installing the default version $default_version instead"
3838
version_to_install=$default_version
3939
fi
4040

41-
if [ "$version_to_install" == "3.7.1" ]; then
41+
if [ "$version_to_install" == "3.21.12" ]; then
4242
# hadolint ignore=DL3003
4343
mkdir -p /opt/protobuf-src &&
4444
curl -L -s -S \
45-
https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protobuf-java-3.7.1.tar.gz \
45+
https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.21.12.tar.gz \
4646
-o /opt/protobuf.tar.gz &&
4747
tar xzf /opt/protobuf.tar.gz --strip-components 1 -C /opt/protobuf-src &&
4848
cd /opt/protobuf-src &&
49+
./autogen.sh &&
4950
./configure --prefix=/opt/protobuf &&
5051
make "-j$(nproc)" &&
5152
make install &&

0 commit comments

Comments
 (0)