[SciPy-dev] specfun compile errors on windows

Pearu Peterson pearu at scipy.org
Mon Jan 19 14:20:46 CST 2004

On Mon, 19 Jan 2004, Travis N. Vaught wrote:

> Greetings,
> I finally have taken the time to look at our nightly builds of scipy for
> win32 and noticed that specfun is not compiling--as some have reported
> here:
> http://www.scipy.org/site_content/mailman?fn=scipy-user/2004-January/002
> 457.html
> and a link to the threaded discussion is here:
> http://www.scipy.org/site_content/mailman?fn=scipy-user/2004-January/thr
> ead.html
> Specifically you get an 'internal compiler error' when you have -O3 set
> (using no optimization setting seems to work).
> I've tried it with gcc ~3.2 and it compiles fine but 3.2.3 and a 3.3.1
> (that comes with cygwin) were not able to compile it.
> Since specfun.f is a rather large file it would be impossible for me to
> reduce this to a simple case for reporting to the g77 folks or finding a
> workaround.  Does anyone (Travis O.?) want to take a stab at this?  (It
> would stink to have to specify gcc 3.2 or below as a build requirement
> on windows.)

One possible workaround that might be worth to try is to separate the two 
offending functions (RMN2L and ASWFB) in specfun.f to two different
files (rmn2l.f and aswfb.f). Hopefully, g77 will compile them with -O3.
If not, then at least the sizes of files are much smaller in order
to find a workaround.

Note that I am currently working on scipy_distutils and there might be
a simple way to use different compiler flags for different sources.
But in order to keep it simple, the sources should reside in different
directories (that should contain setup.cfg files where it is possible
to enable/disable optimization flags). So, this gives another solution
if nothing else will work.


More information about the Scipy-dev mailing list