diff --git a/Dependencies.txt b/Dependencies.txt index af2b32d937..cf704d33bf 100644 --- a/Dependencies.txt +++ b/Dependencies.txt @@ -1,4 +1,4 @@ -Protobuf=3.15.3 +Protobuf=3.15.7 abseil-cpp=20200923.3 Cbc=2.10.5 Cgl=0.60.3 diff --git a/WORKSPACE b/WORKSPACE index 919901137e..b8e91cc542 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -29,7 +29,7 @@ http_archive( # Protobuf git_repository( name = "com_google_protobuf", - commit = "983d115", # release v3.15.3 + commit = "878be35", # release v3.15.7 remote = "https://github.com/protocolbuffers/protobuf.git", ) diff --git a/cmake/dependencies/CMakeLists.txt b/cmake/dependencies/CMakeLists.txt index ad557cfa1b..95ac9358dd 100644 --- a/cmake/dependencies/CMakeLists.txt +++ b/cmake/dependencies/CMakeLists.txt @@ -114,17 +114,17 @@ if(BUILD_Protobuf) FetchContent_Declare( protobuf GIT_REPOSITORY "https://github.com/protocolbuffers/protobuf.git" - GIT_TAG "v3.15.3" + GIT_TAG "v3.15.7" GIT_SUBMODULES "" - PATCH_COMMAND git apply "${CMAKE_CURRENT_LIST_DIR}/../../patches/protobuf-v3.15.3.patch" + PATCH_COMMAND git apply "${CMAKE_CURRENT_LIST_DIR}/../../patches/protobuf-v3.15.7.patch" SOURCE_SUBDIR cmake) FetchContent_MakeAvailable(protobuf) else() fetch_git_dependency( NAME Protobuf REPOSITORY "https://github.com/protocolbuffers/protobuf.git" - TAG "v3.15.3" - PATCH_COMMAND "git apply \"${CMAKE_CURRENT_LIST_DIR}/../../patches/protobuf-v3.15.3.patch\"" + TAG "v3.15.7" + PATCH_COMMAND "git apply \"${CMAKE_CURRENT_LIST_DIR}/../../patches/protobuf-v3.15.7.patch\"" SOURCE_SUBDIR cmake ) endif() diff --git a/cmake/host.CMakeLists.txt b/cmake/host.CMakeLists.txt index d86ccdc1c4..c3b770c405 100644 --- a/cmake/host.CMakeLists.txt +++ b/cmake/host.CMakeLists.txt @@ -106,17 +106,17 @@ if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.18") FetchContent_Declare( protobuf GIT_REPOSITORY "https://github.com/protocolbuffers/protobuf.git" - GIT_TAG "v3.15.3" + GIT_TAG "v3.15.7" GIT_SUBMODULES "" - PATCH_COMMAND git apply "${CMAKE_CURRENT_LIST_DIR}/../../../patches/protobuf-v3.15.3.patch" + PATCH_COMMAND git apply "${CMAKE_CURRENT_LIST_DIR}/../../../patches/protobuf-v3.15.7.patch" SOURCE_SUBDIR cmake) FetchContent_MakeAvailable(protobuf) else() fetch_git_dependency( NAME Protobuf REPOSITORY "https://github.com/protocolbuffers/protobuf.git" - TAG "v3.15.3" - PATCH_COMMAND "git apply \"${CMAKE_CURRENT_LIST_DIR}/../../../patches/protobuf-v3.15.3.patch\"" + TAG "v3.15.7" + PATCH_COMMAND "git apply \"${CMAKE_CURRENT_LIST_DIR}/../../../patches/protobuf-v3.15.7.patch\"" SOURCE_SUBDIR cmake) endif() list(POP_BACK CMAKE_MESSAGE_INDENT) diff --git a/makefiles/Makefile.third_party.unix.mk b/makefiles/Makefile.third_party.unix.mk index 48b694c2ee..10a8a30b52 100644 --- a/makefiles/Makefile.third_party.unix.mk +++ b/makefiles/Makefile.third_party.unix.mk @@ -20,7 +20,7 @@ UNIX_SWIG_BINARY ?= swig PROTOC_BINARY := $(shell $(WHICH) ${UNIX_PROTOC_BINARY}) # Tags of dependencies to checkout. -PROTOBUF_TAG = v3.15.3 +PROTOBUF_TAG = v3.15.7 ABSL_TAG = 20200923.3 CBC_TAG = 2.10.5 CGL_TAG = 0.60.3 diff --git a/makefiles/Makefile.third_party.win.mk b/makefiles/Makefile.third_party.win.mk index 66f6705e27..b2b7fc8bdc 100644 --- a/makefiles/Makefile.third_party.win.mk +++ b/makefiles/Makefile.third_party.win.mk @@ -35,7 +35,7 @@ SWIG_BINARY = $(WINDOWS_SWIG_BINARY) # tags of dependencies to checkout. ZLIB_TAG = 1.2.11 ZLIB_ARCHIVE_TAG = 1211 -PROTOBUF_TAG = v3.15.3 +PROTOBUF_TAG = v3.15.7 ABSL_TAG = 20200923.3 # We are using a CBC archive containing all coin-or project # since Clp 2.17.5+ is broken we need to stick with Cbc 2.10.4 diff --git a/ortools/dotnet/Google.OrTools/Google.OrTools.csproj.in b/ortools/dotnet/Google.OrTools/Google.OrTools.csproj.in index 6c4f6b8ebf..bcb42535ec 100644 --- a/ortools/dotnet/Google.OrTools/Google.OrTools.csproj.in +++ b/ortools/dotnet/Google.OrTools/Google.OrTools.csproj.in @@ -141,7 +141,7 @@ - + diff --git a/ortools/java/pom-full.xml.in b/ortools/java/pom-full.xml.in index cb73b0feb3..ce9ba2e6d0 100644 --- a/ortools/java/pom-full.xml.in +++ b/ortools/java/pom-full.xml.in @@ -95,7 +95,7 @@ com.google.protobuf protobuf-java - 3.15.3 + 3.15.7 diff --git a/ortools/java/pom-local.xml.in b/ortools/java/pom-local.xml.in index f2201f9e75..5b1a24d22d 100644 --- a/ortools/java/pom-local.xml.in +++ b/ortools/java/pom-local.xml.in @@ -81,7 +81,7 @@ com.google.protobuf protobuf-java - 3.15.3 + 3.15.7 diff --git a/ortools/java/pom.xml.in b/ortools/java/pom.xml.in index 69631d8b4f..3aeb6b4b74 100644 --- a/ortools/java/pom.xml.in +++ b/ortools/java/pom.xml.in @@ -69,7 +69,7 @@ com.google.protobuf protobuf-java - 3.15.3 + 3.15.7 junit diff --git a/ortools/python/setup.py.in b/ortools/python/setup.py.in index f0022dc8d1..2fcf1611c7 100644 --- a/ortools/python/setup.py.in +++ b/ortools/python/setup.py.in @@ -42,7 +42,7 @@ setup( version='@PROJECT_VERSION@', packages=find_packages(), install_requires=[ - 'protobuf >= 3.15.3', + 'protobuf >= 3.15.7', 'absl-py >= 0.11', ], package_data={ diff --git a/patches/protobuf-v3.15.3.patch b/patches/protobuf-v3.15.7.patch similarity index 72% rename from patches/protobuf-v3.15.3.patch rename to patches/protobuf-v3.15.7.patch index afdb01c448..f53287d6f9 100644 --- a/patches/protobuf-v3.15.3.patch +++ b/patches/protobuf-v3.15.7.patch @@ -1,5 +1,5 @@ diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt -index 52661f522..79aea8b4d 100644 +index 5c3b6e451..9834a16d4 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -16,6 +16,16 @@ if(POLICY CMP0048) @@ -24,10 +24,10 @@ index 52661f522..79aea8b4d 100644 option(protobuf_BUILD_PROTOC_BINARIES "Build libprotoc and protoc compiler" ON) option(protobuf_BUILD_LIBPROTOC "Build libprotoc" OFF) +option(protobuf_BUILD_EXPORT "Build export to use build directory" ON) + option(protobuf_DISABLE_RTTI "Remove runtime type information in the binaries" OFF) if (BUILD_SHARED_LIBS) set(protobuf_BUILD_SHARED_LIBS_DEFAULT ON) - else (BUILD_SHARED_LIBS) -@@ -52,7 +63,7 @@ else (BUILD_SHARED_LIBS) +@@ -53,7 +64,7 @@ else (BUILD_SHARED_LIBS) endif (BUILD_SHARED_LIBS) option(protobuf_BUILD_SHARED_LIBS "Build Shared Libraries" ${protobuf_BUILD_SHARED_LIBS_DEFAULT}) include(CMakeDependentOption) @@ -36,16 +36,7 @@ index 52661f522..79aea8b4d 100644 "NOT protobuf_BUILD_SHARED_LIBS" OFF) set(protobuf_WITH_ZLIB_DEFAULT ON) option(protobuf_WITH_ZLIB "Build with zlib support" ${protobuf_WITH_ZLIB_DEFAULT}) -@@ -65,6 +76,8 @@ include(protobuf-options.cmake) - # Overrides for option dependencies - if (protobuf_BUILD_PROTOC_BINARIES OR protobuf_BUILD_TESTS) - set(protobuf_BUILD_LIBPROTOC ON) -+else() -+ set(protobuf_BUILD_LIBPROTOC OFF) - endif () - # Path to main configure script - set(protobuf_CONFIGURE_SCRIPT "../configure.ac") -@@ -124,24 +137,12 @@ endif (CMAKE_USE_PTHREADS_INIT) +@@ -129,24 +140,16 @@ endif (CMAKE_USE_PTHREADS_INIT) set(_protobuf_FIND_ZLIB) if (protobuf_WITH_ZLIB) @@ -71,12 +62,16 @@ index 52661f522..79aea8b4d 100644 + find_package(ZLIB REQUIRED) + endif() + set(HAVE_ZLIB 1) -+ set(_protobuf_FIND_ZLIB "if(NOT ZLIB_FOUND AND NOT TARGET ZLIB::ZLIB)\n -+ find_package(ZLIB REQUIRED)\nendif()") ++ # FindZLIB module define ZLIB_INCLUDE_DIRS variable ++ # Set ZLIB_INCLUDE_DIRECTORIES for compatible ++ set(ZLIB_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIRECTORIES} ${ZLIB_INCLUDE_DIRS}) ++ # Using imported target if exists ++ set(ZLIB_LIBRARIES ZLIB::ZLIB) ++ set(_protobuf_FIND_ZLIB "if(NOT ZLIB_FOUND AND NOT TARGET ZLIB::ZLIB)\n find_package(ZLIB REQUIRED)\nendif()") endif (protobuf_WITH_ZLIB) if (HAVE_ZLIB) -@@ -231,7 +232,6 @@ endif (MSVC) +@@ -236,7 +239,6 @@ endif (MSVC) get_filename_component(protobuf_source_dir ${protobuf_SOURCE_DIR} PATH) include_directories( @@ -85,14 +80,13 @@ index 52661f522..79aea8b4d 100644 ${protobuf_source_dir}/src) diff --git a/cmake/install.cmake b/cmake/install.cmake -index 4091bc8af..587d6d15a 100644 +index 9dd6e7710..e99c89940 100644 --- a/cmake/install.cmake +++ b/cmake/install.cmake -@@ -119,18 +119,19 @@ configure_file(protobuf-options.cmake - ${CMAKE_INSTALL_CMAKEDIR}/protobuf-options.cmake @ONLY) +@@ -124,17 +124,19 @@ configure_file(protobuf-options.cmake # Allows the build directory to be used as a find directory. -- + -if (protobuf_BUILD_PROTOC_BINARIES) - export(TARGETS libprotobuf-lite libprotobuf libprotoc protoc - NAMESPACE protobuf:: @@ -109,27 +103,14 @@ index 4091bc8af..587d6d15a 100644 + export(TARGETS libprotobuf-lite libprotobuf libprotoc protoc + NAMESPACE protobuf:: + FILE ${CMAKE_INSTALL_CMAKEDIR}/protobuf-targets.cmake -+ ) ++ ) + else (protobuf_BUILD_PROTOC_BINARIES) + export(TARGETS libprotobuf-lite libprotobuf + NAMESPACE protobuf:: + FILE ${CMAKE_INSTALL_CMAKEDIR}/protobuf-targets.cmake -+ ) ++ ) + endif (protobuf_BUILD_PROTOC_BINARIES) +endif() install(EXPORT protobuf-targets DESTINATION "${CMAKE_INSTALL_CMAKEDIR}" -diff --git a/cmake/libprotobuf.cmake b/cmake/libprotobuf.cmake -index a5be494fb..9934e6e8a 100644 ---- a/cmake/libprotobuf.cmake -+++ b/cmake/libprotobuf.cmake -@@ -116,7 +116,7 @@ add_library(libprotobuf ${protobuf_SHARED_OR_STATIC} - ${libprotobuf_lite_files} ${libprotobuf_files} ${libprotobuf_includes} ${libprotobuf_rc_files}) - target_link_libraries(libprotobuf ${CMAKE_THREAD_LIBS_INIT}) - if(protobuf_WITH_ZLIB) -- target_link_libraries(libprotobuf ${ZLIB_LIBRARIES}) -+ target_link_libraries(libprotobuf ZLIB::ZLIB) - endif() - if(protobuf_LINK_LIBATOMIC) - target_link_libraries(libprotobuf atomic) diff --git a/tools/setup.py.in b/tools/setup.py.in index f985cfe607..1be0724676 100644 --- a/tools/setup.py.in +++ b/tools/setup.py.in @@ -42,7 +42,7 @@ setup( version='VVVV', packages=find_packages(), install_requires=[ - 'protobuf >= 3.15.3', + 'protobuf >= 3.15.7', 'absl-py >= 0.11', ], package_data={