[Python-bugs-list] [Bug #112786] Build under Cygwin fails

noreply@sourceforge.net noreply@sourceforge.net
Sun, 17 Sep 2000 05:41:47 -0700


Bug #112786, was updated on 2000-Aug-26 01:39
Here is a current snapshot of the bug.

Project: Python
Category: Build
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 3
Summary: Build under Cygwin fails

Details: Py1.6b1
========
1) socketmodule.c -- looks for netinet/tcp.h, which does not exist on cygwin.

2) gcc   python.o \
          ../libpython1.6.a    -lm  -o python
python.o: In function `main':
/usr/local/bin/Python-1.6b1/Modules/python.c:12: undefined reference to `Py_Main


Follow-Ups:

Date: 2000-Sep-07 15:04
By: jhylton

Comment:
Please do triage on this bug.
-------------------------------------------------------

Date: 2000-Sep-13 04:13
By: gvanrossum

Comment:
I don't have cygwin. Does anyone here have cygwin? I know Tim said the cygwin installer failed for him, so he doesn't have it. Is there someone outside the PythonLabs to whom we could assign this?
-------------------------------------------------------

Date: 2000-Sep-16 01:56
By: tim_one

Comment:
A fellow named Norman mailto:nhv@yahoo.com posted to c.l.py with some evidence of real Cygwin knowledge, so I emailed him a link to this bug and asked whether he'd help out.
-------------------------------------------------------

Date: 2000-Sep-16 20:29
By: nhv

Comment:
Hi I am that fellow Norman

FYI I have been doing bi-weekly builds of the Python CVS source with the 'current' Cygwin distribution for about a year.

I sent Tim my small set of diffs

Basically threading with Cygwin Python is still broken
and dll building with Cygwin has some problems but other then that everything including tkinter works for me with very minor changes.

FWIW We are succesfully embedding Python in PrettyPoly
http://prettypoly.sourceforge.net and I am using Cygwin
as my development enviroment for this

If helpful I can mail someone my diffs and the results of make test after each of my CVS sessions or apon request

Also FWIW I build Cygwin from source and have access to the Cygwin development team

I will help in anyway I can to make Python compile with Cygwin 'out of the box'  


Norman Vine nhv@yahoo.com

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

Date: 2000-Sep-17 05:41
By: tim_one

Comment:
Here's the body of email from Norman:

I will certainly help in anyway that I can :-)

Below is a diff of my PY_SRC and the Python CVS at SourceForge

specifically

1) socketmodule.c -- looks for netinet/tcp.h, which does not exist on cygwin.

Cygwin does not have netinet / tcp.h
There has been some discussion about including a dummy tcp.h
into the distribution but I am noy sure that this is a standard header ?
see
http://sources.redhat.com/ml/cygwin/2000-09/msg00011.html

2) gcc python.o \
../libpython1.6.a -lm -o python
python.o: In function `main':
/usr/local/bin/Python-1.6b1/Modules/python.c:12: undefined reference to
`Py_Main

Before rerunning make after a failed build it is occasionally necessary to from top_level python_src directory it is necessary to do
% rm *.a *.o *.exe
I believe that this will solve this problem

I am working with the 2.0 srource tree though and I notice that this is reported against the 1.6 tree


IMHO the two main 'issues'  with Python and Cygwin remaining
are threads and dll support.

I am working on the dll stuff and am aware of Distutils

The thread stuff is beyond me and I could use some help.

I will gladly be a Cygwin 'tester' for Python.

and can forward Cygwin specific Python questions that
I can not answer directly to the appropriate Cygwin list(s)

Cheers

Norman


Index: _tkinter.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_tkinter.c,v
retrieving revision 1.111
diff -r1.111 _tkinter.c
0a1
>
60,62c61,63
< #if !defined(MS_WINDOWS)
< #define HAVE_CREATEFILEHANDLER
< #endif
---
> //#if !(defined(MS_WINDOWS) || defined(__CYGWIN__))
> //#define HAVE_CREATEFILEHANDLER
> //#endif
64a66
> #undef HAVE_CREATEFILEHANDLER
71c73
< #ifdef MS_WINDOWS
---
> #if defined(MS_WINDOWS) || defined(__CYGWIN__)
Index: main.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/main.c,v
retrieving revision 1.44
diff -r1.44 main.c
11c11
< #ifdef MS_WINDOWS
---
> #if defined(MS_WINDOWS) || defined(__CYGWIN__)
187c187
< #ifdef MS_WINDOWS
---
> #if defined(MS_WINDOWS) || defined(__CYGWIN__)
209c209
< #ifdef MS_WINDOWS
---
> #if defined(MS_WINDOWS) || defined(__CYGWIN__)
Index: socketmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
retrieving revision 1.127
diff -r1.127 socketmodule.c
125c125
< #ifndef __BEOS__
---
> #if !defined(__BEOS__) && !defined(__CYGWIN__)

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

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=112786&group_id=5470