NetBSD Problem Report #16144

Received: (qmail 6116 invoked from network); 31 Mar 2002 17:11:04 -0000
Message-Id: <200203311706.g2VH6bR22687@shopserver>
Date: Sun, 31 Mar 2002 11:06:37 -0600 (CST)
From: Brett Slager <bds@shopserver>
Reply-To: slager@jorsm.com
To: gnats-bugs@gnats.netbsd.org
Subject: pkg wxPython won't load
X-Send-Pr-Version: 3.95

>Number:         16144
>Category:       pkg
>Synopsis:       pkg wxPython won't load
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    jlam
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 31 17:12:00 +0000 2002
>Closed-Date:    Fri Jul 25 10:41:37 +0000 2003
>Last-Modified:  Fri Jul 25 10:41:37 +0000 2003
>Originator:     Brett Slager
>Release:        NetBSD 1.5.1
>Organization:
>Environment:
	pkgsrc from Mar 18, 2002
	pkg python20-2.0.1nb2
	pkg py20-wxWindows-2.2.2nb1
System: NetBSD shopserver 1.5.2 NetBSD 1.5.2 (GENERIC) #3: Sat Aug 18 23:37:05 CEST 2001 he@hamster.urc.uninett.no:/usr/src/sys/arch/i386/compile/GENERIC i386


>Description:

wxPython straight out of pkgsrc fails to load because of undefined
symbol "__pure_virtual".

>How-To-Repeat:

367 shopserver wxPython-2.2.2/demo % python demo.py
Traceback (most recent call last):
  File "demo.py", line 3, in ?
    import Main
  File "Main.py", line 15, in ?
    from   wxPython.wx import *
  File "/usr/pkg/lib/python2.0/site-packages/wxPython/__init__.py", line 20, in ?
    import wxc
ImportError: /usr/pkg/lib/python2.0/site-packages/wxPython/wxc.so: Undefined symbol "__pure_virtual" (reloc type = 1, symnum = 2521)
Exit 1

>Fix:
doc/HACKS reference for perl5:

hack    perl5-base
mdate   12 Apr 2001
who     manu
port    all
Checking in perl5-base/patches/patch-ag: 1.2 : 1 : 999
descr
        The Xerces-Perl module is implemented as a shared object. It needs 
        some symbols from libgcc.a, such as __eh_alloc. It's not possible
        to link the xerces-P shared object with libgcc.a, because libgcc.a
        is not compiled with -fPIC. Hence we need to have the missing 
        symbols in the Perl executable. 
        This hack includes the whole libgcc.a in the Perl executable, and
        links with c++ so that some mandatory symbols such as __pure_virtual 
        are also included. It should go away with GCC-3.0, or if we make a
        libgcc.so on day.
>Release-Note:
>Audit-Trail:

From: "Johnny C. Lam" <jlam@netbsd.org>
To: slager@jorsm.com
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/16144: pkg wxPython won't load
Date: Thu, 4 Apr 2002 02:48:34 -0800

 On Sun, Mar 31, 2002 at 11:06:37AM -0600, Brett Slager wrote:
 > 
 > wxPython straight out of pkgsrc fails to load because of undefined
 > symbol "__pure_virtual".
 > 
 > [...]
 > 
 > >Fix:
 > doc/HACKS reference for perl5:
 > 
 > hack    perl5-base
 > mdate   12 Apr 2001
 > who     manu
 > port    all
 > Checking in perl5-base/patches/patch-ag: 1.2 : 1 : 999
 > descr
 >         The Xerces-Perl module is implemented as a shared object. It needs 
 >         some symbols from libgcc.a, such as __eh_alloc. It's not possible
 >         to link the xerces-P shared object with libgcc.a, because libgcc.a
 >         is not compiled with -fPIC. Hence we need to have the missing 
 >         symbols in the Perl executable. 
 >         This hack includes the whole libgcc.a in the Perl executable, and
 >         links with c++ so that some mandatory symbols such as __pure_virtual 
 >         are also included. It should go away with GCC-3.0, or if we make a
 >         libgcc.so on day.

 Have you tested whether linking libgcc.a with -whole-archive into the python
 executable fixes the problem you are experiencing?  What was the result?

 	Thanks,

 	-- Johnny Lam <jlam@netbsd.org>

