Projects
Eulaceura:Mainline
mysql
_service:obs_scm:fix-protobuf-version-22-and-up...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:fix-protobuf-version-22-and-up.patch of Package mysql
From 7e252db5027c0dddb4c5a403ba0a481c35c10283 Mon Sep 17 00:00:00 2001 From: gordonwwang <gordonwwang@tencent.com> Date: Sun, 18 Feb 2024 14:27:33 +0800 Subject: [PATCH] Fix build failure with Protobuf-24.2 --- cmake/fileutils.cmake | 5 ++++- cmake/protobuf.cmake | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/cmake/fileutils.cmake b/cmake/fileutils.cmake index da98301..22dfb8d 100644 --- a/cmake/fileutils.cmake +++ b/cmake/fileutils.cmake @@ -128,8 +128,11 @@ IF(LINUX) SET(DEPENDENCIES) FOREACH(LINE ${OBJDUMP_OUTPUT_LIST}) STRING(REGEX MATCH - "^[ ]+NEEDED[ ]+([-_A-Za-z0-9\\.]+)" UNUSED ${LINE}) + "^[ ]+NEEDED[ ]+([-+_A-Za-z0-9\\.]+)" UNUSED ${LINE}) IF(CMAKE_MATCH_1) + IF(CMAKE_MATCH_1 STREQUAL "ld-linux-x86-64.so.2" OR CMAKE_MATCH_1 STREQUAL "ld-linux-aarch64.so.1" OR CMAKE_MATCH_1 STREQUAL "ld-linux-riscv64-lp64d.so.1") + SET(CMAKE_MATCH_1 "libdl.so.2") + ENDIF() LIST(APPEND DEPENDENCIES ${CMAKE_MATCH_1}) ENDIF() ENDFOREACH() diff --git a/cmake/protobuf.cmake b/cmake/protobuf.cmake index 11c0f92..447ce6c 100644 --- a/cmake/protobuf.cmake +++ b/cmake/protobuf.cmake @@ -191,6 +191,22 @@ MACRO(MYSQL_CHECK_PROTOBUF) ) ENDIF() + # fix protobuf version 22 and up in Linux + IF(LINUX AND WITH_PROTOBUF STREQUAL "system" AND PB_MINOR_VERSION VERSION_GREATER 21) + FIND_OBJECT_DEPENDENCIES("${PROTOBUF_LIBRARY}" protobuf_dependencies) + SET_TARGET_PROPERTIES(ext::libprotobuf PROPERTIES + INTERFACE_LINK_LIBRARIES "${protobuf_dependencies}" + ) + FIND_OBJECT_DEPENDENCIES("${PROTOBUF_LITE_LIBRARY}" lite_dependencies) + SET_TARGET_PROPERTIES(ext::libprotobuf-lite PROPERTIES + INTERFACE_LINK_LIBRARIES "${lite_dependencies}" + ) + FIND_OBJECT_DEPENDENCIES("${Protobuf_PROTOC_LIBRARY}" protoc_dependencies) + SET_TARGET_PROPERTIES(ext::libprotoc PROPERTIES + INTERFACE_LINK_LIBRARIES "${protoc_dependencies}" + ) + ENDIF() + IF("${PROTOBUF_VERSION}" VERSION_LESS "${MIN_PROTOBUF_VERSION_REQUIRED}") COULD_NOT_FIND_PROTOBUF() ENDIF() -- 2.33.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2