[SciPy-dev] Cygwin build problems

Jochen Küpper jochen at unc.edu
Sat Apr 6 22:17:46 EST 2002


Just tried to build scipy on Cygwin.  The last install I did has been
on Jan 18, if I see that correctly.

A few problems:

I reported at least twice before that log2 is defined by math.h on
Cygwin, so the following (or similar) is needed
,----
| Index: special/cephes.h
| ===================================================================
| RCS file: /home/cvsroot/world/scipy/special/cephes.h,v
| retrieving revision 1.3
| diff -u -r1.3 cephes.h
| --- special/cephes.h    2002/02/24 07:09:49     1.3
| +++ special/cephes.h    2002/04/07 03:05:09
| @@ -103,7 +103,9 @@
|  /*
|  extern int levnsn ( int n, double r[], double a[], double e[], double refl[] );
|  */
| +#ifndef log2
|  extern double log2 ( double x );
| +#endif
|  /*
|  extern long lrand ( void );
|  extern long lsqrt ( long x );
| Index: special/cephes/protos.h
| ===================================================================
| RCS file: /home/cvsroot/world/scipy/special/cephes/protos.h,v
| retrieving revision 1.3
| diff -u -r1.3 protos.h
| --- special/cephes/protos.h     2002/02/24 07:09:50     1.3
| +++ special/cephes/protos.h     2002/04/07 03:05:09
| @@ -101,7 +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 );
| +#ifndef log2
|  extern double log2 ( double x );
| +#endif
|  extern long lrand ( void );
|  extern long lsqrt ( long x );
|  extern int minv ( double A[], double X[], int n, double B[], int IPS[] );
`----

More over I get link-errors that -lpython2.2 cannot be found:
,----
| g77 -shared build/temp.cygwin-1.3.10-i686-2.2/fortranobject.o build/temp.cygwin-1.3.10-i686-2.2/fblasmodule.o -L/usr/local/lib -L/usr/local/lib -llapack -lf77blas -lcblas -latlas -lpython2.2 -lg2c -o build/lib.cygwin-1.3.10-i686-2.2/scipy/linalg/fblas.dll
| /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/../../../../i686-pc-cygwin/bin/ld: cannot find -lpython2.2
| collect2: ld returned 1 exit status
| error: command 'g77' failed with exit status 1
`----
I can solve this by manually adding -L/usr/lib/python2.2/config to the
link line.  Ok, so I automate that by providing a site.cfg...
,----
| [DEFAULT]
| lib_dir = /usr/local/lib:/opt/lib:/usr/lib:/lib:/usr/lib/python2.2/config
`----
But all I get is an error
,----
| python setup.py build
| atlas_info:
|   FOUND:
|     libraries = ['lapack', 'f77blas', 'cblas', 'atlas']
|     library_dirs = ['/usr/local/lib', '/usr/local/lib']
| 
| file: build/generated_pyfs/flapack.pyf
| file: build/generated_pyfs/clapack.pyf
| file: build/generated_pyfs/fblas.pyf
| file: build/generated_pyfs/cblas.pyf
| ### Little Endian detected ####
| x11_info:
|   NOT AVAILABLE
| 
| ### Little Endian detected ####
| Traceback (most recent call last):
|   File "setup.py", line 127, in ?
|     install_package()
|   File "setup.py", line 110, in install_package
|     config_dict = merge_config_dicts(config)
|   File "scipy_distutils/misc_util.py", line 290, in merge_config_dicts
|     result[key].extend(d.get(key,[]))
| AttributeError: 'NoneType' object has no attribute 'get'
`----

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




More information about the SciPy-Dev mailing list