Skip to content

Commit 17d30f0

Browse files
committed
HADOOP-19605. Upgrade Protobuf 3.25.5 for docker images
1 parent c199c73 commit 17d30f0

File tree

9 files changed

+48
-39
lines changed

9 files changed

+48
-39
lines changed

BUILDING.txt

Lines changed: 29 additions & 24 deletions
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.86.0 (if compiling native code)
10-
* Protocol Buffers 3.21.12 (if compiling native code)
10+
* Protocol Buffers 3.25.5 (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)
@@ -78,13 +78,15 @@ Refer to dev-support/docker/Dockerfile):
7878
$ ./bootstrap
7979
$ make -j$(nproc)
8080
$ sudo make install
81-
* Protocol Buffers 3.21.12 (required to build native code)
82-
$ curl -L https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.21.12.tar.gz > protobuf-3.21.12.tar.gz
83-
$ tar -zxvf protobuf-3.21.12.tar.gz && cd protobuf-3.21.12
84-
$ ./autogen.sh
85-
$ ./configure
86-
$ make -j$(nproc)
87-
$ sudo make install
81+
* Protocol Buffers 3.25.5 (required to build native code)
82+
$ curl -L https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.25.5.tar.gz > protobuf-3.25.5.tar.gz
83+
$ curl -L https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.1.tar.gz > abseil-cpp-20230802.1.tar.gz
84+
$ tar -zxvf protobuf-3.25.5.tar.gz
85+
$ tar -zxvf abseil-cpp-20230802.1.tar.gz --strip-components 1 -C protobuf-3.25.5/third_party/abseil-cpp
86+
$ cd protobuf-3.25.5
87+
$ cmake -S . -B build -Dprotobuf_BUILD_TESTS=OFF
88+
$ cmake --build build --parallel $(nproc)
89+
$ sudo cmake --install build
8890
* Boost
8991
$ curl -L https://sourceforge.net/projects/boost/files/boost/1.86.0/boost_1_86_0.tar.bz2/download > boost_1_86_0.tar.bz2
9092
$ tar --bzip2 -xf boost_1_86_0.tar.bz2 && cd boost_1_86_0
@@ -434,14 +436,15 @@ Installing required dependencies for clean install of macOS 10.14:
434436
* Install native libraries, only openssl is required to compile native code,
435437
you may optionally install zlib, lz4, etc.
436438
$ brew install openssl
437-
* Protocol Buffers 3.21.12 (required to compile native code)
438-
$ curl -L https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.21.12.tar.gz > protobuf-3.21.12.tar.gz
439-
$ tar -zxvf protobuf-3.21.12.tar.gz && cd protobuf-3.21.12
440-
$ ./autogen.sh
441-
$ ./configure
442-
$ make
443-
$ make check
444-
$ make install
439+
* Protocol Buffers 3.25.5 (required to build native code)
440+
$ curl -L https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.25.5.tar.gz > protobuf-3.25.5.tar.gz
441+
$ curl -L https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.1.tar.gz > abseil-cpp-20230802.1.tar.gz
442+
$ tar -zxvf protobuf-3.25.5.tar.gz
443+
$ tar -zxvf abseil-cpp-20230802.1.tar.gz --strip-components 1 -C protobuf-3.25.5/third_party/abseil-cpp
444+
$ cd protobuf-3.25.5
445+
$ cmake -S . -B build -Dprotobuf_BUILD_TESTS=OFF
446+
$ cmake --build build --parallel $(nproc)
447+
$ cmake --install build
445448
$ protoc --version
446449

447450
Note that building Hadoop 3.1.1/3.1.2/3.2.0 native code from source is broken
@@ -473,13 +476,15 @@ Building on CentOS 8
473476
* Install python2 for building documentation.
474477
$ sudo dnf install python2
475478

476-
* Install Protocol Buffers v3.21.12.
477-
$ curl -L https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.21.12.tar.gz > protobuf-3.21.12.tar.gz
478-
$ tar -zxvf protobuf-3.21.12.tar.gz && cd protobuf-3.21.12
479-
$ ./autogen.sh
480-
$ ./configure --prefix=/usr/local
481-
$ make
482-
$ sudo make install
479+
* Protocol Buffers 3.25.5 (required to build native code)
480+
$ curl -L https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.25.5.tar.gz > protobuf-3.25.5.tar.gz
481+
$ curl -L https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.1.tar.gz > abseil-cpp-20230802.1.tar.gz
482+
$ tar -zxvf protobuf-3.25.5.tar.gz
483+
$ tar -zxvf abseil-cpp-20230802.1.tar.gz --strip-components 1 -C protobuf-3.25.5/third_party/abseil-cpp
484+
$ cd protobuf-3.25.5
485+
$ cmake -S . -B build -Dprotobuf_BUILD_TESTS=OFF
486+
$ cmake --build build --parallel $(nproc)
487+
$ sudo cmake --install build --prefix /usr/local
483488
$ cd ..
484489

