build.sh undefined: syscall.Getrusage error on solaris 11.1

When attempting to build syncthing on Solaris 11.1 I get the following error. Not sure what other info would be helpful but if any more is needed then let me know.

mat@cn-svr-sol-03:~/src/github.com/syncthing/syncthing$ ./build.sh godep go install -ldflags -w -X main.Version v0.9.10+1-gbd2772e -X main.BuildStamp 1409555271 -X main.BuildUser unknown-user -X main.BuildHost cn-svr-sol-03 -X main.BuildEnv default ./cmd/… github.com/syncthing/syncthing/cmd/syncthing cmd/syncthing/perfstats_unix.go:36: undefined: syscall.Getrusage godep: go exit status 2 exit status 1 exit status 1

Solaris isn’t currently supported. I never got the build to be stable, there are some issues filed on the Go runtime. You can fix that particular error by either removing that file or changing the build constraint to // +build !solaris,!windows and see how it works. In my testing, it dies after a while with an unexpected signal panic from the runtime.

I checked in that change, so current master should at least build.

Thanks for the fast response. Its now building on my server and currently up and running. hope they resolve the go runtime issues on Solaris but in the meantime I can run it using SMF this should restart it when it fails. Not very elegant but should get it working for me in the short term.

Yep, that’s worth a try. It was an occasional thing, couldn’t make a reliable repro of the failure. There were hints about it maybe having something to do with memory pressure (I run fairly small zones), so maybe with more RAM available it’s less likely to happen.

I’m also planning to run it in a zone once I’ve finished testing but wont be memory limiting. The server has 32Gb RAM so I’ll let you know how I get on. Thanks again for your help to get it to build.

So you are droping solaris support?

Can’t drop what isn’t there to begin with. It doesn’t work very well under Solaris unfortunately, the Go runtime has some ways to go before being stable there. But it does compile, and I test it there occasionally.

On the main page the download mention solaris, that’s why I though solaris was supported.

Anyway too bad for me, solaris was a requirement for me as my nas is solaris based. I’ve tryed it a bit on my laptop and it was good!

Yeah, that was a bit over eager… That said, there is a build, and things should get more stable over time: http://build.syncthing.net/job/syncthing-solaris/