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: configure fails at getaddrinfo() check on KAME
Type: Stage:
Components: Build Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: hyeshik.chang Nosy List: hyeshik.chang, suzsuz
Priority: normal Keywords:

Created on 2004-04-14 00:26 by suzsuz, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg20500 - (view) Author: suz@kame.net (suzsuz) Date: 2004-04-14 00:26
[Phenomena]
Python's configure script fails at getaddrinfo() check
on KAME-SNAP-freebsd4-20040412, although it supports
getaddrinfo() properly.

 configure:14128: checking getaddrinfo bug
 configure:14230: cc -o conftest -O -pipe
-D_THREAD_SAFE -DTHREAD_STACK_SIZE=0x20000  -pthread 
conftest.c -L/usr/local/v6/lib -linet6  -lutil >&5
 configure:14233: $? = 0
 configure:14235: ./conftest
 configure:14238: $? = 1
 configure: program exited with status 1
 configure: failed program was:
 ...


[reason]
The testing program to verify getaddrinfo() in
configure script assumes that there is only one
SOCK_STREAM protocol (normally TCP).

Since KAME supports SCTP as well as TCP, this
assumption is not true; getaddrinfo() returns two
protocols for the same socket type, which lead to a
unexpected result in this testing program.


[Solution]
Just specify the protocol in the testing program (like
the following patch) so that new protocol support
should not lead to such configure failure.

     hints.ai_family = AF_UNSPEC;
     hints.ai_flags = passive ? AI_PASSIVE : 0;
     hints.ai_socktype = SOCK_STREAM;
+    hints.ai_protocol = IPPROTO_TCP;
     if ((gaierr = getaddrinfo(NULL, "54321", &hints,
&aitop)) != 0) {
       (void)gai_strerror(gaierr);
       goto bad;
msg20501 - (view) Author: Hyeshik Chang (hyeshik.chang) * (Python committer) Date: 2004-04-14 06:52
Logged In: YES 
user_id=55188

Looks correct. I'll apply this in CVS, soon.
msg20502 - (view) Author: Hyeshik Chang (hyeshik.chang) * (Python committer) Date: 2004-04-14 08:15
Logged In: YES 
user_id=55188

Checked in

(head)
configure 1.443
configure.in 1.454
Misc/NEWS 1.966

(2.3 maint)
configure 1.416.4.13
configure.in 1.427.4.12
Misc/NEWS 1.831.4.99

Thank you for the kind description. :)
History
Date User Action Args
2022-04-11 14:56:03adminsetgithub: 40147
2004-04-14 00:26:13suzsuzcreate