go-prompt icon indicating copy to clipboard operation
go-prompt copied to clipboard

Building for Linux on Windows

Open en-vee opened this issue 5 years ago • 0 comments

Hi, I love this package, but while trying to build a Linux executable on a Windows OS, I encounter the following error. I don't see any issues when building a Windows exe :

PS C:\tools\my-app> $env:GOOS="linux"                                                                                                                                  
PS C:\tools\my-app> go build -o my-app .                                                                                                                      
# github.com/c-bata/go-prompt/internal/term
..\..\..\c-bata\go-prompt\internal\term\raw.go:25:75: cannot use (*syscall.Termios)(&n) (type *syscall.Termios) as type *unix.Termios in argument to termios.Tcsetattr
..\..\..\c-bata\go-prompt\internal\term\term.go:22:40: cannot use &saveTermios (type *syscall.Termios) as type *unix.Termios in argument to termios.Tcgetattr
..\..\..\c-bata\go-prompt\internal\term\term.go:33:68: cannot use &o (type *syscall.Termios) as type *unix.Termios in argument to termios.Tcsetattr

my go env details :

PS C:\tools\my-app> go version                                                                                                                                         
go version go1.13.5 windows/amd64

PS C:\tools\my-app> go env                                                                                                                                             
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\NV\AppData\Local\go-build
set GOENV=C:\Users\NV\AppData\Roaming\go\env
set GOEXE=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GONOPROXY=
set GONOSUMDB=
set GOOS=linux
set GOPATH=C:\Users\NV\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-fPIC -m64 -fmessage-length=0 -fdebug-prefix-map=C:\Users\NV\AppData\Local\Temp\go-build163572890=/tmp/go-build -gno-record-gcc-switches

en-vee avatar Sep 24 '20 00:09 en-vee