[SciPy-user] Building SciPy on OS X: Universal binary issues

Josh Marshall josh.p.marshall at gmail.com
Sun Dec 10 17:22:19 CST 2006


> From: Bill Northcott <w.northcott at unsw.edu.au>
> Subject: Re: [SciPy-user] Building SciPy on OS X: Universal binary
> 	issues
>
> On 08/12/2006, at 6:34 PM, Josh Marshall wrote:
>> I get an error when importing scipy, as follows:
>>
>> ImportError: Failure linking new module: /Library/Frameworks/
>> Python.framework/Versions/2.4/lib/python2.4/site-packages/scipy/
>> special/_cephes.so: Symbol not found: _printf$LDBLStub
>>    Referenced from: /Library/Frameworks/Python.framework/Versions/ 
>> 2.4/
>> lib/python2.4/site-packages/scipy/special/_cephes.so
>>    Expected in: dynamic lookup
>
> These errors are caused by mixing compiler versions.  You cannot link
> object code files/static libraries if some of the code is built with
> gcc3.x.x and some with gcc4.x.x.   gcc3.x.x must be used with g77 and
> gcc4.x.x with gfortran.  You can always link to a dynamic library
> (.dylib) regardless of the compiler that built it or even the
> language of the source code.


I am aware of this inability to mix compilers. What I am stating is  
that the downloadable, binary versions on the MacPython universal  
binaries page have this problem, and they should not. I would like to  
know who built these versions, and how I go about building my own  
universal binary versions.

However, as a related question, if I have both g77 and gfortran  
installed, how do I select gfortran as the compiler? I have tried  
various combinations of lines similar to

python setup.py config --fcompiler=gnu95 build

but g77 is always selected for the build.

Cheers,
Josh


More information about the SciPy-user mailing list