Go, IPv6, and single binding machinesThe current libraries for the Go language and their built in tests strongly believe that you can talk to IPv4 addresses through IPv6 sockets, which is not necessarily the case. This is a known issue (see also), and is more than somewhat inconvenient on a machine with dual binding turned off, such as my workstation, as Go will not install from source unless all its tests pass. (Since Debian has apparently changed their minds about dual binding, this may not affect very many people. I maintain that it should, although it's now a quixotic battle that I am probably not going to win any time soon.) If this affects you, the simple fix is probably to just apply the
patch from Joerg Sonnenberger that's (currently)
at the end of Go issue 679. I opted for a
slightly different fix, because I wanted to force Go to use IPv4
sockets where possible. Thus, I forced (A more thorough fix for While this is an incomplete hack with some limits, I think it is
generally going to do what I want from Go even with servers, provided that I am careful
(basically I can't mix an explicit IPv4 server with a Go-based IPv6
one). A better fix would be to change the code to explicitly force
(One of the attraction of Go is that it looks familiar enough to me that I can fumble my way through this sort of chainsaw modifications and usually get them to work.) As a side note: since OpenBSD doesn't allow dual binding under any circumstances, this is going to be a real issue if anyone ever attempts to port Go to OpenBSD. I suspect that the solution will be to turn off a bunch of tests. |
These are my WanderingThoughts GettingAround This is part of CSpace, and is written by ChrisSiebenmann. * * * Atom feeds are available; see the bottom of most pages. Categories: links, linux, programming, python, snark, solaris, spam, sysadmin, tech, unix, web |