Date: Wed, 25 Aug 2010 11:32:14 -0500 From: Jeff Aigner <jaigner@setnine.com> To: freebsd-questions@freebsd.org Subject: Python cdll.LoadLibrary() Segfault Message-ID: <4C75458E.6000603@setnine.com>
next in thread | raw e-mail | index | archive | help
Hello, I am trying to use ctypes in python to load some external libs, and python segfaults when I try to load libc.so.6. This error occurs with both python 2.5.5 and python 2.6.5. Here's what happens: jeffdev# python Python 2.5.5 (r255:77872, Aug 25 2010, 12:17:48) [GCC 4.2.1 20070719 [FreeBSD]] on freebsd7 Type "help", "copyright", "credits" or "license" for more information. >>> from ctypes import * >>> cdll.LoadLibrary("/usr/compat/linux/lib/ld-linux.so.2") <CDLL '/usr/compat/linux/lib/ld-linux.so.2', handle 28516400 at 284178ec> >>> cdll.LoadLibrary("/usr/compat/linux/lib/libc.so.6") Segmentation fault (core dumped) jeffdev# Also note that I have to give the full path to the libraries, even when I try to set the environment variable $LD_LIBRARY_PATH Some more info: FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008 root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 Any idea as to what is happening here, or what I can do to try and get around this issue? Jeff Aigner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C75458E.6000603>