485490
* Install libraries provided by CentOS 8.
@@ -531,7 +536,7 @@ Requirements:
531536
* JDK 1.8
532537
* Maven 3.0 or later (maven.apache.org)
533538
* Boost 1.86.0 (boost.org)
534-
* Protocol Buffers 3.21.12 (https://github.com/protocolbuffers/protobuf/tags)
539+
* Protocol Buffers 3.25.5 (https://github.com/protocolbuffers/protobuf/tags)
535540
* CMake 3.19 or newer (cmake.org)
536541
* Visual Studio 2019 (visualstudio.com)
537542
* Windows SDK 8.1 (optional, if building CPU rate control for the container executor. Get this from

dev-support/docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
7171
ENV SPOTBUGS_HOME /opt/spotbugs
7272

7373
#######
74-
# Set env vars for Google Protobuf 3.21.12
74+
# Set env vars for Google Protobuf 3.25.5
7575
#######
7676
ENV PROTOBUF_HOME /opt/protobuf
7777
ENV PATH "${PATH}:/opt/protobuf/bin"

dev-support/docker/Dockerfile_aarch64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-arm64
7272
ENV SPOTBUGS_HOME /opt/spotbugs
7373

7474
#######
75-
# Set env vars for Google Protobuf 3.21.12
75+
# Set env vars for Google Protobuf 3.25.5
7676
#######
7777
ENV PROTOBUF_HOME /opt/protobuf
7878
ENV PATH "${PATH}:/opt/protobuf/bin"

dev-support/docker/Dockerfile_centos_7

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ ENV JAVA_HOME /usr/lib/jvm/java-1.8.0
8888
ENV SPOTBUGS_HOME /opt/spotbugs
8989

9090
#######
91-
# Set env vars for Google Protobuf 3.21.12
91+
# Set env vars for Google Protobuf 3.25.5
9292
#######
9393
ENV PROTOBUF_HOME /opt/protobuf
9494
ENV PATH "${PATH}:/opt/protobuf/bin"

dev-support/docker/Dockerfile_centos_8

Lines changed: 1 addition & 1 deletion
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 3.21.12
104+
# Set env vars for Google Protobuf 3.25.5
105105
#######
106106
ENV PROTOBUF_HOME /opt/protobuf
107107
ENV PATH "${PATH}:/opt/protobuf/bin"

dev-support/docker/Dockerfile_debian_10

Lines changed: 1 addition & 1 deletion
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.21.12
69+
# Set env vars for Google Protobuf 3.25.5
7070
#######
7171
ENV PROTOBUF_HOME /opt/protobuf
7272
ENV PATH "${PATH}:/opt/protobuf/bin"

dev-support/docker/Dockerfile_ubuntu_24

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ ENV JAVA_HOME /usr/lib/jvm/java-17-openjdk-amd64
7171
ENV SPOTBUGS_HOME /opt/spotbugs
7272

7373
#######
74-
# Set env vars for Google Protobuf 3.21.12
74+
# Set env vars for Google Protobuf 3.25.5
7575
#######
7676
ENV PROTOBUF_HOME /opt/protobuf
7777
ENV PATH "${PATH}:/opt/protobuf/bin"

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

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,33 @@ if [ $? -eq 1 ]; then
2727
exit 1
2828
fi
2929

30-
default_version="3.21.12"
30+
default_version="3.25.5"
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.21.12" ]; then
36+
if [ "$version_to_install" != "3.25.5" ]; 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.21.12" ]; then
41+
if [ "$version_to_install" == "3.25.5" ]; then
4242
# hadolint ignore=DL3003
4343
mkdir -p /opt/protobuf-src &&
4444
curl -L -s -S \
45-
https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.21.12.tar.gz \
45+
https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.25.5.tar.gz \
4646
-o /opt/protobuf.tar.gz &&
4747
tar xzf /opt/protobuf.tar.gz --strip-components 1 -C /opt/protobuf-src &&
48+
mkdir -p /opt/abseil-cpp-src &&
49+
curl -L -s -S \
50+
https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.1.tar.gz \
51+
-o /opt/abseil-cpp.tar.gz &&
52+
tar xzf /opt/abseil-cpp.tar.gz --strip-components 1 -C protobuf-src/third_party/abseil-cpp &&
4853
cd /opt/protobuf-src &&
49-
./autogen.sh &&
50-
./configure --prefix=/opt/protobuf &&
51-
make "-j$(nproc)" &&
52-
make install &&
54+
cmake -S . -B build -Dprotobuf_BUILD_TESTS=OFF &&
55+
cmake --build build --parallel $(nproc) &&
56+
cmake --install build --prefix /opt/protobuf &&
5357
cd /root &&
5458
rm -rf /opt/protobuf-src
5559
else

dev-support/docker/vcpkg/vcpkg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"overrides": [
1111
{
1212
"name": "protobuf",
13-
"version": "3.21.12"
13+
"version": "3.25.5"
1414
}
1515
]
1616
}

0 commit comments

Comments
 (0)