Gary Pajer | 3 Jan 2004 12:59
Picon
Favicon

compiling on Windows: getting closer

My hobby of getting scipy to compile on Windows is getting closer to
completion.
(full report when it's finished)

Briefly:  I have Enthought Edition 2.3 and ATLAS and LAPACK compiled from
current sources (libraries merged)
I compiled ATLAS and LAPACK in the cygwin bash shell using the lastest
cygwin compiler.

I'm compiling scipy in a DOS shell using the Mingw32 compiler that comes
with the Enthought Edition using setup_no_chaco.py (that's a separate
problem :)   )

THe build chugs along for quite some time until  it fails while trying to
make the specfun library with error:

---------------------------------------------------------------------------
Lib\special\specfun\specfun.f:1513: Internal compiler error in
emit_swap_insn, a
t reg-stack.c:990
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
error: failure during compile (exit status = 1)
---------------------------------------------------------------------------

any clues?
-gary
Pearu Peterson | 3 Jan 2004 15:35
Favicon

Re: compiling on Windows: getting closer


On Sat, 3 Jan 2004, Gary Pajer wrote:

> My hobby of getting scipy to compile on Windows is getting closer to
> completion.
> (full report when it's finished)
> 
> Briefly:  I have Enthought Edition 2.3 and ATLAS and LAPACK compiled from
> current sources (libraries merged)
> I compiled ATLAS and LAPACK in the cygwin bash shell using the lastest
> cygwin compiler.
> 
> I'm compiling scipy in a DOS shell using the Mingw32 compiler that comes
> with the Enthought Edition using setup_no_chaco.py (that's a separate
> problem :)   )
> 
> THe build chugs along for quite some time until  it fails while trying to
> make the specfun library with error:
> 
> ---------------------------------------------------------------------------
> Lib\special\specfun\specfun.f:1513: Internal compiler error in
> emit_swap_insn, a
> t reg-stack.c:990
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
> error: failure during compile (exit status = 1)
> ---------------------------------------------------------------------------
> 
> any clues?
(Continue reading)

Gary Pajer | 3 Jan 2004 16:23
Picon
Favicon

Re: compiling on Windows: getting closer


> On Sat, 3 Jan 2004, Gary Pajer wrote:
>
> > My hobby of getting scipy to compile on Windows is getting closer to
> > completion.
> > (full report when it's finished)
> >
> > Briefly:  I have Enthought Edition 2.3 and ATLAS and LAPACK compiled
from
> > current sources (libraries merged)
> > I compiled ATLAS and LAPACK in the cygwin bash shell using the lastest
> > cygwin compiler.
> >
> > I'm compiling scipy in a DOS shell using the Mingw32 compiler that comes
> > with the Enthought Edition using setup_no_chaco.py (that's a separate
> > problem :)   )
> >
> > THe build chugs along for quite some time until  it fails while trying
to
> > make the specfun library with error:
> >
>
> --------------------------------------------------------------------------
-
> > Lib\special\specfun\specfun.f:1513: Internal compiler error in
> > emit_swap_insn, a
> > t reg-stack.c:990
> > Please submit a full bug report,
> > with preprocessed source if appropriate.
> > See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
(Continue reading)

Pearu Peterson | 3 Jan 2004 16:55
Favicon

Re: compiling on Windows: getting closer


On Sat, 3 Jan 2004, Gary Pajer wrote:

> > > Lib\special\specfun\specfun.f:1513: Internal compiler error in
> > > emit_swap_insn, a
> > > t reg-stack.c:990
> > > Please submit a full bug report,
> > > with preprocessed source if appropriate.
> > > See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
> > > error: failure during compile (exit status = 1)
> >
> > --------------------------------------------------------------------------
> -
> > >
> > > any clues?
> >
> > Could you try to find a work around to this compiler bug?
> > Or just comment the offending function in specfun.f out in
> > order to complete scipy completion.
> >
> > Pearu
> 
> OK, I'll do that.
> This is really a compiler bug?

Yes, any 'Internal compiler error' indicates a bug in compiler.
google emit_swap_insn gives more info.

> I'm an amateur and hence wasn't sure exactly what the message meant.
> What compiler do the pros use?
(Continue reading)

James R. Phillips | 3 Jan 2004 21:53
Favicon

Simple least-squares curve fitting example

Here is a linear least squares curvefitting example
for the distribution if you would like to use it.

     James Phillips
     http://zunzun.com

import scipy.linalg.basic

xdata = [5.357, 5.457, 5.797, 5.936, 6.161, 6.697, 6.731, 6.775, 8.442, 9.769, 9.861]
ydata = [0.376, 0.489, 0.874, 1.049, 1.327, 2.054, 2.077, 2.138, 4.744, 7.068, 7.104]
matrix = []

