hprose / hprose-golang

Hprose is a cross-language RPC. This project is Hprose for Golang.
MIT License
1.26k stars 205 forks source link

编译为windows 32位的问题(GOARCH=386) #103

Closed czyt closed 3 years ago

czyt commented 3 years ago

go version:1.17

# github.com/hprose/hprose-golang/v3/rpc/socket
C:\Users\czyt\go\pkg\mod\github.com\hprose\hprose-golang\v3@v3.0.0-beta1\rpc\socket\handler.go:161
:11: constant 2147483648 overflows int
# github.com/hprose/hprose-golang/v3/rpc/websocket
C:\Users\czyt\go\pkg\mod\github.com\hprose\hprose-golang\v3@v3.0.0-beta1\rpc\websocket\handler.go:
182:11: constant 2147483648 overflows int
# github.com/hprose/hprose-golang/v3/rpc/plugins/loadbalance
C:\Users\czyt\go\pkg\mod\github.com\hprose\hprose-golang\v3@v3.0.0-beta1\rpc\plugins\loadbalance\n
ginx_round_robin_loadbalance.go:52:17: constant -9223372036854775808 overflows int

报错了。 编译环境如下(主要设置了386)

set GO111MODULE=on
set GOARCH=386
set GOBIN=
set GOCACHE=C:\Users\czyt\AppData\Local\go-build
set GOENV=C:\Users\czyt\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\czyt\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\czyt\go
set GOPRIVATE=
set GOPROXY=https://goproxy.cn,direct
set GOROOT=C:\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.17
set GCCGO=gccgo
set GO386=sse2
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=F:\go\inkjetServer\server\go.mod
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=-m32 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\czyt\AppData\Local\Temp\go-build2700189396=/tmp/go-build -gno-record-gcc-switches

暂时先提交,后面我再行补充