Date: Wed, 7 Apr 1999 17:18:35 -0400 From: Randall Hopper <aa8vb@ipass.net> To: Rich Fox <rich@f2sys.net> Cc: questions@freebsd.org Subject: RealServer G2 & __pure_virtual ld.so failure Message-ID: <19990407171835.A4636@ipass.net>
next in thread | raw e-mail | index | archive | help
|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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990407171835.A4636>