-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HADOOP-19605. Upgrade Protobuf 3.25.5 for docker images #7780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,29 +27,32 @@ if [ $? -eq 1 ]; then | |
| exit 1 | ||
| fi | ||
|
|
||
| default_version="3.21.12" | ||
| default_version="3.25.5" | ||
| version_to_install=$default_version | ||
| if [ -n "$2" ]; then | ||
| version_to_install="$2" | ||
| fi | ||
|
|
||
| if [ "$version_to_install" != "3.21.12" ]; then | ||
| if [ "$version_to_install" != "3.25.5" ]; then | ||
| echo "WARN: Don't know how to install version $version_to_install, installing the default version $default_version instead" | ||
| version_to_install=$default_version | ||
| fi | ||
|
|
||
| if [ "$version_to_install" == "3.21.12" ]; then | ||
| if [ "$version_to_install" == "3.25.5" ]; then | ||
| # hadolint ignore=DL3003 | ||
| mkdir -p /opt/protobuf-src && | ||
| curl -L -s -S \ | ||
| https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.21.12.tar.gz \ | ||
| https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.25.5.tar.gz \ | ||
| -o /opt/protobuf.tar.gz && | ||
| tar xzf /opt/protobuf.tar.gz --strip-components 1 -C /opt/protobuf-src && | ||
| curl -L -s -S \ | ||
| https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.1.tar.gz \ | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. recent protobuf versions have hard dependency on abseil, the version is defined at |
||
| -o /opt/abseil-cpp.tar.gz && | ||
| tar xzf /opt/abseil-cpp.tar.gz --strip-components 1 -C /opt/protobuf-src/third_party/abseil-cpp && | ||
| cd /opt/protobuf-src && | ||
| ./autogen.sh && | ||
| ./configure --prefix=/opt/protobuf && | ||
| make "-j$(nproc)" && | ||
| make install && | ||
| cmake -S . -B build -DCMAKE_POSITION_INDEPENDENT_CODE=ON -Dprotobuf_BUILD_TESTS=OFF && | ||
| cmake --build build --parallel $(nproc) && | ||
| cmake --install build --prefix /opt/protobuf && | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. protocolbuffers/protobuf#10132 (since protobuf 3.22.0) removes autotools support, the supported toolchains are bazel and cmake. |
||
| cd /root && | ||
| rm -rf /opt/protobuf-src | ||
| else | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ | |
| "overrides": [ | ||
| { | ||
| "name": "protobuf", | ||
| "version": "3.21.12" | ||
| "version": "3.25.5" | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suppose this works, but I don't have Windows env to verify this.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for PR @pan3793. Please let me know once you're done with all the changes and I can verify it on Windows.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @GauthamBanasandra Now it passes on all Linux containers. Due to my limited CPP experience, my change might be dirty ...
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @GauthamBanasandra do you remember why we should install
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These libraries are needed for C/C++ code that uses protobuf. Regarding installing these from
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @GauthamBanasandra, but it has already been installed Anyway, duplicated installation is not a major issue. Could you please review this PR? I tested it in all current Dockerfiles, but my changes in CMake files might be dirty (sorry, I'm not familiar with cpp toolchains) |
||
| } | ||
| ] | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now it returns 25.5 (seems protobuf changed version policy recently)