From owner-freebsd-python@FreeBSD.ORG Sat Feb 14 01:49:15 2015 Return-Path: Delivered-To: freebsd-python@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49EF775A; Sat, 14 Feb 2015 01:49:15 +0000 (UTC) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com [209.85.215.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C46BAA2B; Sat, 14 Feb 2015 01:49:14 +0000 (UTC) Received: by labgf13 with SMTP id gf13so19661602lab.9; Fri, 13 Feb 2015 17:49:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=MdG94XSoHFqPx9ZuW/alaKKlJS2ajdukkko3zuLDu9k=; b=d0S116yhjtmhTw+RDcU6eVS3mElTOFIfmcJkTm1J84HKX0K6tLwZgJqDJLL14QSTbW G3DD8UhfYPesM1LlLI1OxcYJZu5Uw8/o5TN9FndEFXLrz8EXYVlkSbAoYk2tRHQtfARB pwVL/Ebu2oAyDnhiS4/FNZcNC74Y0w7ZkMX62WiRT07tGo47eR387650NqQ5cE8wdK/z UEpHgy7Gry9uthIrrKeKjzh/wPDP0rK24YO929dPreooYo9OwkXK1ABjoQJb6CrseVUx Yr+Om9iGhmCx/D/wPBqAewIvwynFKQ7O5i08vIVQX9jtxD8YS/h5pfO41tqMt2yzHY7W QnTw== MIME-Version: 1.0 X-Received: by 10.152.43.18 with SMTP id s18mr10946873lal.26.1423878547036; Fri, 13 Feb 2015 17:49:07 -0800 (PST) Sender: crodr001@gmail.com Received: by 10.112.28.40 with HTTP; Fri, 13 Feb 2015 17:49:06 -0800 (PST) In-Reply-To: <20150213074233.GA1064@medusa.sysfault.org> References: <20150213074233.GA1064@medusa.sysfault.org> Date: Fri, 13 Feb 2015 17:49:06 -0800 X-Google-Sender-Auth: hTf_d9XPwtF1Dhvzgio2jf4W0fA Message-ID: Subject: Re: ctypes problem loading libc.so on FreeBSD current From: Craig Rodrigues To: Marcus von Appen , Craig Rodrigues , freebsd-python@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 01:49:15 -0000 On Thu, Feb 12, 2015 at 11:42 PM, Marcus von Appen wrote: > > You described the problem above. ctypes is unable to load linker > scripts. The general advise is to use find_library(): > > >>> import ctypes > >>> import ctypes.util > >>> clib = ctypes.util.find_library("c") > >>> print clib > libc.so.7 > >>> dll = ctypes.CDLL(clib) > > Cheers > Marcus > That solves it. Thanks!! -- Craig