This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: compiling python under cygwin


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: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]