tetratelabs / istio-weekly

Demos, slides, resources and other stuff from Istio Weekly and Istio Big Talk episodes
Apache License 2.0
74 stars 30 forks source link

Issue while compiling wasm extension with tinygo #14

Open Abhijeet104 opened 2 years ago

Abhijeet104 commented 2 years ago

Hi Team, I've latest tinygo & go installed locally. On compiling the main.go as suggested on the page in ep07 getting lot of errors, pasting the output below. Did I miss something?

../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:151:6: ProxyLog redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:20:6:     other declaration of ProxyLog
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:155:6: ProxySetProperty redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:107:6:    other declaration of ProxySetProperty
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:159:6: ProxyGetProperty redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:104:6:    other declaration of ProxyGetProperty
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:163:6: ProxySendLocalResponse redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:23:6:     other declaration of ProxySendLocalResponse
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:169:6: ProxyGetSharedData redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:27:6:     other declaration of ProxyGetSharedData
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:173:6: ProxySetSharedData redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:30:6:     other declaration of ProxySetSharedData
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:177:6: ProxyRegisterSharedQueue redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:33:6:     other declaration of ProxyRegisterSharedQueue
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:181:6: ProxyResolveSharedQueue redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:36:6:     other declaration of ProxyResolveSharedQueue
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:185:6: ProxyDequeueSharedQueue redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:39:6:     other declaration of ProxyDequeueSharedQueue
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:189:6: ProxyEnqueueSharedQueue redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:42:6:     other declaration of ProxyEnqueueSharedQueue
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:193:6: ProxyGetHeaderMapValue redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:45:6:     other declaration of ProxyGetHeaderMapValue
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:197:6: ProxyAddHeaderMapValue redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:48:6:     other declaration of ProxyAddHeaderMapValue
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:201:6: ProxyReplaceHeaderMapValue redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:51:6:     other declaration of ProxyReplaceHeaderMapValue
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:205:6: ProxyContinueStream redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:69:6:     other declaration of ProxyContinueStream
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:209:6: ProxyCloseStream redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:72:6:     other declaration of ProxyCloseStream
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:212:6: ProxyRemoveHeaderMapValue redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:54:6:     other declaration of ProxyRemoveHeaderMapValue
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:216:6: ProxyGetHeaderMapPairs redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:57:6:     other declaration of ProxyGetHeaderMapPairs
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:220:6: ProxySetHeaderMapPairs redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:60:6:     other declaration of ProxySetHeaderMapPairs
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:224:6: ProxyGetBufferBytes redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:63:6:     other declaration of ProxyGetBufferBytes
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:228:6: ProxySetBufferBytes redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:66:6:     other declaration of ProxySetBufferBytes
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:232:6: ProxyHttpCall redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:75:6:     other declaration of ProxyHttpCall
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:238:6: ProxyCallForeignFunction redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:80:6:     other declaration of ProxyCallForeignFunction
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:242:6: ProxySetTickPeriodMilliseconds redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:83:6:     other declaration of ProxySetTickPeriodMilliseconds
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:246:6: ProxySetEffectiveContext redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:86:6:     other declaration of ProxySetEffectiveContext
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:250:6: ProxyDone redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:89:6:     other declaration of ProxyDone
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:254:6: ProxyDefineMetric redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:92:6:     other declaration of ProxyDefineMetric
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:259:6: ProxyIncrementMetric redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:95:6:     other declaration of ProxyIncrementMetric
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:263:6: ProxyRecordMetric redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:98:6:     other declaration of ProxyRecordMetric
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls_mock.go:267:6: ProxyGetMetric redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/abi_hostcalls.go:101:6:    other declaration of ProxyGetMetric
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/hostcall_utils_tinygo.go:28:6: RawBytePtrToString redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/hostcall_utils_go.go:28:6:     other declaration of RawBytePtrToString
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/hostcall_utils_tinygo.go:36:6: RawBytePtrToByteSlice redeclared in this block
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/hostcall_utils_go.go:37:6:     other declaration of RawBytePtrToByteSlice
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/hostcall_utils_go.go:32:9: cannot use size (variable of type int) as uintptr value in struct literal
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/hostcall_utils_go.go:33:9: cannot use size (variable of type int) as uintptr value in struct literal
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/hostcall_utils_go.go:41:9: cannot use size (variable of type int) as uintptr value in struct literal
../../../../go/pkg/mod/github.com/tetratelabs/proxy-wasm-go-sdk@v0.16.1-0.20220223010114-7b68c2382bf8/proxywasm/internal/hostcall_utils_go.go:42:9: cannot use size (variable of type int) as uintptr value in struct literal
Abhijeet104 commented 2 years ago

Installed versions: go : go1.15.2 darwin/amd64 tinygo : 0.22.0 darwin/amd64 (using go version go1.15.2 and LLVM version 13.0.0)

peterj commented 2 years ago

There might be some mismatch between the versions used in ep07 -- for the latest and greatest tutorial, check this: https://tetratelabs.github.io/wasm-workshop/1_prerequisites/

Let me know if you still can get it to work and we can ask other experts as well on the community slack