goterm icon indicating copy to clipboard operation
goterm copied to clipboard

pty_linux.go:15:27: error: reference to undefined identifier 'syscall.TIOCGPTN' (gollvm)

Open advancedwebdeveloper opened this issue 5 years ago • 4 comments

Hi. I think I found a bug.

$ go build -i -v -x WORK=/tmp/go-build100086455 github.com/pkg/term/termios mkdir -p $WORK/b014/ cd $WORK /home/oceanfish81/gollvm_dist/bin/llvm-goc -fgo-importcfg=/dev/null -c -x c - -o /dev/null || true cd /home/oceanfis81/go/pkg/mod/github.com/pkg/[email protected]/termios /home/oceanfish81/gollvm_dist/bin/llvm-goc -c -O2 -g -m64 -fdebug-prefix-map=$WORK=/tmp/go-build -gno-record-gcc-switches -fgo-pkgpath=github.com/pkg/term/termios -o $WORK/b014/go.o -I $WORK/b014/importcfgroot ./doc.go ./ioctl.go ./pty.go ./pty_linux.go ./termios.go ./termios_const.go ./termios_linux.go

github.com/pkg/term/termios

../../../go/pkg/mod/github.com/pkg/[email protected]/termios/pty_linux.go:15:27: error: reference to undefined identifier 'syscall.TIOCGPTN' ../../../go/pkg/mod/github.com/pkg/[email protected]/termios/pty_linux.go:24:27: error: reference to undefined identifier 'syscall.TIOCGPTN' ../../../go/pkg/mod/github.com/pkg/[email protected]/termios/pty_linux.go:29:27: error: reference to undefined identifier 'syscall.TIOCSPTLCK'

Here is my environment:

$ go env && go version GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/oceanfis81/.cache/go-build" GOENV="/home/oceanfis81/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/oceanfis81/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/oceanfis81/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/home/oceanfish81/gollvm_dist" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/oceanfish81/gollvm_dist/tools" GCCGO="/home/oceanfish81/gollvm_dist/bin/llvm-goc" AR="ar" CC="/usr/bin/clang" CXX="/usr/bin/clang++" CGO_ENABLED="1" GOMOD="/home/oceanfis81/go_projects/c4go/go.mod" 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-build402447636=/tmp/go-build -gno-record-gcc-switches -funwind-tables" go version go1.15.2 gollvm LLVM 12.0.0git linux/amd64

I am using gollvm - my "release" build could be found here

CC @thanm @cherrymui

advancedwebdeveloper avatar Oct 01 '20 12:10 advancedwebdeveloper

Sorry for being slow , cycles are very scarce at the moment.

I'll take the bug but can't promise when I can have a closer look. PRs welcome.

skalle avatar Oct 17 '20 05:10 skalle

CC @ianlancetaylor @thanm @cherrymui

advancedwebdeveloper avatar Oct 17 '20 07:10 advancedwebdeveloper

Sorry for being slow , cycles are very scarce at the moment.

I'll take the bug but can't promise when I can have a closer look. PRs welcome.

@skalle , what do you require (to reproduce the bug)? I am re-compiling gollvm, right now - the recent archive with binaries could be obtained from here.

Let me know what you would require from gollvm's "debug" build, what level of verbosity would you require.

advancedwebdeveloper avatar Oct 17 '20 08:10 advancedwebdeveloper

I do see these values defined in gccgo's syscall package, in the generated sysinfo.go file.

ianlancetaylor avatar Oct 17 '20 23:10 ianlancetaylor