wasmer-go: Problem while doing go get
Summary
I tried doing go get github.com/wasmerio/go-ext-wasm/wasmer
but it throws me error:
../go/src/github.com/wasmerio/go-ext-wasm/wasmer/bridge.go:162:87: cannot use (*_Ctype_struct___13)(instanceContext) (type *_Ctype_struct___13) as type *_Ctype_struct___16 in argument to _Cfunc_wasmer_instance_context_data_get
Additional details
My go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ubuntu/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ubuntu/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_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-build913563706=/tmp/go-build -gno-record-gcc-switches"
Initially, I was getting error:
ubuntu@ip:~/1$ go get github.com/wasmerio/go-ext-wasm/wasmer
# github.com/wasmerio/go-ext-wasm/wasmer
exec: "gcc": executable file not found in $PATH
Than I did sudo apt install gcc and installed gcc.
Post that the go get for wasmer is giving mentioned error.
Any pointer on what might have gone wrong?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (13 by maintainers)
I hit this or a similar problem in my own fork. Go 1.14 has better type checking for CGo. It caught a type errors in the bridge.go file that I had modified. I believe that is what is going on here.