From: slager@mercury.jorsm.com (Brett Slager)
To: jlam@netbsd.org, slager@jorsm.com
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/16144: pkg wxPython won't load
Date: Sun,  7 Apr 2002 16:47:43 -0500 (CDT)

 > Have you tested whether linking libgcc.a with -whole-archive into the python
 > executable fixes the problem you are experiencing?  What was the result?

 Yes, linking libgcc.a into the python executable makes the problem go away.
 Here's the hack I used:

 --- Modules/Makefile.pre.in.original	Mon Oct  9 11:48:09 2000
 +++ Modules/Makefile.pre.in	Sun Apr  7 12:09:56 2002
 @@ -124,7 +124,9 @@
  # This target is used by the master Makefile to link the final binary.
  link:		$(MAINOBJ)
  		$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) $(MAINOBJ) \
 -		  $(LDLIBRARY) $(MODLIBS) $(LIBS) $(SYSLIBS) -o python$(EXE) $(LDLAST)
 +		  $(LDLIBRARY) $(MODLIBS) $(LIBS) $(SYSLIBS) \
 +		  -Wl,-whole-archive -lgcc -Wl,-no-whole-archive \
 +		  -o python$(EXE) $(LDLAST)
  		mv python$(EXE) ../python$(EXE)

  clean:


 -- Brett Slager

From: Johnny Lam <jlam@jgrind.org>
To: Brett Slager <slager@jorsm.com>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/16144: pkg wxPython won't load
Date: Mon, 8 Apr 2002 02:17:45 -0700

 Great news!  I'll find out a cleaner way to incorporate this into pkgsrc
 (we just have to make sure that any changes still work on Linux and Solaris).
 Thanks for doing the legwork on this one.  I'm moving the state of this
 PR to "analyzed".

 	Cheers,

 	-- Johnny Lam <jlam@jgrind.org>

 On Sun, Apr 07, 2002 at 04:47:43PM -0500, Brett Slager wrote:
 > > Have you tested whether linking libgcc.a with -whole-archive into the python
 > > executable fixes the problem you are experiencing?  What was the result?
 > 
 > Yes, linking libgcc.a into the python executable makes the problem go away.
 > Here's the hack I used:
 > 
 > --- Modules/Makefile.pre.in.original	Mon Oct  9 11:48:09 2000
 > +++ Modules/Makefile.pre.in	Sun Apr  7 12:09:56 2002
 > @@ -124,7 +124,9 @@
 >  # This target is used by the master Makefile to link the final binary.
 >  link:		$(MAINOBJ)
 >  		$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) $(MAINOBJ) \
 > -		  $(LDLIBRARY) $(MODLIBS) $(LIBS) $(SYSLIBS) -o python$(EXE) $(LDLAST)
 > +		  $(LDLIBRARY) $(MODLIBS) $(LIBS) $(SYSLIBS) \
 > +		  -Wl,-whole-archive -lgcc -Wl,-no-whole-archive \
 > +		  -o python$(EXE) $(LDLAST)
 >  		mv python$(EXE) ../python$(EXE)
 >  
 >  clean:
 > 
 > 
 > -- Brett Slager
State-Changed-From-To: open->analyzed 
State-Changed-By: jlam 
State-Changed-When: Mon Apr 8 17:46:53 PDT 2002 
State-Changed-Why:  
Fix determined to be correct, but implementation details to incorporate 
into pkgsrc still need to be worked out. 
Responsible-Changed-From-To: pkg-manager->jlam 
Responsible-Changed-By: wiz 
Responsible-Changed-When: Wed Jul 17 09:51:19 PDT 2002 
Responsible-Changed-Why:  
jlam analyzed this one. 

From: Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
To: gnats-bugs@netbsd.org
Cc:  
Subject: pkg/16144
Date: Wed, 17 Jul 2002 19:21:03 +0200

 Just tested on 1.6D -- this problem is gone (which means it's also
 gone in 1.6). The change seems to have been that 'cc -static' now
 links in libgcc_pic.a by default. Could be that I misunderstood
 something, though :)
  Thomas

 -- 
 Thomas Klausner - wiz@danbala.ifoer.tuwien.ac.at
 Intolerance is the last defense of the insecure.

