NetBSD Problem Report #46069
From www@NetBSD.org Tue Feb 21 20:40:46 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id 4E4BB63E0FB
for <gnats-bugs@gnats.NetBSD.org>; Tue, 21 Feb 2012 20:40:46 +0000 (UTC)
Message-Id: <20120221204044.0541363E0E9@www.NetBSD.org>
Date: Tue, 21 Feb 2012 20:40:44 +0000 (UTC)
From: tho@useless-ficus.net
Reply-To: tho@useless-ficus.net
To: gnats-bugs@NetBSD.org
Subject: x11/py-wxpython: wxcairo not loading
X-Send-Pr-Version: www-1.0
>Number: 46069
>Category: pkg
>Synopsis: x11/py-wxpython: wxcairo not loading
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Feb 21 20:45:00 +0000 2012
>Originator: anthony mallet
>Release: 5.99.56
>Organization:
>Environment:
NetBSD ficus 5.99.56 NetBSD 5.99.56 (FICUS) #11: Mon Feb 13 19:36:45 CET 2012 troot@ficus:/usr/obj/sys/arch/i386/compile/FICUS i386
>Description:
wxcairo package from x11/py-wxpython fails to load.
Attached patch fixes the problem for me. I'm not sure this is the "ultimate" fix, but I can't come up with something else :)
See http://mail-index.netbsd.org/tech-pkg/2012/02/20/msg008552.html for some more details.
>How-To-Repeat:
python2.6 -c 'import wx.lib.wxcairo'
>Fix:
--- wx/lib/wxcairo.py.orig 2012-02-21 21:20:39.000000000 +0100
+++ wx/lib/wxcairo.py 2012-02-21 21:20:58.000000000 +0100
@@ -229,10 +229,9 @@
if cairoLib is not None:
return
- location = None
for name in ['cairo', 'cairo-2', 'libcairo-2']:
- location = ctypes.util.find_library(name)
- if location:
+ cairoLib = ctypes.CDLL('lib' + name + '.so')
+ if cairoLib:
break
else:
# If the above didn't find it on OS X then we still have a
@@ -246,12 +245,11 @@
if 'libcairo' in path:
location = path
break
+ cairoLib = ctypes.CDLL(location)
- if not location:
+ if not cairoLib:
raise RuntimeError, "Unable to find the Cairo shared library"
-
- cairoLib = ctypes.CDLL(location)
-
+
#----------------------------------------------------------------------------
# For other DLLs we'll just use a dictionary to track them, as there
@@ -262,14 +260,13 @@
dll = _dlls.get(key, None)
if dll is not None:
return dll
- location = None
- for name in names:
- location = ctypes.util.find_library(name)
- if location:
- break
- if not location:
- raise RuntimeError, msg
+ location = 'lib' + names[0] + '.so'
dll = ctypes.CDLL(location)
+ if not dll:
+ location = 'lib' + names[0] + '.dylib'
+ dll = ctypes.CDLL(location)
+ if not dll:
+ raise RuntimeError, msg
_dlls[key] = dll
return dll
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.