[Numpy-discussion] Re: Cygwin compilation

Jochen Küpper jochen at jochen-kuepper.de
Tue Sep 30 07:00:04 EDT 2003


With the current patch agianst cvs HEAD numarray compiles and passes
all tests on current Cygwin:

cvs diff -u generate.py ChangeLog
Warning: No xauth data; using fake authentication data for X11 forwarding.
Index: generate.py
===================================================================
RCS file: /cvsroot/numpy/numarray/generate.py,v
retrieving revision 1.14
diff -u -u -r1.14 generate.py
--- generate.py 16 Sep 2003 20:02:41 -0000      1.14
+++ generate.py 30 Sep 2003 13:56:25 -0000
@@ -51,6 +51,9 @@
     LP64, HAS_UINT64, HAS_FLOAT128 = 0, 1, 0
 elif sys.platform == "win32":
     LP64, HAS_UINT64, HAS_FLOAT128 = 0, 0, 0
+elif sys.platform == "cygwin":
+    LP64, HAS_UINT64, HAS_FLOAT128 = 0, 1, 0
+    EXTRA_LINK_ARGS += ["-L/lib", "-lm", "-lc", "-lgcc", "-L/lib/mingw", "-lmingwex"]
 elif sys.platform == "darwin":
     LP64, HAS_UINT64, HAS_FLOAT128 = 0, 1, 0
     EXTRA_COMPILE_ARGS.extend(["-Ddarwin"])
Index: ChangeLog
===================================================================
RCS file: /cvsroot/numpy/numarray/ChangeLog,v
retrieving revision 1.1
diff -u -u -r1.1 ChangeLog
--- ChangeLog   20 Apr 2002 16:13:38 -0000      1.1
+++ ChangeLog   30 Sep 2003 13:56:25 -0000
@@ -1,3 +1,13 @@
+2003-09-30  Jochen Küpper  <jochen at jochen-kuepper.de>
+
+       * generate.py (codeargs): Add cygwin case to link against libmingwex.
+       This is a little tricky as _ufinc.dll needs to be linked against
+       libmingwex, but libnumarray.dll normally picks up wrong symbols from
+       this library. Therefore we explicitely add libm, libc, and libgcc before
+       the mingw libraries to avoid the latter and still have them available to
+       resolve the FE symbols. We also explicitely have to add -L/lib before
+       -L/lib/mingw to check for normal cygwin libraries first.
+ 
 2002-04-20  Jochen Küpper  <jochen at jochen-kuepper.de>
 
        * MANIFEST.in: Updated.  
@@ -9,5 +19,5 @@
 
        * Local Variables:
        * mode: auto-fill
-       * fill-column: 79
+       * fill-column: 80
        * End:

Greetings,
Jochen
-- 
Einigkeit und Recht und Freiheit                http://www.Jochen-Kuepper.de
    Liberté, Égalité, Fraternité                GnuPG key: CC1B0B4D
        (Part 3 you find in my messages before fall 2003.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 185 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20030930/52dccffd/attachment.sig>


More information about the NumPy-Discussion mailing list