Subject: Re: compiling python under cygwin
From: Jason Tishler <[email-masked]>
To: Erik Nolte <[email-masked]>
Cc: "[email-masked]'" <[email-masked]>
Date: Wed, 4 Oct 2000 11:04:28 -0400

Erik,

On Tue, Oct 03, 2000 at 03:23:59PM -0600, Erik Nolte wrote:
> I must be missing something...  I have cygwin 1.1.4, all the latest cygwin
> packages, and Python 2.0b2 source.  Configure runs as expected, but make
> dies in Modules/socketmodule.c because it can't find netinet/tcp.h.  I
> searched the cygwin packages and none of them contain a tcp.h.  I conclude
> that tcp.h shouldn't be part of the cygwin release and that's ok because the
> #include is wrapped with an #ifndef MS_WINDOWS.  Unfortunately configure
> doesn't set an MS_WINDOWS symbol and neither do any of the include files
> (python or /usr/include).  If I #define MS_WINDOWS I get a slew of winsock.h
> conflict-type errors.  I was finally able to build python by commenting out
> '#include <netinet/tcp.h>' in socketmodule.c.  I'm not sure the resulting
> executable is fully functional.

Due to building PostgreSQL 7.0.2, my Cygwin installation already had an
(empty) /usr/include/netinet/tcp.h (due to following their Cygwin README).
Hence, I was unaware of the above problem.

Your workaround is fine and your executable should be as "fully
functional" as mine.  If you run the regression tests, you should find
that it fails test_fcntl, test_poll (which should be excluded due to
hanging), test_pty, test_strftime, and test_time.  I still need to track
down why the failures are occurring especially test_poll.

Alternatively, you can change the relevant lines in Modules/socketmodule.c,
from:

    #ifndef __BEOS__
    #include <netinet/tcp.h>
    #endif

to:

    #if !define(__BEOS__) && !define(__CYGWIN__)
    #include <netinet/tcp.h>
    #endif

I will try to get the Python source patched as above.

Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corporation         Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: [email-masked]
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

--
Want to unsubscribe from this list?
Send a message to [email-masked]