[SciPy-user] Undefined symbol __MAIN__: Help needed with Scipy on OS X

Rick Muller rmuller at sandia.gov
Mon Oct 10 09:42:40 CDT 2005


(Pearu: copying you since this also fixes the f2py bug I emailed you  
about. Wasn't f2py's fault at all. Sorry about that.)

PROBLEM FIXED. Here's what I did wrong:

I'm using gcc 4.0.0 (which is the default under Xcode2, I believe),  
and g77 3.4.3. I'm using Python 2.3.5 (the "framework" build on OS X).

The problem arises from the scipy_distutils package. When I try to  
install the packages using the stock distutils I get the error message:

/usr/bin/ld: can't locate file for: -lcc_dynamic
collect2: ld returned 1 exit status

during the first link attempt. I did some googling around and found  
that the line:
             opt.extend(["-lcc_dynamic","-bundle"])
in the gnufcompiler.py file could be a culprit.

WHAT I DID WRONG:
I tried commenting out this line. That's a bad idea, and leads to the  
problem I reported. However, when I just removed the "-lcc_dynamic"  
part, it worked. Up until the time that I hit what looks like the  
standard scipy/gcc 4.0.0 bugs. Sigh. But at least the install and the  
f2py stuff is working now



R.


On Oct 10, 2005, at 7:50 AM, Robert Kern wrote:

> Rick Muller wrote:
>
>> I'm trying to compile scipy 0.3.2 under Macintosh OS X 10.4. I'm
>> seeing the error message when I link:
>>
>> /usr/bin/ld: Undefined symbols:
>> _MAIN__
>>
>>
>> Any hint as to what's wrong?
>>
>
> Not a clue! What compilers are you using? I recommend gcc 3.3 and g77
> 3.4. Which Python are you using?
>
> -- 
> Robert Kern
> rkern at ucsd.edu
>
> "In the fields of hell where the grass grows high
>  Are the graves of dreams allowed to die."
>   -- Richard Harter
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user
>
>




More information about the SciPy-user mailing list