[Python-bugs-list] [ python-Bugs-481969 ] Doesn't build with OOTB Cygwin

noreply@sourceforge.net noreply@sourceforge.net
Thu, 15 Nov 2001 06:30:50 -0800


Bugs item #481969, was opened at 2001-11-14 21:17
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=481969&group_id=5470

Category: Build
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: David Abrahams (david_abrahams)
Assigned to: Michael Hudson (mwh)
Summary: Doesn't build with OOTB Cygwin

Initial Comment:
It looks like it is getting confused because 
SIZEOF_LONG doesn't ever get #defined. I made the 
following patch to pyconfig.h which helped in my case:

--- c:/tools/python2.2/include/pyconfig.h	Thu 
Sep 06 01:32:16 2001
+++ c:/tools/Python-2.2b1/Include/pyconfig.h	Thu 
Nov 15 01:25:00 2001
@@ -193,7 +193,7 @@
 #endif /* BORLANDC */
 
 /* egcs/gnu-win32 defines __GNUC__ and _WIN32 */
-#if defined(__GNUC__) && defined(_WIN32)
+#if defined(__GNUC__) && (defined(_WIN32) || defined
(__CYGWIN__))
 /* XXX These defines are likely incomplete, but 
should be easy to fix. 
    They should be complete enough to build extension 
modules. */
 /* Suggested by Rene Liebscher <R.Liebscher@gmx.de> 
to avoid a GCC 2.91.*
@@ -240,7 +240,7 @@
 #endif
 
 #define HAVE_LONG_LONG 1
-#define LONG_LONG long long 
+#define LONG_LONG long long
 #endif /* GNUC */
 
 /* lcc-win32 defines __LCC__ */


----------------------------------------------------------------------

>Comment By: David Abrahams (david_abrahams)
Date: 2001-11-15 06:30

Message:
Logged In: YES 
user_id=52572

I have Cygwin 1.3.3-2. The latest appears to be 1.3.5-3, 
but I got mine just last week. They seem to release 
something new every few days. I'm using Windows 2000. I've 
also built and installed gcc-3.0.2 on my Cygwin 
installation.

Oh, maybe this has something to do with it: I previously 
built a regular Win32 version of Python using MSVC from the 
same Python source tree.

When I first tried to install Python for Cygwin, I made a 
separate build directory as they recommend for gcc, then 
did a "../Python-2.2b1/configure ; make" but it didn't 
work. If indeed the two builds are conflicting, you might 
consider making this approach possible. The idea is that no 
configuration-specific cruft gets left in the source tree. 
This has two advantages:
1. Rebuilds with the same source for different platforms 
becomes possible
2. You can build from a read-only copy of the sources.

-Dave


----------------------------------------------------------------------

Comment By: Michael Hudson (mwh)
Date: 2001-11-15 05:10

Message:
Logged In: YES 
user_id=6656

You seem to be editing PC/pyconfig.h, but I don't understand
how this file is getting involved in a cygwin build.

How are you building Python?  It works just fine for me
(except for curses, that's a cygwin bug).

Also, have you got the latest version of cygwin?  What
version of windows, etc.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=481969&group_id=5470