kiran-authentication-devices/0003-fix-compile-fix-ld-error-undefined-reference-to-symb.patch
wangyucheng fe0b860002 fix ld error: undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
- 修复在低于2.34版本的glibc环境中出现的链接错误
2023-04-21 14:02:36 +08:00

30 lines
1.0 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 1e33c89f9aabdc5362b8fbd1720cf45d117d888c Mon Sep 17 00:00:00 2001
From: wangyucheng <wangyucheng@kylinsec.com.cn>
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