Closed karfield closed 2 years ago
got same issue on mac catalina, intel, go 1.16
Thanks for report. We're checking this issue on MacOS.
WasmEdge-go
is developed for the Linux platforms on early stage. It may have some issues in other platforms.
Tried by following https://github.com/WasmEdge/WasmEdge/blob/master/docs/build_on_mac.md
( using llvm@12, and set with CGO_CFLAGS and CGO_LDFLAGS to new built dir ) , I got a new issue:
CGO_CFLAGS="-I/Users/karfield/Projects/WasmEdge/build/include/common -I/Users/karfield/Projects/WasmEdge/build/include -I/Users/karfield/Projects/WasmEdge/build/include/api -I/Users/karfield/Projects/WasmEdge/build/include/api/wasmedge" CGO_LDFLAGS="-L/Users/karfield/Projects/WasmEdge/build/lib" go build .
# github.com/second-state/WasmEdge-go/wasmedge
./configure.go:133:14: could not determine kind of name for C.WasmEdge_ConfigureCompilerIsCostMeasuring
./configure.go:125:14: could not determine kind of name for C.WasmEdge_ConfigureCompilerIsInstructionCounting
./configure.go:129:2: could not determine kind of name for C.WasmEdge_ConfigureCompilerSetCostMeasuring
./configure.go:121:2: could not determine kind of name for C.WasmEdge_ConfigureCompilerSetInstructionCounting
those looks WasmEdge-Go is OUT-OF-DATE with latest WasmEdge mainstream.
so I lookup the symbols, found:
grep -Rn ConfigureCompilerSetCostMeasuring .
./Changelog.md:59: * Renamed `WasmEdge_ConfigureCompilerSetCostMeasuring` to `WasmEdge_ConfigureStatisticsSetCostMeasuring`.
./.CurrentChangelog.md:59: * Renamed `WasmEdge_ConfigureCompilerSetCostMeasuring` to `WasmEdge_ConfigureStatisticsSetCostMeasuring`.
seems go version needs to update with latest wasmedge. guys.
Hi @karfield ,
The master
branch of WasmEdge
is on 0.9.0-rc.2
stage. If you want to build from source, please use the 0.8.2
tag of WasmEdge
.
Or, you can try the v0.9.0-rc3
tag of WasmEdge-go
. Thanks.
Hi @karfield
I found the root cause of this issue. We only set the LDFLAGS on linux platform in our cgo.go
.
To fix this, we will have a patch to add #cgo darwin LDFLAGS: -lwasmedge_c
Reference: https://github.com/second-state/WasmEdge-go/blob/master/wasmedge/cgo.go#L4
#cgo linux LDFLAGS: -lwasmedge_c
Hi @karfield and @kannman We just fixed this issue with adding LDFLAGS for darwin. You can use the latest release 0.9.0-rc.5 on macos.
Thanks for addressing this issue. :-)
cgo link errors while installing wasmedge-go on macos 11.6 big sur.
my go version is
1.17.2
, llvm: 13.0.0, and wasmedge is installed correctly on my mac.