public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/104461] New: cody requires -fmodule-mapper hostname to have an IPv6 address
@ 2022-02-09 12:22 aoliva at gcc dot gnu.org
  2022-04-06  3:22 ` [Bug c++/104461] " xry111 at mengyan1223 dot wang
  0 siblings, 1 reply; 2+ messages in thread
From: aoliva at gcc dot gnu.org @ 2022-02-09 12:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104461

            Bug ID: 104461
           Summary: cody requires -fmodule-mapper hostname to have an IPv6
                    address
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: aoliva at gcc dot gnu.org
                CC: nathan at gcc dot gnu.org
            Blocks: 103524
  Target Milestone: ---

A host whose localhost maps to 127.0.0.1 but not ::1 fails bad-mapper-3.C
because we get an error about name resolution rather than connection.  This
might be the reason for part of the errors in bug 99175.

That's because mapper-client.cc calls netclient.cc OpenInet6, that insists on
strict IPv6 addresses, rejecting even AI_V4MAPPED ones.

Any reason to not go AF_UNSPEC instead, and use getaddrinfo's port-to-sockaddr
conversion while at that?


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103524
[Bug 103524] [meta-bug] modules issue

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/104461] cody requires -fmodule-mapper hostname to have an IPv6 address
  2022-02-09 12:22 [Bug c++/104461] New: cody requires -fmodule-mapper hostname to have an IPv6 address aoliva at gcc dot gnu.org
@ 2022-04-06  3:22 ` xry111 at mengyan1223 dot wang
  0 siblings, 0 replies; 2+ messages in thread
From: xry111 at mengyan1223 dot wang @ 2022-04-06  3:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104461

Xi Ruoyao <xry111 at mengyan1223 dot wang> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jwakely.gcc at gmail dot com,
                   |                            |xry111 at mengyan1223 dot wang

--- Comment #1 from Xi Ruoyao <xry111 at mengyan1223 dot wang> ---
It's because the paper (https://wg21.link/p1184) explicitly says "an ipv6
domain socket & port", I think.  It's not clear if AI_V4MAPPED addresses are
allowed.

The problem is there is no "elegent" way for a distro maintainer to ensure an
IPv6 address for localhost is available on Linux/GNU.  If /etc/nsswitch.conf
contains

hosts: files dns

(this is the default of Glibc and used by many distros), and /etc/hosts
contains

127.0.0.1 localhost
::1       localhost

By default Glibc will ignore "::1" for localhost, unless "multi on" is
specified in /etc/host.conf.  But Glibc doc explicitly says it may cause a
performance issue (see man host.conf).  On systems using systemd, the distro
can specify nss_myhostname in /etc/nsswitch.conf, but it does not exist on
non-systemd distros.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-06  3:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-09 12:22 [Bug c++/104461] New: cody requires -fmodule-mapper hostname to have an IPv6 address aoliva at gcc dot gnu.org
2022-04-06  3:22 ` [Bug c++/104461] " xry111 at mengyan1223 dot wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).