[arch-general] getaddrinfo
I've been working on this for several days and can't seem to figure out what's wrong. When I try to compile perl-5.14.2 or install any perl module that runs a test requiring getaddrinfo, the test fails. I've searched high and low between the bug list, the wiki, google, man pages etc and have found zero answers. I've found example c code that fails also. All the return values are negative and should be 0 or greater than zero. One of the errors related to perl is # Failed test '$err == 0 for host= cpan.perl.org/service=ftp/socktype=STREAM' # at t/getaddrinfo.t line 79. # got: -8 # expected: 0 I have a static ip address set up in rc.conf and my internet connections work, ftp clients work, ip addrlabel produces prefix ::1/128 label 0 prefix ::ffff:0.0.0.0/96 label 4 prefix ::/96 label 3 prefix 2001::/32 label 7 prefix 2002::/16 label 2 prefix fec0::/10 label 5 prefix fc00::/7 label 6 prefix ::/0 label 1 and rpcbind, ypbind, ypserv, and vsftpd are running. Building python3 also fails with the same error. It's probably something misconfigured on my box with all the changes in network tools, but quite frankly I'm lost. This problem is recent. I built the previous versions of perl and python3. Python2 builds and I diffed the test files that contain the gettaddrinfo tests and they are different. Pointers to getaddrinfo code that works, suggestions on my network configuration, rtfm might work if you've got a man page I've missed, and/or any other suggestions would be appreciated. Thanks in advance. Myra -- Life's fun when your sick and psychotic!
On Wed, Dec 7, 2011 at 18:08, Myra Nelson <myra.nelson@hughes.net> wrote:
I've been working on this for several days and can't seem to figure out what's wrong. When I try to compile perl-5.14.2 or install any perl module that runs a test requiring getaddrinfo, the test fails. I've searched high and low between the bug list, the wiki, google, man pages etc and have found zero answers. I've found example c code that fails also. All the return values are negative and should be 0 or greater than zero. One of the errors related to perl is
# Failed test '$err == 0 for host= cpan.perl.org/service=ftp/socktype=STREAM' # at t/getaddrinfo.t line 79. # got: -8 # expected: 0
I have a static ip address set up in rc.conf and my internet connections work, ftp clients work, ip addrlabel produces
prefix ::1/128 label 0 prefix ::ffff:0.0.0.0/96 label 4 prefix ::/96 label 3 prefix 2001::/32 label 7 prefix 2002::/16 label 2 prefix fec0::/10 label 5 prefix fc00::/7 label 6 prefix ::/0 label 1
and rpcbind, ypbind, ypserv, and vsftpd are running.
Building python3 also fails with the same error.
It's probably something misconfigured on my box with all the changes in network tools, but quite frankly I'm lost. This problem is recent. I built the previous versions of perl and python3. Python2 builds and I diffed the test files that contain the gettaddrinfo tests and they are different. Pointers to getaddrinfo code that works, suggestions on my network configuration, rtfm might work if you've got a man page I've missed, and/or any other suggestions would be appreciated.
Thanks in advance.
Myra -- Life's fun when your sick and psychotic!
After some more searching, work, and this email from the libc help list [ http://sourceware.org/ml/libc-help/2011-12/msg00000.html ] , I've attempted the code from Ulrich Dreppers page at http://www.akkadia.org/drepper/userapi-ipv6.html . The newer version of the code (on the right ) which is supposed to be protocol independent returns getaddrinfo: Servname not supported for ai_socktype, while the older version ( on the left ) seg faults. I'm sure a lot of people are aware of this, but it there any work around? Thanks for any assistance. Myra -- Life's fun when your sick and psychotic!
Myra Nelson wrote:
After some more searching, work, and this email from the libc help list [ http://sourceware.org/ml/libc-help/2011-12/msg00000.html ] , I've attempted the code from Ulrich Dreppers page at http://www.akkadia.org/drepper/userapi-ipv6.html . The newer version of the code (on the right ) which is supposed to be protocol independent returns getaddrinfo: Servname not supported for ai_socktype, while the older version ( on the left ) seg faults.
Read the manual page getaddrinfo(3). I presume the error in the newer version is: EAI_SERVICE The requested service is not available for the requested socket type. It may be available through another socket type. For example, this error could occur if service was "shell" (a service only available on stream sockets), and either hints.ai_protocol was IPPROTO_UDP, or hints.ai_socktype was SOCK_DGRAM; or the error could occur if service was not NULL, and hints.ai_socktype was SOCK_RAW (a socket type that does not support the concept of services). How did you run the program? If you use "http" instead of "echo", does it work with some www host? With the older version, did you perhaps forget some vital "&" or "*"? clemens
Myra Nelson wrote:
After some more searching, work, and this email from the libc help list [ http://sourceware.org/ml/libc-help/2011-12/msg00000.html ] , I've attempted the code from Ulrich Dreppers page at http://www.akkadia.org/drepper/userapi-ipv6.html . The newer version of the code (on the right ) which is supposed to be protocol independent returns getaddrinfo: Servname not supported for ai_socktype, while the older version ( on the left ) seg faults.
Also try another, more practical program (which works here): <url: http://linux-hacks.blogspot.com/2008/04/default-address-selection-part-1.html> (linked from <url:http://www.wtfm.org/ip6to4>) clemens
On Fri, Dec 9, 2011 at 18:00, clemens fischer < ino-news@spotteswoode.dnsalias.org> wrote:
Myra Nelson wrote:
After some more searching, work, and this email from the libc help list [ http://sourceware.org/ml/libc-help/2011-12/msg00000.html ] , I've attempted the code from Ulrich Dreppers page at http://www.akkadia.org/drepper/userapi-ipv6.html . The newer version of the code (on the right ) which is supposed to be protocol independent returns getaddrinfo: Servname not supported for ai_socktype, while the older version ( on the left ) seg faults.
Also try another, more practical program (which works here):
<url:
http://linux-hacks.blogspot.com/2008/04/default-address-selection-part-1.htm...
(linked from <url:http://www.wtfm.org/ip6to4>)
clemens
Clemens:
Thank you very much. I already had the example you pointed out and was having trouble with it also. However in working on it I discovered what was wrong. As I suspected it was a configuration error in my network settings. Once I set up both ipv6 addresses and ipv4 addresses both sets of code quit choking. Again, I appreciate you assistance very much. Myra -- Life's fun when your sick and psychotic!
Myra Nelson wrote:
I have a static ip address set up in rc.conf and my internet connections work, ftp clients work, ip addrlabel produces
prefix ::1/128 label 0 prefix ::ffff:0.0.0.0/96 label 4 prefix ::/96 label 3 prefix 2001::/32 label 7 prefix 2002::/16 label 2 prefix fec0::/10 label 5 prefix fc00::/7 label 6 prefix ::/0 label 1
That's odd. I get: 0 6 # ip addrlabel prefix ::1/128 label 0 prefix ::/96 label 3 prefix ::ffff:0.0.0.0/96 label 4 prefix 2001::/32 label 6 prefix 2001:10::/28 label 7 prefix 2002::/16 label 2 prefix fc00::/7 label 5 prefix ::/0 label 1 You can see that the IP ranges have differing labels (classes). What _uncommented_ lines are in your etc/gai.conf? egrep -v '^#|^[[:space:]]*$' /etc/gai.conf The output of this command is empty on my machine. clemens
participants (2)
-
clemens fischer
-
Myra Nelson