for x in xdata:
    matrix.append([1.0, x, x*x]) # for y = a + bx + cx^2

coeffs = scipy.linalg.basic.lstsq(matrix, ydata)[0]

print "scipy.linalg.basic.lstsq curve fitting example"
print "fitting data to quadratic equation y = a + bx + cx^2"

print "yields:  x data     y data    calc value   error"
for i in range(len(xdata)):
    ycalc = coeffs[0] + coeffs[1] * xdata[i] + coeffs[2] * xdata[i] * xdata[i]
    error = ycalc - ydata[i]
    print "         % .3f    % .3f      % .3f    % .3f" % (xdata[i], ydata[i], ycalc, error)
print
Gary Pajer | 4 Jan 2004 00:49
Picon
Favicon

Re: compiling on Windows: getting closer

> Could you try to find a work around to this compiler bug?
> Or just comment the offending function in specfun.f out in
> order to complete scipy completion.
>
> Pearu

Compiling on Windows, continued.
I short-circuited the functions in specfun.f that were causing problems.
Those functions are RMN2L and ASWFB, the radial and angular prolate and
oblate spherical functions of the first kind.
Hopefully, I've not created a land mine.  Now specfun.f compiles to
completion.

But I have a new problem, one that looks odd to my eye.  See below.  Is
there a command called "g" ?

BTW, if anyone can tell me that they've built scipy on Windows, and how they
did it, please contact me.
How did the Enthought people do it?

-gary

----------------------------------------------------------------------------
-----------------
c:\mingw\bin\gcc.exe -O2 -w -Wstrict-prototypes -IC:\PYTHON23\include -IC:\P
YTHO
N23\PC -c Lib\cluster\src/vq_wrap.cpp -o
build\temp.win32-2.3\Release\lib\cluste
r\src\vq_wrap.o
g -shared
(Continue reading)

Pearu Peterson | 4 Jan 2004 12:23
Favicon

weave moved to scipy_core in CVS


Hi,

weave module is now moved to scipy_core. This simplifies building 
scipy/chaco modules that need weave (that might not be installed
when first checking out scipy/chaco modules).

So, when updating scipy or chaco_all or any other CVS module that
contained weave then you'll probably see the following message:

  cvs server: cannot open directory /home/cvsroot/world/scipy/Lib/weave: \
    No such file or directory

In that case you should remove your local copy of weave (or if you have
made changes to local weave then make a backup) and re-run 'cvs update'
or 'cvs co weave'.

Regards,
Pearu
Gary Pajer | 4 Jan 2004 15:24
Picon
Favicon

Re: weave moved to scipy_core in CVS

> Hi,
> 
> weave module is now moved to scipy_core. This simplifies building 
> scipy/chaco modules that need weave (that might not be installed
> when first checking out scipy/chaco modules).

Pearu,

setup_no_chaco.py has vanished.

-gary
Pearu Peterson | 4 Jan 2004 16:18
Picon
Picon
Favicon

Re: weave moved to scipy_core in CVS


On Sun, 4 Jan 2004, Gary Pajer wrote:

> > Hi,
> > 
> > weave module is now moved to scipy_core. This simplifies building 
> > scipy/chaco modules that need weave (that might not be installed
> > when first checking out scipy/chaco modules).
> 
> setup_no_chaco.py has vanished.

Yes. Use setup.py instead. Chaco won't be build under scipy anymore.

Pearu
Brett G. Olivier | 5 Jan 2004 21:56
Picon
Picon

Re: compiling on Windows: getting closer

Hi

I have also been trying to compile scipy under windows using MinGW and
experienced similar problems. However, inspired by this thread, I seem to
have found a way that works with my set up. I've included build
environment details at the end of this message.

Here is the procedure I followed:

++++++++ Compiling scipy on windows ++++++++++++

First, I uncomment the ignore packages bit in setup.py to not build sparse
and chaco and set up the atlas path. Then try to build with:

python setup.py build --compiler=mingw32

This fails with the compiler error as discussed in this thread:

"Lib\special\specfun\specfun.f:1513: internal compiler error: in
emit_swap_ins
at reg-stack.c:987"

Some preliminary investigation has revealed that the -O2 and -O3 flag
seems to cause the compiler error when building specfun.f so I go to
Lib\special\specfun and build specfun.f without optimization (removing the
offending functions allows a successful compile but leads to many scary
link errors later on). I just used the setup compile call without the -O3
flag:

g77 -Wall -fno-second-underscore -funroll-loops -march=pentium3
(Continue reading)


Gmane