NetBSD Problem Report #45472

From www@NetBSD.org  Fri Oct 14 14:28:43 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 9C95E63D538
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 14 Oct 2011 14:28:43 +0000 (UTC)
Message-Id: <20111014142842.ADC1663D50E@www.NetBSD.org>
Date: Fri, 14 Oct 2011 14:28:42 +0000 (UTC)
From: netbsd@marino.st
Reply-To: netbsd@marino.st
To: gnats-bugs@NetBSD.org
Subject: devel/py-gobject: Undefined PLT symbol "PyDict_SetItemString"
X-Send-Pr-Version: www-1.0

>Number:         45472
>Category:       pkg
>Synopsis:       devel/py-gobject: Undefined PLT symbol "PyDict_SetItemString"
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 14 14:30:01 +0000 2011
>Last-Modified:  Mon Oct 17 08:50:02 +0000 2011
>Originator:     John Marino
>Release:        NetBSD 5.99.55
>Organization:
>Environment:
NetBSD banshee.synsport.com 5.99.55 NetBSD 5.99.55 (GENERIC) #0: Sun Sep 11 10:51:09 CEST 2011  root@banshee.synsport.com:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
The GNAT Programming Studio package has been updated (to be committed later today) to build with Python Support, which is quite a useful capability given the dozens of python plug-in scripts it comes with.  The problem is both Python 2.6 and 2.7 have undefined symbols in their dynamically loaded libraries.

After giving up on Python 2.6, I rebuilt everything with Python 2.7, including GPS.  This is the message that appears with the subsequent core dump:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/pkg/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py", line 30, in <module>
    import gobject as _gobject
  File "/usr/pkg/lib/python2.7/site-packages/gobject/__init__.py", line 26, in <module>
    from glib import spawn_async, idle_add, timeout_add, timeout_add_seconds, \
  File "/usr/pkg/lib/python2.7/site-packages/glib/__init__.py", line 22, in <module>
    from glib._glib import *
ImportError: /usr/pkg/lib/python2.7/site-packages/glib/_glib.so: Undefined PLT symbol "PyDict_SetItemString" (symnum = 4)


These undefined symbols are pretty common with these dynamic libraries, even in the main python pkg, even with the -Wl,--export-dynamic cflag set.

Note that GPS 5.0.1 builds and works with python 2.7 on FreeBSD (AMD64 tested) pretty well, although these undefined symbol messages show in error logs there as well.
>How-To-Repeat:
Wait for GPS 5.0.1 (devel/gps) to be committed later today, then modify the options.mk to add "python" to the list of valid options, then build GPS with python 2.7.  The python option was removed from the list because no version of python in pkgsrc works well enough to support GPS.

You must use 2.7 because 2.6 will fail elsewhere, before it gets to _glib.so.
>Fix:

>Audit-Trail:
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/45472: devel/py-gobject: Undefined PLT symbol
 "PyDict_SetItemString"
Date: Fri, 14 Oct 2011 21:56:16 +0200

 On Fri, Oct 14, 2011 at 02:30:01PM +0000, netbsd@marino.st wrote:
 > Traceback (most recent call last):
 >   File "<stdin>", line 1, in <module>
 >   File "/usr/pkg/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py", line 30, in <module>
 >     import gobject as _gobject
 >   File "/usr/pkg/lib/python2.7/site-packages/gobject/__init__.py", line 26, in <module>
 >     from glib import spawn_async, idle_add, timeout_add, timeout_add_seconds, \
 >   File "/usr/pkg/lib/python2.7/site-packages/glib/__init__.py", line 22, in <module>
 >     from glib._glib import *
 > ImportError: /usr/pkg/lib/python2.7/site-packages/glib/_glib.so: Undefined PLT symbol "PyDict_SetItemString" (symnum = 4)

 Well, from what I can see the problem is simply that neither _glib.so
 nor any of its dependencies actually links against libpython.

 Joerg

From: John Marino <netbsd@marino.st>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/45472: devel/py-gobject: Undefined PLT symbol "PyDict_SetItemString"
Date: Mon, 17 Oct 2011 10:47:58 +0200

 On 10/14/2011 10:00 PM, Joerg Sonnenberger wrote:
 > The following reply was made to PR pkg/45472; it has been noted by GNATS.
 > 
 > From: Joerg Sonnenberger <joerg@britannica.bec.de>
 > To: gnats-bugs@netbsd.org
 > Cc: 
 > Subject: Re: pkg/45472: devel/py-gobject: Undefined PLT symbol
 >  "PyDict_SetItemString"
 > Date: Fri, 14 Oct 2011 21:56:16 +0200
 > 
 >  Well, from what I can see the problem is simply that neither _glib.so
 >  nor any of its dependencies actually links against libpython.
 >  
 >  Joerg


 Hi Joerg,

 I'm interpreting your statement as agreement that something is wrong
 with the py-gobject package, and it's not user error.  I just checked
 pkgsrc.se/devel/py-gobject and saw the maintainer is "pkgsrc-users".
 Who is normally assigned issues with python modules?

 Personally I dislike the language due to numerous problems building
 software that uses it (version incompatibilities, confusion when
 multiple versions present, etc), so I really don't know much about
 Python as I try to avoid it where I can.  I'm not the best person to try
 to fix this, although I might try later if this PR is not assigned to
 anybody.

 John

NetBSD Home
NetBSD PR Database Search

(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.