[Python-bugs-list] [ python-Bugs-660946 ] import.c compile fails on cygwin

noreply@sourceforge.net noreply@sourceforge.net
Thu, 02 Jan 2003 13:14:21 -0800


Bugs item #660946, was opened at 2003-01-01 23:14
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=660946&group_id=5470

Category: Build
Group: None
>Status: Closed
Resolution: Works For Me
Priority: 5
Submitted By: Paul Swartz (z3p)
Assigned to: Jason Tishler (jlt63)
Summary: import.c compile fails on cygwin

Initial Comment:
Using Python CVS, Python/import.c compile fails.  GCC 
3.2, Cygwin 1.3.17.

Message is below:
gcc -c  -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -
I./Include  -DPy_BUILD_CORE -o Python/import.o 
Python/import.c
Python/import.c:1376:21: windows.h: No such file or 
directory
Python/import.c: In function `case_ok':
Python/import.c:1410: `WIN32_FIND_DATA' undeclared 
(first use in this function)
Python/import.c:1410: (Each undeclared identifier is 
reported only once
Python/import.c:1410: for each function it appears in.)
Python/import.c:1410: parse error before "data"
Python/import.c:1411: `HANDLE' undeclared (first use in 
this function)
Python/import.c:1413: `MAX_PATH' undeclared (first 
use in this function)
Python/import.c:1421: `h' undeclared (first use in this 
function)
Python/import.c:1421: warning: implicit declaration of 
function `FindFirstFile'
Python/import.c:1421: `data' undeclared (first use in this 
function)
Python/import.c:1425: `INVALID_HANDLE_VALUE' 
undeclared (first use in this function)
Python/import.c:1431: warning: implicit declaration of 
function `FindClose'
Python/import.c:1413: warning: unused variable `tempbuf'
make: *** [Python/import.o] Error 1

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

>Comment By: Paul Swartz (z3p)
Date: 2003-01-02 16:14

Message:
Logged In: YES 
user_id=123843

Yes, reinstalling GCC seemed to do it.  I still don't know what 
broke, but it wasn't Python :)

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

Comment By: Paul Swartz (z3p)
Date: 2003-01-02 15:45

Message:
Logged In: YES 
user_id=123843

Adding /usr/include/w32api to the include list in the Makefile 
seems to work, which makes me think it may be a gcc 
problem.  I'm going to try reinstalling it, I'll see what happens.

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

Comment By: Paul Swartz (z3p)
Date: 2003-01-02 14:33

Message:
Logged In: YES 
user_id=123843

Used to compile, now it doesn't.  I compiled it as of Jan 1 
2003, 12:04:35.  I'm using gcc 3.2-3

Cygwin Package Information
Package             Version             
gcc                 3.2-3   

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

Comment By: Jason Tishler (jlt63)
Date: 2003-01-02 14:23

Message:
Logged In: YES 
user_id=86216

Did this used to compile for you and now doesn't? Or,
is this your first time trying to compile under Cygwin?

BTW, what version of gcc are you using?

$ cygcheck -c gcc
Cygwin Package Information
Package             Version             
gcc                 3.2-3

This may no longer work with gcc 2.95.3-5.

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

Comment By: Paul Swartz (z3p)
Date: 2003-01-02 14:09

Message:
Logged In: YES 
user_id=123843

Paul@MOO% cygcheck -c 
w32api;zcat /etc/setup/w32api.lst.gz |fgrep windows
Cygwin Package Information
Package             Version             
w32api              2.1-1               

Use -h to see help about each section
usr/include/w32api/windows.h
usr/include/w32api/windowsx.h

Paul@MOO% ls -
l /usr/include/w32api/windows.h  /usr/src/python/dist/src 
[14:06]
-rwx------+   1 Paul     None         2807 Nov 25 
15:21 /usr/include/w32api/windows.h

I reinstalled w32api, still the same problem.

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

Comment By: Jason Tishler (jlt63)
Date: 2003-01-02 11:03

Message:
Logged In: YES 
user_id=86216

> Jason are you having this problem?

No.

> Should windows.h be included?

Yes.

This is user error. Paul did not install the w32api package:

$ cygcheck -c w32api
Cygwin Package Information
Package             Version             
w32api              2.1-1

$ zcat /etc/setup/w32api.lst.gz | fgrep windows
usr/include/w32api/windows.h

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

Comment By: Neal Norwitz (nnorwitz)
Date: 2003-01-02 10:31

Message:
Logged In: YES 
user_id=33168

Jason are you having this problem?  Note the first error:
  windows.h: No such file or directory 

Should windows.h be included?

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

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