[SciPy-user] Build regression: return of restFP/saveFP problems on OS X?

Zachary Pincus zpincus at stanford.edu
Mon Mar 20 21:08:14 CST 2006

Hi folks,

I've been building svn versions of scipy just fine for some months  
now, following Chris Fonnesbeck's instructions on the wiki. (Short  
version: use gcc3.3, get g77 from the hpc repository.)

Today I updated to the latest svn scipy, and I now cannot get scipy  
to compile because of link errors saying that restFP and saveFP are  
not defined. These problems used to be endemic with scipy and OS X,  
but they were fixed some time ago. It looks like they have been re- 
introduced recently, though.

The link errors look like this:
/usr/local/bin/g77 -undefined dynamic_lookup -bundle build/ 
-L/usr/local/lib/gcc/powerpc-apple-darwin7.9.0/3.4.4 -Lbuild/ 
temp.darwin-8.5.0-Power_Macintosh-2.4 -lquadpack -llinpack_lite - 
lmach -lg2c -o build/lib.darwin-8.5.0-Power_Macintosh-2.4/scipy/ 
/usr/bin/ld: build/temp.darwin-8.5.0-Power_Macintosh-2.4/Lib/ 
integrate/_quadpackmodule.o has external relocation entries in non- 
writable section (__TEXT,__text) for symbols:

The solution is, as it has ever been, to add -lcc_dynamic to the link  

So, were some changes made in a setup file which removed the - 
lcc_dynamic option? OS X users still need that, I think.

There is also a secondary build problem. I tried to fix the issue by  
setting LDFLAGS as follows: 'setenv LDFLAGS -lcc_dynamic'. However,  
in this case setup.py will no longer provide the '-undefined lookup'  
and '-bundle' options, which are also necessary. I think that the  
LDFLAGS in the environment should be *appended to* the flags that  
setup.py selects, and not replace them. (Others may disagree.)

In any case, this is all moot since the '-lcc_dynamic' option only  
works if it is listed *after* the '-L/usr/local/lib/gcc/powerpc-apple- 
darwin7.9.0/3.4.4' part of the g77 command line, but the LDFLAGS are  
put before it. Not sure if this is as it should be... but that's  
beside the point anyhow.

Anyhow, where is the setup file I need to edit to get -lcc_dynamic  
back on the link line? And can this change (or something similar)  
work its way back into the svn version, so that scipy continues to  
build on OS X?


More information about the SciPy-user mailing list