This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: _socket module not build under cygwin
Type: Stage:
Components: Build Versions: Python 2.4
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: jlt63 Nosy List: jlt63, nnorwitz, tebeka
Priority: normal Keywords:

Created on 2005-09-22 12:59 by tebeka, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (6)
msg26351 - (view) Author: Miki Tebeka (tebeka) * Date: 2005-09-22 12:59
Hello,

Bulding Python-2.4.2c1 under cygwin gives the following:

building '_socket' extension
gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
-fno-strict-aliasing -I.
-I/home/mtebeka/src/Python-2.4.2c1/./Include
-I/home/mtebeka/src/Python-2.4.2c1/Include
-I/home/mtebeka/src/Python-2.4.2c1 -c
/home/mtebeka/src/Python-2.4.2c1/Modules/socketmodule.c
-o build/temp.cygwin-1.5.18-i686-2.4/socketmodule.o
/home/mtebeka/src/Python-2.4.2c1/Modules/socketmodule.c:
In function `socket_inet_ntop':
/home/mtebeka/src/Python-2.4.2c1/Modules/socketmodule.c:3351:
error: `INET_ADDRSTRLEN' undeclared (first use in this
function)
/home/mtebeka/src/Python-2.4.2c1/Modules/socketmodule.c:3351:
error: (Each undeclared identifier is reported only once
/home/mtebeka/src/Python-2.4.2c1/Modules/socketmodule.c:3351:
error: for each function it appears in.)
/home/mtebeka/src/Python-2.4.2c1/Modules/socketmodule.c:3351:
warning: unused variable `ip'
msg26352 - (view) Author: Miki Tebeka (tebeka) * Date: 2005-09-22 13:22
Logged In: YES 
user_id=358087

The problem can be sloved by adding the following lines in
socketmodule.c beginning.

/* FIXME: We should include ws2tcpip.h, however this causes
compilation problems */
#if defined(__CYGWIN__)
#define INET_ADDRSTRLEN  16
#define INET6_ADDRSTRLEN 46
#endif /* __CYGWIN__ */
msg26353 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2005-09-23 04:31
Logged In: YES 
user_id=33168

Jason, are you still working on Cygwin issues?
msg26354 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2005-09-23 04:56
Logged In: YES 
user_id=33168

Patch is also #1275079.
msg26355 - (view) Author: Jason Tishler (jlt63) * (Python triager) Date: 2005-09-23 11:18
Logged In: YES 
user_id=86216

This is a known Cygwin issues which will be fixed in 1.5.19:

http://cygwin.com/ml/cygwin/2005-07/msg01257.html

I recommend that Cygwin users temporarily patch their
netinet/in.h instead of changing the Python source code.

And yes, I still maintain Cygwin Python. :,)
msg26356 - (view) Author: Jason Tishler (jlt63) * (Python triager) Date: 2005-10-28 12:28
Logged In: YES 
user_id=86216

No news is good news, so I'm closing this bug report.
History
Date User Action Args
2022-04-11 14:56:13adminsetgithub: 42399
2005-09-22 12:59:23tebekacreate