@kingloud we could update our vendored logrus to 0.10, but !301 (merged) would be required as well because go-dockerclientalso vendors its own logrus, and in our vendored version of go-dockerclient it appears to be a snapshot of 0.9, taken before the Solaris fixes.
I don't have much Solaris experience, so I don't know if there would be additional problems on top of that :(.
I'll prepare an MR that updates logrus to latest, anyway. If we can get that merged, I'll rebase !301 (merged) on top of it and you could try compiling that for Solaris. Sound good?
I just took another stab at cross compiling for solaris on the latest branch, but had no luck.
It is most certainly something I'm messing up with golang
So I think i got it working on solaris - many thanks to the contributors to this thread in getting me on my way.
The undefined exceptions are due to several _unix.go sources not listing solaris amongst them, as shown in the following diff...
diff --git a/commands/config_unix.go b/commands/config_unix.goindex 173785e..1460941 100644--- a/commands/config_unix.go+++ b/commands/config_unix.go@@ -1,4 +1,4 @@-// +build linux darwin freebsd openbsd+// +build linux darwin freebsd openbsd solaris package commandsdiff --git a/helpers/archives/zip_extra_unix.go b/helpers/archives/zip_extra_unix.goindex c066693..4af1725 100644--- a/helpers/archives/zip_extra_unix.go+++ b/helpers/archives/zip_extra_unix.go@@ -1,4 +1,4 @@-// +build linux darwin freebsd openbsd+// +build linux darwin freebsd openbsd solaris package archivesdiff --git a/helpers/cli/dump_unix.go b/helpers/cli/dump_unix.goindex f4fc57a..5c3a316 100644--- a/helpers/cli/dump_unix.go+++ b/helpers/cli/dump_unix.go@@ -1,4 +1,4 @@-// +build darwin dragonfly freebsd linux netbsd openbsd+// +build darwin dragonfly freebsd linux netbsd openbsd solaris package cli_helpersdiff --git a/helpers/process_group_unix.go b/helpers/process_group_unix.goindex 3faad62..c329749 100644--- a/helpers/process_group_unix.go+++ b/helpers/process_group_unix.go@@ -1,4 +1,4 @@-// +build darwin dragonfly freebsd linux netbsd openbsd+// +build darwin dragonfly freebsd linux netbsd openbsd solaris package helpers
The make command still failed (the linker appeared to not work, perhaps due to a malformed ldflags entry), so I simply ran the "go install" command directly and the resulting binary appears to work (at least I got one build running with it so far).
Here's a command history if it helps..
cd /opt/gitlab-runnergit clone https://gitlab.com/gitlab-org/gitlab-ci-multi-runner.gitcd gitlab-ci-multi-runner/git checkout 1-8-stablego get -u golang.org/x/sys/unixcd$GOPATH/src/golang.org/x/sys/unixgit checkout mastercd$GOPATH/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/$GOPATH/bin/govendor update golang.org/x/sys/unix# add 'solaris' to the end of the "+build" hint for the following files (or apply the above patch via git)vi ./helpers/process_group_unix.govi ./commands/config_unix.govi ./helpers/archives/zip_extra_unix.govi ./helpers/cli/dump_unix.goGOOS=solaris GOARCH=amd64 gmake install# This failed for me with a complaint about link not having the right parameters. It could be because one of the -X parameters appeared to be malformed (?)go install--ldflags="-X gitlab.com/gitlab-org/gitlab-ci-multi-runner/common.NAME=gitlab-ci-multi-runner -X gitlab.com/gitlab-org/gitlab-ci-multi-runner/common.VERSION=1.8.8~beta.0.gddb7a81 -X gitlab.com/gitlab-org/gitlab-ci-multi-runner/common.REVISION=ddb7a81 -X gitlab.com/gitlab-org/gitlab-ci-multi-runner/common.BUILT=2017-07-08T22:36:37%:z -X gitlab.com/gitlab-org/gitlab-ci-multi-runner/common.BRANCH=1-8-stable"$GOPATH/bin/gitlab-ci-multi-runner --help