Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5bb9692

Browse files
authored
bpo-32647: Link ctypes extension with libdl. (python#5550)
The ctypes module used to depend on indirect linking for dlopen. The shared extension is now explicitly linked against libdl on platforms with dl. Signed-off-by: Christian Heimes <[email protected]>
1 parent b7b9225 commit 5bb9692

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The ctypes module used to depend on indirect linking for dlopen. The shared
2+
extension is now explicitly linked against libdl on platforms with dl.

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2005,6 +2005,10 @@ def detect_ctypes(self, inc_dirs, lib_dirs):
20052005
ext.libraries.append(ffi_lib)
20062006
self.use_system_libffi = True
20072007

2008+
if sysconfig.get_config_var('HAVE_LIBDL'):
2009+
# for dlopen, see bpo-32647
2010+
ext.libraries.append('dl')
2011+
20082012
def _decimal_ext(self):
20092013
extra_compile_args = []
20102014
undef_macros = []

0 commit comments

Comments
 (0)