[Pythonmac-SIG] Building VPython on MacOSX..

Marcel Prastawa prastawa@cs.unc.edu
Fri, 15 Feb 2002 10:00:16 -0500


On Friday, February 15, 2002, at 06:51 , Steve Spicklemire wrote:

> I'm trying to build VPython from CVS (www.vpython.org, cvs at sf.net) 
> using "machopython". I'm guessing the easiest way to do this is to use 
> the fink port and XFree86 etc, gtk+, gtkglarea, and so on. I tried 
> this.... and have actually created a 'cvisualmodule.so' on MacOSX 10.1. 
> However when I try to "import cvisual", I get:
>
> [vh10-15:~/Development/cvisual] steve% python -c "import cvisual"
> Traceback (most recent call last):
>   File "<string>", line 1, in ?
> ImportError: Failure linking new module

One common reason for this error is that your binary has unresolved 
symbols. Try running 'nm' on your binary and make sure that you don't have 
any undefined symbols (i.e look for lines such as
"U _foo").

Steve Majewski posted a patch that makes the error message more 
informative. I recommend downloading dynload_darwin.c and use it to 
replace dynload_next.c.

If you do have undefined symbols, the new dynamic loader won't solve your 
problem. At least you'll be able to figure out what went wrong faster.

Marcel