Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syscall: SYS_SETGROUPS, SYS_SETUID, SYS_SETGID, SYS_DUP2 not available for Solaris (Illumos) #34137

Closed
kayront opened this issue Sep 6, 2019 · 1 comment

Comments

@kayront
Copy link

@kayront kayront commented Sep 6, 2019

What version of Go are you using (go version)?

$ go version

go version go1.12.5 solaris/amd64

Does this issue reproduce with the latest release?

Possibly.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/admin/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="solaris"
GOOS="solaris"
GOPATH="/home/admin/go"
GOPROXY=""
GORACE=""
GOROOT="/opt/local/go112"
GOTMPDIR=""
GOTOOLDIR="/opt/local/go112/pkg/tool/solaris_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build234326747=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Attempted to compile dnscrypt-proxy2.

What did you expect to see?

A shiny binary that works on Solaris.

What did you see instead?

Chaos. Failure. Disappointment.

ithub.com/jedisct1/dnscrypt-proxy/vendor/github.com/miekg/dns
github.com/jedisct1/dnscrypt-proxy/vendor/golang.org/x/net/idna
github.com/jedisct1/dnscrypt-proxy/vendor/golang.org/x/net/http/httpguts
github.com/jedisct1/dnscrypt-proxy/vendor/golang.org/x/net/http2
github.com/jedisct1/dnscrypt-proxy/dnscrypt-proxy
# github.com/jedisct1/dnscrypt-proxy/dnscrypt-proxy
/home/pbulk/build/net/dnscrypt-proxy2/work/src/github.com/jedisct1/dnscrypt-proxy/dnscrypt-proxy/privilege_others.go:53:39: undefined: syscall.SYS_SETGROUPS
/home/pbulk/build/net/dnscrypt-proxy2/work/src/github.com/jedisct1/dnscrypt-proxy/dnscrypt-proxy/privilege_others.go:56:39: undefined: syscall.SYS_SETGID
/home/pbulk/build/net/dnscrypt-proxy2/work/src/github.com/jedisct1/dnscrypt-proxy/dnscrypt-proxy/privilege_others.go:59:39: undefined: syscall.SYS_SETUID
/home/pbulk/build/net/dnscrypt-proxy2/work/src/github.com/jedisct1/dnscrypt-proxy/dnscrypt-proxy/privilege_others.go:70:40: undefined: syscall.SYS_DUP2
/home/pbulk/build/net/dnscrypt-proxy2/work/src/github.com/jedisct1/dnscrypt-proxy/dnscrypt-proxy/privilege_others.go:78:40: undefined: syscall.SYS_DUP2
*** Error code 2
@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Sep 6, 2019

The syscall package is inherently system dependent. Those constants are not defined on Solaris. There is no simple approach we can take to fix this. If you want your system-dependent code to build on Solaris, you will need to port it to Solaris. Sorry.

@golang golang locked and limited conversation to collaborators Sep 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.