Ticket #2101 (closed bug: fixed)

Opened 4 years ago

Last modified 3 years ago

Broken ipv6 detection on Gentoo linux

Reported by: tadzik Owned by: tadzik
Priority: normal Milestone:
Component: configure Version: master
Severity: medium Keywords: ipv6
Cc: nwellnhof Language:
Patch status: applied Platform:

Description

My system has no ipv6 capabilities, yet the Configure.pl test detects it as working:

    ┌─[tadzik@yavin4]─[~/src/parrot] (master)
    └─[%]─> parrot_config HAS_IPV6
    1
    ┌─[tadzik@yavin4]─[~/src/parrot] (master)
    └─[%]─> zgrep -i ipv6 /proc/config.gz
    # CONFIG_IPV6 is not set

When I looked into the test in config/auto/ipv6/test.in it just calls getaddrinfo() but prints "OK" disregarding the effect. Although getaddrinfo() pretends everything went fine, socket() returns -1 for ipv6 sockets on my system. So a test basing on socket() might be more accurate.

Change History

  Changed 4 years ago by tadzik

I wrote a test using socket() and pushed to  https://github.com/parrot/parrot/tree/tadzik/tt-2101-fix branch. Please test if it works fine for you.

  Changed 4 years ago by tadzik

  • cc nwellnhof added

follow-up: ↓ 5   Changed 4 years ago by benabik

This appears to work for me on Darwin/i386 10.6.7. (Test runs, detects IPv6.)

  Changed 4 years ago by jkeenan

As discussed on IRC, tadzik's patch detects ipv6 on my linux/i386 machine. I have no particular knowledge of ipv6, socket, getaddrinfo(), etc., so I can't say whether tadzik's approach is generally more sound than that taken in config/auto/ipv6/test_c.in. We'll probably need to preserve the #if for Win32. It may be that the only issue here is ignoring the return value of getaddrinfo().

Would appreciate feedback from nwellnhof, who wrote most of the original configuration probe.

Thank you very much.

kid51

in reply to: ↑ 3   Changed 4 years ago by jkeenan

  • component changed from none to configure

Replying to benabik:

This appears to work for me on Darwin/i386 10.6.7. (Test runs, detects IPv6.)

Also works for me on Darwin/PPC 10.4.11.

kid51

  Changed 4 years ago by nwellnhof

tadzik's patch removes the test for getaddrinfo which should be kept in any case. It's needed to detect older systems where getaddrinfo isn't supported.

IMO, if the C library has the functions needed we should compile with IPv6 support regardless if it's really working on the current system. I'd simply add a check to skip the IPv6 tests if we can't create IPv6 sockets.

  Changed 3 years ago by dukeleto

  • owner set to dukeleto

I am testing a version of tadzik++'s patch that doesn't remove the win32 stuff right now.

  Changed 3 years ago by dukeleto

  • owner changed from dukeleto to tadzik

Patch applied here, sans windows junk deleted:

 https://github.com/parrot/parrot/commit/2888490650

Tadzik, can you close this ticket if it works on your Gentoo box?

  Changed 3 years ago by dukeleto

  • patch set to applied

  Changed 3 years ago by tadzik

  • status changed from new to closed
  • resolution set to fixed

Works fine now, I think this can be closed.

Note: See TracTickets for help on using tickets.