Subject: SciPy on Cygwin
From: "Jochen Küpper" <[email-masked]>
To: [email-masked]
Cc: Cygwin <[email-masked]>
Date: 27 Sep 2001 10:26:13 -0400

I am trying to compile SciPy (cvs) on latest Cygwin (all packages
besides postgresql, irc installed). Anybody got that going?

- gcc version 2.95.3-5 (cygwin special)
- Python 2.1.1 (#2, Sep 26 2001, 09:32:53) 
  [GCC 2.95.3-5 (cygwin special)] on cygwin
- NumPy from cvs as of today

The problem I am running into in linalg is that I get compile errors
in flapackmodule.c:
,----
| linalg/flapackmodule.c:447: initializer element is not constant
| linalg/flapackmodule.c:502: initializer element is not constant
| linalg/flapackmodule.c:557: initializer element is not constant
| linalg/flapackmodule.c:616: initializer element is not constant
`----

The respective code is 
,----[flapackmodule.c: 447]
| PyObject *cb_cselect_in_cgees__user__routines_capi = Py_None;
`----

I am not sure what to do about that?

To get so far I had to do the following changes:

a) Add /usr/local/lib to ATLAS search-path:

Index: setup.py
===================================================================
RCS file: /home/cvsroot/world/scipy/setup.py,v
retrieving revision 1.56
diff -u -r1.56 setup.py
--- setup.py    2001/09/21 08:29:55     1.56
+++ setup.py    2001/09/27 14:23:14
@@ -96,7 +96,7 @@
     local_atlas1 = os.path.join(path,platform[:-1],'atlas')
  
     # first look for a system defined atlas directory
-    dir_search = ['/usr/local/lib/atlas','/usr/lib/atlas',
+    dir_search = ['/usr/local/lib/atlas','/usr/lib/atlas', '/usr/local/lib',
                   local_atlas0, local_atlas1]
     for directory in dir_search:
         if os.path.exists(directory):

b) In the cephes module I had to undefine the log2 macro from
/usr/include/math.h to make it compile:

Index: special/cephes.h
===================================================================
RCS file: /home/cvsroot/world/scipy/special/cephes.h,v
retrieving revision 1.1
diff -u -r1.1 cephes.h
--- special/cephes.h    2001/06/20 05:29:41     1.1
+++ special/cephes.h    2001/09/27 14:19:50
@@ -102,6 +102,9 @@
 /*
 extern int levnsn ( int n, double r[], double a[], double e[], double refl[] );
 */
+#ifdef log2 /* some systems have log2 as a macro */
+#  undef log2
+#endif
 extern double log2 ( double x );
 /*
 extern long lrand ( void );
Index: special/cephes/protos.h
===================================================================
RCS file: /home/cvsroot/world/scipy/special/cephes/protos.h,v
retrieving revision 1.2
diff -u -r1.2 protos.h
--- special/cephes/protos.h     2001/07/03 08:32:00     1.2
+++ special/cephes/protos.h     2001/09/27 14:19:50
@@ -101,6 +101,9 @@
 extern int levnsn ( int n, double r[], double a[], double e[], double refl[] );
 extern double log ( double x );
 extern double log10 ( double x );
+#ifdef log2 /* some systems have log2 as a macro */
+#  undef log2
+#endif
 extern double log2 ( double x );
 extern long lrand ( void );
 extern long lsqrt ( long x );

Any help appreciated...

Greetings,
Jochen
-- 
University of North Carolina                          phone: 919-962-4403
Department of Chemistry                               phone: 919-962-1579
Venable Hall CB#3290                                    fax: 919-843-6041
Chapel Hill, NC 27599, USA                            GnuPG key: 44BCCD8E

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/