[SciPy-user] Compiling scipy with ifort on an intel Mac

Robert Kern robert.kern at gmail.com
Tue Mar 7 16:48:31 CST 2006


Rob Hetland wrote:
> I have had a hard time getting g77 compiled on my intel Mac, but I do  
> have a beta version of the intel fortran compiler for the Mac...  So,  
> I am trying to get scipy compiled with ifort.
>
> I get an error like that shown below.  I get a similar error when  
> trying to use f2py.  I should note that numpy (other than f2py)  
> compiles fine.  I am such a hack when it comes to these things -- I'm  
> sure I am doing something stupid.  I have tried a number of things --  
> I have the regular Mac python, and a fresh install in /usr/local, but  
> both fail in the same way.   I have tried including/excluding some of  
> the obvious compiler flags such as -nofor_main.  It seems that the  
> linker can't find the python libraries.  Including -lpython reduces  
> the list of undefined symbols, but _MAIN__ still remains.
> 
> Can someone point me to the truth?

Not having an Intel Mac, I'm not sure what needs to be done. You might try
adding the following flag to the linker_so command.

  -Wl,-bundle,-flat_namespace,-undefined,suppress

You may need to check ifort's manual for the appopriate way to pass options to
the underlying linker. I took this example from ibm.py.

Probably, the linker_so command will also need the equivalent of "-framework
Python". If ifort accepts that directly, all the better. If not, then it may
need to be "escaped" like the above flag is "escaped".

-- 
Robert Kern
robert.kern at gmail.com

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco



More information about the SciPy-user mailing list