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

termios does not build on Illumos/OpenIndiana #43

Closed
grueni opened this issue Feb 14, 2019 · 1 comment
Closed

termios does not build on Illumos/OpenIndiana #43

grueni opened this issue Feb 14, 2019 · 1 comment

Comments

@grueni
Copy link

grueni commented Feb 14, 2019

I try to build gitlab-runner in OpenIndiana. pkg/term included in gitlab-runner is too old and compilation failed.
I managed to replace the vendored x/sys/unix and pkg/term.
But now compilation fails with "...undefined: open_pty_master".
The function is available in pty_solaris.go but the file is not used when built.
When I change to the directory of termios and check which files will be built, I get
../termios# go list -f '{{.GoFiles}}'
[doc.go ioctl_solaris.go pty.go termios.go]
When I edit pty_solaris.go and comment out 'import "C"' pty_solaris.go is found by go list
../termios# go list -f '{{.GoFiles}}'
[doc.go ioctl_solaris.go pty.go pty_solaris.go termios.go]

Is this a problem of using cgo and conditional compilation?
Unfortunately I am a complete newbie concerning go and I have no clue what to do.

Similar problems
http://muscles.dragonflybsd.org/synth/logs/net___concourse-fly.log
fiam/idf_wmonitor#1
#27

/termios# go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="solaris"
GOOS="solaris"
GOPATH="/export/builds/oi-userland/components/sysutils/gitlab-runner/build/amd64/.gopath"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/golang/1.11"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/golang/1.11/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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build206860015=/tmp/go-build -gno-record-gcc-switches"

@grueni
Copy link
Author

grueni commented Feb 14, 2019

gitlab-runner disables CGO by default.
For Solaris CGO_ENABLED=1 must be used as build argument.

@grueni grueni closed this as completed Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant