diff --git a/0003-fix-compile-fix-ld-error-undefined-reference-to-symb.patch b/0003-fix-compile-fix-ld-error-undefined-reference-to-symb.patch new file mode 100644 index 0000000..f556277 --- /dev/null +++ b/0003-fix-compile-fix-ld-error-undefined-reference-to-symb.patch @@ -0,0 +1,29 @@ +From 1e33c89f9aabdc5362b8fbd1720cf45d117d888c Mon Sep 17 00:00:00 2001 +From: wangyucheng +Date: Fri, 21 Apr 2023 13:51:30 +0800 +Subject: [PATCH] fix(compile): fix ld error: undefined reference to symbol + 'dlclose@@GLIBC_2.2.5' +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 修复在低于2.34版本的glibc环境中出现的链接错误(从glibc2.34开始,将dl的实现放在了glibc中,所以在glibc2.34的环境中不需要链接dl,但是在低于2.34的环境还是需要链接) +--- + src/CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 041f0dc..c6c2001 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -69,6 +69,7 @@ target_link_libraries(${PROJECT_NAME} + Qt5::DBus + Qt5::Sql + Qt5::Concurrent ++ ${CMAKE_DL_LIBS} + ) + + target_link_directories(${PROJECT_NAME} PRIVATE +-- +2.33.0 + diff --git a/kiran-authentication-devices.spec b/kiran-authentication-devices.spec index 81ebf0d..ac3a55a 100644 --- a/kiran-authentication-devices.spec +++ b/kiran-authentication-devices.spec @@ -1,7 +1,7 @@ Name: kiran-authentication-devices Version: 2.5.0 -Release: 4 +Release: 5 Summary: Kiran Authentication Devices License: MulanPSL-2.0 @@ -9,6 +9,7 @@ Source0: %{name}-%{version}.tar.gz Patch0001: 0001-feature-ukey-The-UKey-device-is-adapted.patch Patch0002: 0002-fix-cmake-qt5-cmake-command-compatible.patch +Patch0003: 0003-fix-compile-fix-ld-error-undefined-reference-to-symb.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -65,6 +66,9 @@ systemctl enable kiran-authentication-devices.service rm -rf ${buildroot} %changelog +* Fri Apr 21 2023 wangyucheng - 2.5.0-5 +- KYOS-F: fix ld error: undefined reference to symbol 'dlclose@@GLIBC_2.2.5'. + * Fri Apr 21 2023 wangyucheng - 2.5.0-4 - KYOS-F: qt5 cmake command compatible.