From owner-freebsd-questions@FreeBSD.ORG Wed Aug 25 16:52:10 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1CF0106564A for ; Wed, 25 Aug 2010 16:52:10 +0000 (UTC) (envelope-from jaigner@setnine.com) Received: from mail.grouponeinv.com (mail.grouponeinv.com [209.119.13.133]) by mx1.freebsd.org (Postfix) with ESMTP id 8773B8FC14 for ; Wed, 25 Aug 2010 16:52:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.grouponeinv.com (Postfix) with ESMTP id 3AFCEFE861C for ; Wed, 25 Aug 2010 12:30:44 -0400 (EDT) X-Virus-Scanned: amavisd-new at mail.grouponeinv.com Received: from mail.grouponeinv.com ([127.0.0.1]) by localhost (mail.grouponeinv.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X6dkNDiDSFJn for ; Wed, 25 Aug 2010 12:30:28 -0400 (EDT) Received: from [192.168.1.111] (c-67-162-7-76.hsd1.il.comcast.net [67.162.7.76]) by mail.grouponeinv.com (Postfix) with ESMTPSA id B802FFE861B for ; Wed, 25 Aug 2010 12:30:28 -0400 (EDT) Message-ID: <4C75458E.6000603@setnine.com> Date: Wed, 25 Aug 2010 11:32:14 -0500 From: Jeff Aigner User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: freebsd-questions@freebsd.org X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Python cdll.LoadLibrary() Segfault X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Aug 2010 16:52:10 -0000 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.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