From owner-freebsd-questions Wed Apr 7 14:20:48 1999 Delivered-To: freebsd-questions@freebsd.org Received: from pluto.ipass.net (pluto.ipass.net [198.79.53.5]) by hub.freebsd.org (Postfix) with ESMTP id B9C7C14D74 for ; Wed, 7 Apr 1999 14:20:41 -0700 (PDT) (envelope-from rhh@ipass.net) Received: from stealth.ipass.net. (ts2-105-ppp.ipass.net [207.120.205.105]) by pluto.ipass.net (8.9.1a/8.9.1) with ESMTP id RAA26025; Wed, 7 Apr 1999 17:18:35 -0400 (EDT) Received: (from rhh@localhost) by stealth.ipass.net. (8.9.1/8.8.8) id RAA04970; Wed, 7 Apr 1999 17:18:36 -0400 (EDT) (envelope-from rhh) Date: Wed, 7 Apr 1999 17:18:35 -0400 From: Randall Hopper To: Rich Fox Cc: questions@freebsd.org Subject: RealServer G2 & __pure_virtual ld.so failure Message-ID: <19990407171835.A4636@ipass.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG |Re: Subject: ld.so failure: Undefined Symbol in precompiled binary... I just had this same problem just a few minutes ago, but on 3.0-R and with a package I was compiling myself. I had just built VTK (Visualization Toolkit: www.kitware.com) for FreeBSD, and when trying to dynamically load the VTK Python libraries into the python interpreter, I saw this same error: Traceback (innermost last): File "Cone.py", line 3, in ? from libVTKCommonPython import * ImportError: /opt/pkg/vtk/lib/libVTKCommonPython.so: Undefined symbol "__pure_virtual" Turns out, this is defined in /usr/lib/libgcc.a, and there is no libgcc.so. Odd. So I added -lgcc to the shared library link line. Then libstdc++.so started complained about not being able to find some symbol which was defined in libgcc (__unwind_function), so I figured it was expecting libstdc++ to come first. Odd. Sure enough, hacking the shared library link line to contain -lstdc++ -lgcc did the trick. I don't know why this was needed. Anyone? In your case, it may be you're trying to dload something C++ and it has this same problem. If you were on an elf kernel, you might be able to extract libgcc.a's .o's and make a libgcc.so which you could LD_PRELOAD (maybe). But on 2.2.7 I don't have anything to suggest. Randall To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message