Skip to content

Commit 74c6472

Browse files
p-lanzaSunny-Anandgongsu832jorickert
committed
update protobuf version to 25.3
Based on upstream commit f24291d Co-authored-by: Sunny Anand <[email protected]> Co-authored-by: Gong Su <[email protected]> Co-authored-by: Jonas Rickert <[email protected]>
1 parent 8c27f22 commit 74c6472

File tree

3 files changed

+27
-8
lines changed

3 files changed

+27
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Detailed instructions are provided below.
5252
```
5353
python >= 3.8
5454
gcc >= 6.4
55-
protobuf >= 4.21.12
55+
protobuf >= 4.25.3
5656
cmake >= 3.13.4
5757
make >= 4.2.1 or ninja >= 1.10.2
5858
java >= 1.11 (optional)

utils/install-protobuf.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
REM Check out protobuf v21.12
2-
set protobuf_version=21.12
2+
set protobuf_version=25.3
33
git clone -b v%protobuf_version% --recursive https://github.com/protocolbuffers/protobuf.git
44

55
set root_dir=%cd%

utils/install-protobuf.sh

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,29 @@
1-
# Check out protobuf
2-
PROTOBUF_VERSION=21.12
3-
git clone -b v${PROTOBUF_VERSION} --depth 1 --recursive https://github.com/protocolbuffers/protobuf.git
1+
ABSL_VERSION=20250127.0
2+
ABSL_URL=https://github.com/abseil/abseil-cpp.git
3+
ABSL_DIR=abseil-cpp
4+
git clone -b ${ABSL_VERSION} --depth 1 --recursive ${ABSL_URL} ${ABSL_DIR}
5+
mkdir -p ${ABSL_DIR}/build
6+
cd ${ABSL_DIR}/build
7+
cmake -DCMAKE_INSTALL_PREFIX=/usr \
8+
-DABSL_PROPAGATE_CXX_STD=ON \
9+
-DABSL_BUILD_TESTING=OFF \
10+
-DBUILD_SHARED_LIBS=ON ..
11+
sudo make -j2 install
12+
cd ../..
413

5-
cd protobuf
6-
./autogen.sh
7-
./configure --enable-static=no --prefix=/usr
14+
PROTOBUF_VERSION=4.25.3
15+
PROTOBUF_URL=https://github.com/protocolbuffers/protobuf.git
16+
PROTOBUF_DIR=protobuf
17+
git clone -b v${PROTOBUF_VERSION} --depth 1 --recursive ${PROTOBUF_URL} ${PROTOBUF_DIR}
18+
mkdir -p ${PROTOBUF_DIR}/build
19+
cd ${PROTOBUF_DIR}/build
20+
# Must specify -Dprotobuf_BUILD_TESTS=OFF otherwise find_package(absl)
21+
# in onnx will fail due to missing protobuf::gmock target
22+
cmake -DCMAKE_INSTALL_PREFIX=/usr \
23+
-DCMAKE_INSTALL_LIBDIR=lib \
24+
-DBUILD_SHARED_LIBS=ON \
25+
-Dprotobuf_BUILD_TESTS=OFF \
26+
-Dprotobuf_ABSL_PROVIDER=package ..
827
sudo make -j2 install
928

1029
# Doesn't work on Ubuntu, just needed for MacOS?

0 commit comments

Comments
 (0)