Closed mvdan closed 9 years ago
In 6c75090 I fixed building for FreeBSD (which I run). I also changed the set of OSes listed to match the set for which it cross built correctly for me. I don't recall the details of why I didn't bother to get the others to build. But you can see in that commit that although I added dragonfly and Solaris I explicitly removed NetBSD.
You could try just adding other Unix like OSes to the top of map_unix.go
and see if it "just works" with the latest Go releases or to find out what's missing/different with those syscall
packages and what might be required to get them to build.
In my experience the Go syscall
package (and golang.org/x/sys
) sometimes are deficient beyond linux, darwin, and windows :(.
Right, I wasn't aware that the unix source files worked like that :) I don't really have any plan9/netbsd systems to test this on, so I guess we can leave this issue open as a TODO. Feel free to rename it.
The Go team has moved most/all new syscall related stuff to the golang.org/x/sys
sub-repository. Sadly SYS_MSYNC
(the reason it won't compile for NetBSD) isn't defined there for NetBSD either. (And golang.org/x/sys
hasn't built on FreeBSD since September) so switching to it won't help at the moment.
I don't believe Plan 9 supports mmap, so it's probably a lost cause. (Someone correct me if I'm wrong.)
I'm happy to take pull requests to fix NetBSD, though.
You seem to be correct about plan9, found a few references to plan9 not having mmap by design.
Why did I leave this open?
I was playing around with gox on github.com/mvdan/pastecat which uses mmap-go, and found that it fails to build on netbsd and plan9:
My first guess is that for some reason these platforms don't make use of the mmap_unix.go file.