Google Go language port to NetBSD (Abandoned)

This project has been abandoned. Short story: language too immature, too little value.

For the long story, here's the mail I posted to the NetBSD mailing list when I stopped working on the port:

From: Giles Lean <giles.lean <at>>
Subject: Re: Proposed Go (Google's Go Language) port to NetBSD
Date: 2010-06-07 07:54:20 GMT

A long, long time ago I wrote:

> I'm working on porting Google's "Go" language to NetBSD, at least
> for the amd64 and i386 ports.

Well, I have an update: I've pulled the plug.

Reason?  Go is driving me nuts (it's perhaps not an accident
that its mailing list is golang-nuts :-), and I don't see that
it is worth the effort of porting.

My porting efforts didn't proceed terribly far (mostly on
purpose) as I spent more time doing two related things:

1. noticing problematic situations in the languages packages
   and using those issues to learn the process for getting
   changes into the "official" Go source via the team at

2. while iterating s-l-o-w-l-y through #1 (and resonably often
   unsuccessfully, as many design decisions are not
   documented, and I made some wrong guesses) I spent time
   also writing Go code to learn the language.

For me, it's back to C: I like Go (still) but a "systems
programming language" that discourages using its "syscall"
package and makes only poor (and undocumented) provision for
accessing other operating system APIs lacks a little
something.  IMHO, anyway.

Similarly, Unicode support and UTF-8 strings are great ... but
if you don't have any way to normalise those strings and any
comparison or sorting of them (oh, no locale support either,
and opposition to including it!) degenerates to byte
comparisons ... well, I suppose it works for ASCII?

Anyrate, that's news, project abandoned.  But the archive will
have the explanation of why, in case anyone ever wonders "what
happened to ???".



For most up to date annoucements, check the blog (which broke, and I didn't fix it as the most recent relevant information as of my stopping work is here.).

The open issue on Google's issue tracker is #611.

Who's working on this?

People working on this port currently are:

Giles Lean

<> (n.b. Again, this address is aggressively spam filtered (sorry): if you don't get a reply after sending me mail, try updating the Google issue as another way to reach me.)

s1061123 a.k.a. Tomofumi

(No email address provided)


In short, "quite a way to go". Giles has started with a first grade port (i.e. the NetBSD port should be on par with OS X, Linux, and FreeBSD ports).

Tomofumi has started by endeavouring to build as "freebsd"; that approach may have problems as the threading interfaces used by the FreeBSD port are not native to NetBSD, or it may be a faster way to something that runs.


"Good" Patches as of 2010-02-21

This is the current order I (Giles) currently apply my patches to the go source tree. (I use Mercurial's mq extension, but manual use of patch(1) will be just fine too.)


Turns off "make -j4" to make reading the build output easier. Won't be required in the final port.


Minor tweaks to recognise NetBSD as a build target.


Stubbed out src/libmach/netbsd.c, copied from the (also stubbed out) src/lib/freebsd.c file.

"Unstable" Patches as at 2010-02-21

The following patches are under development. They're not nearly complete, and doubtless some (possibly much ☹) of what's there is bad. Anyone with knowledge of the Go language runtime is encouraged to help out here. Explanations of what to do and what not to do without code are welcome, as of course are code changes. Expect these patches to change as I find time to work on the port.

The only reason these patches are seeing the light of day in their current form is that this is an open source project. If you have delicate sensibilities, remember Otto von Bismarck's dictum that "Laws are like sausages. It's better not to see them being made.", and come back to these patches later. ☺


Beginnings of pkg/runtime/netbsd code. There are decisions to make here: all of the existing ports (OS X a.k.a. Darwin, Linux, and FreeBSD are quite different in this area.)


Extremely preliminary NetBSD code for pkg/runtime/syscall. I've copied it from the equivalent FreeBSD code, but a lot of checking (and likely changes) will still be needed.


Please, if you send code changes, first make sure you're signed up to contribute code to the Go project. If you haven't, we can't use your code, as we intend to offer this port as a contribution to get it into the main Go source tree.

If you can't work out if you're an individual or a corporate contributor, please talk to Google. They have lawyers. I don't even play one on the Interwebs. ☺