second-state / WasmEdge-go

The GO language SDK and API for WasmEdge
https://www.secondstate.io/articles/extend-golang-app-with-webassembly-rust/
Apache License 2.0
107 stars 16 forks source link

could not determine kind of name for C.WasmEdge_* #15

Closed damon3465 closed 3 years ago

damon3465 commented 3 years ago
go get -u github.com/second-state/WasmEdge-go/wasmedge
../../../go/pkg/mod/github.com/second-state/!wasm!edge-go@v0.8.2/wasmedge/configure.go:31:50: could not determine kind of name for C.WasmEdge_CompilerOptimizationLevel_O0
../../../go/pkg/mod/github.com/second-state/!wasm!edge-go@v0.8.2/wasmedge/configure.go:33:50: could not determine kind of name for C.WasmEdge_CompilerOptimizationLevel_O1
../../../go/pkg/mod/github.com/second-state/!wasm!edge-go@v0.8.2/wasmedge/configure.go:35:50: could not determine kind of name for C.WasmEdge_CompilerOptimizationLevel_O2
../../../go/pkg/mod/github.com/second-state/!wasm!edge-go@v0.8.2/wasmedge/configure.go:37:50: could not determine kind of name for C.WasmEdge_CompilerOptimizationLevel_O3
../../../go/pkg/mod/github.com/second-state/!wasm!edge-go@v0.8.2/wasmedge/configure.go:39:50: could not determine kind of name for C.WasmEdge_CompilerOptimizationLevel_Os
../../../go/pkg/mod/github.com/second-state/!wasm!edge-go@v0.8.2/wasmedge/configure.go:41:50: could not determine kind of name for C.WasmEdge_CompilerOptimizationLevel_Oz
../../../go/pkg/mod/github.com/second-state/!wasm!edge-go@v0.8.2/wasmedge/configure.go:109:35: could not determine kind of name for C.WasmEdge_ConfigureCompilerGetOptimizationLevel
../../../go/pkg/mod/github.com/second-state/!wasm!edge-go@v0.8.2/wasmedge/configure.go:133:14: could not determine kind of name for C.WasmEdge_ConfigureCompilerIsCostMeasuring
../../../go/pkg/mod/github.com/second-state/!wasm!edge-go@v0.8.2/wasmedge/configure.go:117:14: could not determine kind of name for C.WasmEdge_ConfigureCompilerIsDumpIR
../../../go/pkg/mod/github.com/second-state/!wasm!edge-go@v0.8.2/wasmedge/configure.go:125:14: could not determine kind of name for C.WasmEdge_ConfigureCompilerIsInstructionCounting
../../../go/pkg/mod/github.com/second-state/!wasm!edge-go@v0.8.2/wasmedge/configure.go:129:2: could not determine kind of name for C.WasmEdge_ConfigureCompilerSetCostMeasuring
../../../go/pkg/mod/github.com/second-state/!wasm!edge-go@v0.8.2/wasmedge/configure.go:113:2: could not determine kind of name for C.WasmEdge_ConfigureCompilerSetDumpIR
../../../go/pkg/mod/github.com/second-state/!wasm!edge-go@v0.8.2/wasmedge/configure.go:121:2: could not determine kind of name for C.WasmEdge_ConfigureCompilerSetInstructionCounting
../../../go/pkg/mod/github.com/second-state/!wasm!edge-go@v0.8.2/wasmedge/configure.go:105:2: could not determine kind of name for C.WasmEdge_ConfigureCompilerSetOptimizationLevel

Hi , i just want to use wasmedge-go examples but when i try this command in terminal i get this error.

go version go1.16 linux/amd64 wasmedge version 0.8.2

Also in vs code error

juntao commented 3 years ago

@q82419 Can you look into this? I can reproduce this issue. It fails at go get -u

q82419 commented 3 years ago

Hi @damon3465 ,

Please follow the guide to install WasmEdge shared library in README first: https://github.com/second-state/WasmEdge-go#wasmedge-shared-library-installation

Thanks.

damon3465 commented 3 years ago

My Installation stpes are; 1- install go 1.16 2- install Rust and Rustwasmc 3- install wasmedge wget -qO- https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -e all url 4- install WasmEdge shared library installation

Thats all.

I can't run this section => WasmEdge-tensorflow shared library installation

hydai commented 3 years ago

Hi @damon3465 Could you please try wget -qO- https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -e all --version=0.8.2

The install script will get the latest release of WasmEdge which is 0.9.0-rc.1. It is not compatible with WasmEdge-go 0.8.2

q82419 commented 3 years ago

Hi @damon3465 ,

You installed the WasmEdge with the master branch, which was updated to the 0.9.0-rc.1 pre-release and some API had changed. The WasmEdge-go in current version still focus on WasmEdge-0.8.2 version and keep on developing for the 0.9.0 release. Please follow the README to install the 0.8.2 version first.

Thanks.

damon3465 commented 3 years ago

@hydai when i try this stpes another pc there is a no problem why? I mean, this code is downloading 0.8.2

damon3465 commented 3 years ago

Please update your README files there is a many conflict i think and i cant understand some times.Also I cant know that if there is a no relase

q82419 commented 3 years ago

We're preparing for 0.9.0 release and update the installation guide. Thanks.

juntao commented 3 years ago

@damon3465 Did you install both WasmEdge and the NPM packages on the same machine? Since the NPM package version was lagging behind, it might cause the problems you were seeing. I have created new GitHub Actions to run the GO SDK examples on Linux.