From: Matthias Drochner <drochner@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: pr/16144 CVS commit: pkgsrc/lang
Date: Fri,  6 Jun 2003 17:31:21 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	drochner
 Date:		Fri Jun  6 17:31:21 UTC 2003

 Modified Files:
 	pkgsrc/lang/python: srcdist.mk
 	pkgsrc/lang/python22: Makefile PLIST.common PLIST.common_end distinfo
 	pkgsrc/lang/python22-pth: Makefile PLIST.common PLIST.common_end
 	    distinfo
 	pkgsrc/lang/python22-pth/patches: patch-aa patch-ah patch-ai
 	pkgsrc/lang/python22/patches: patch-aa
 Added Files:
 	pkgsrc/lang/python22/patches: patch-ai

 Log Message:
 update Python22 to 2.2.3
 This is a bugfix release.
 Also, use the LINK_ALL_LIBGCC_HACK just introduced to link the
 interpreter against libgcc. This should fix PR pkg/16144 in the
 Python2.2 (and NetBSD-1.5) case.


 To generate a diff of this commit:
 cvs rdiff -r1.6 -r1.7 pkgsrc/lang/python/srcdist.mk
 cvs rdiff -r1.16 -r1.17 pkgsrc/lang/python22/Makefile
 cvs rdiff -r1.2 -r1.3 pkgsrc/lang/python22/PLIST.common
 cvs rdiff -r1.1 -r1.2 pkgsrc/lang/python22/PLIST.common_end
 cvs rdiff -r1.9 -r1.10 pkgsrc/lang/python22/distinfo
 cvs rdiff -r1.6 -r1.7 pkgsrc/lang/python22-pth/Makefile
 cvs rdiff -r1.1.1.1 -r1.2 pkgsrc/lang/python22-pth/PLIST.common \
     pkgsrc/lang/python22-pth/PLIST.common_end
 cvs rdiff -r1.3 -r1.4 pkgsrc/lang/python22-pth/distinfo
 cvs rdiff -r1.1.1.1 -r1.2 pkgsrc/lang/python22-pth/patches/patch-aa \
     pkgsrc/lang/python22-pth/patches/patch-ah \
     pkgsrc/lang/python22-pth/patches/patch-ai
 cvs rdiff -r1.6 -r1.7 pkgsrc/lang/python22/patches/patch-aa
 cvs rdiff -r0 -r1.1 pkgsrc/lang/python22/patches/patch-ai

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.


From: Matthias Drochner <drochner@netbsd.org>
To: gnats-bugs@gnats.netbsd.org
Cc:  
Subject: pr/16144 CVS commit: pkgsrc/lang
Date: Fri,  6 Jun 2003 18:14:13 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	drochner
 Date:		Fri Jun  6 18:14:12 UTC 2003

 Modified Files:
 	pkgsrc/lang/python15: Makefile distinfo
 	pkgsrc/lang/python20: Makefile distinfo
 	pkgsrc/lang/python21: Makefile distinfo
 	pkgsrc/lang/python21-pth: Makefile distinfo
 	pkgsrc/lang/python21-pth/patches: patch-af
 Added Files:
 	pkgsrc/lang/python15/patches: patch-ab
 	pkgsrc/lang/python20/patches: patch-ad
 	pkgsrc/lang/python21/patches: patch-af

 Log Message:
 add the LINK_ALL_LIBGCC_HACK variable to the interpreter's link line,
 so that dynamic libraries using libgcc functions can be loaded
 should fix PR pkg/16144 by Brett Slager


 To generate a diff of this commit:
 cvs rdiff -r1.3 -r1.4 pkgsrc/lang/python15/Makefile
 cvs rdiff -r1.1 -r1.2 pkgsrc/lang/python15/distinfo
 cvs rdiff -r0 -r1.1 pkgsrc/lang/python15/patches/patch-ab
 cvs rdiff -r1.7 -r1.8 pkgsrc/lang/python20/Makefile
 cvs rdiff -r1.3 -r1.4 pkgsrc/lang/python20/distinfo
 cvs rdiff -r0 -r1.1 pkgsrc/lang/python20/patches/patch-ad
 cvs rdiff -r1.9 -r1.10 pkgsrc/lang/python21/Makefile
 cvs rdiff -r1.10 -r1.11 pkgsrc/lang/python21/distinfo
 cvs rdiff -r1.6 -r1.7 pkgsrc/lang/python21-pth/Makefile \
     pkgsrc/lang/python21-pth/distinfo
 cvs rdiff -r1.1.1.1 -r1.2 pkgsrc/lang/python21-pth/patches/patch-af
 cvs rdiff -r0 -r1.1 pkgsrc/lang/python21/patches/patch-af

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: analyzed->closed 
State-Changed-By: drochner 
State-Changed-When: Fri Jul 25 10:39:53 UTC 2003 
State-Changed-Why:  
this is fixed for a while 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.