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

LDFLAGS is not set correctly on macOS (darwin) #18

Closed karfield closed 2 years ago

karfield commented 2 years ago

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.

go get -v -u github.com/second-state/WasmEdge-go/wasmedge 
github.com/second-state/WasmEdge-go/wasmedge
# github.com/second-state/WasmEdge-go/wasmedge
Undefined symbols for architecture x86_64:
  "_WasmEdge_ASTModuleDelete", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ASTModuleDelete in _x002.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ASTModuleDelete)
  "_WasmEdge_CompilerCompile", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_CompilerCompile in _x005.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_CompilerCompile)
  "_WasmEdge_CompilerCreate", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_CompilerCreate in _x005.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_CompilerCreate)
  "_WasmEdge_CompilerDelete", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_CompilerDelete in _x005.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_CompilerDelete)
  "_WasmEdge_ConfigureAddHostRegistration", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureAddHostRegistration in _x006.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureAddHostRegistration)
  "_WasmEdge_ConfigureAddProposal", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureAddProposal in _x006.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureAddProposal)
  "_WasmEdge_ConfigureCompilerGetOptimizationLevel", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureCompilerGetOptimizationLevel in _x006.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureCompilerGetOptimizationLevel)
  "_WasmEdge_ConfigureCompilerIsCostMeasuring", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureCompilerIsCostMeasuring in _x006.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureCompilerIsCostMeasuring)
  "_WasmEdge_ConfigureCompilerIsDumpIR", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureCompilerIsDumpIR in _x006.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureCompilerIsDumpIR)
  "_WasmEdge_ConfigureCompilerIsInstructionCounting", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureCompilerIsInstructionCounting in _x006.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureCompilerIsInstructionCounting)
  "_WasmEdge_ConfigureCompilerSetCostMeasuring", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureCompilerSetCostMeasuring in _x006.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureCompilerSetCostMeasuring)
  "_WasmEdge_ConfigureCompilerSetDumpIR", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureCompilerSetDumpIR in _x006.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureCompilerSetDumpIR)
  "_WasmEdge_ConfigureCompilerSetInstructionCounting", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureCompilerSetInstructionCounting in _x006.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureCompilerSetInstructionCounting)
  "_WasmEdge_ConfigureCompilerSetOptimizationLevel", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureCompilerSetOptimizationLevel in _x006.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureCompilerSetOptimizationLevel)
  "_WasmEdge_ConfigureCreate", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureCreate in _x006.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureCreate)
  "_WasmEdge_ConfigureDelete", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureDelete in _x006.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureDelete)
  "_WasmEdge_ConfigureHasHostRegistration", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureHasHostRegistration in _x006.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureHasHostRegistration)
  "_WasmEdge_ConfigureHasProposal", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureHasProposal in _x006.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureHasProposal)
  "_WasmEdge_ConfigureRemoveHostRegistration", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureRemoveHostRegistration in _x006.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureRemoveHostRegistration)
  "_WasmEdge_ConfigureRemoveProposal", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureRemoveProposal in _x006.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ConfigureRemoveProposal)
  "_WasmEdge_FunctionInstanceGetFunctionType", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_FunctionInstanceGetFunctionType in _x007.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_FunctionInstanceGetFunctionType)
  "_WasmEdge_FunctionTypeCreate", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_FunctionTypeCreate in _x008.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_FunctionTypeCreate)
  "_WasmEdge_FunctionTypeDelete", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_FunctionTypeDelete in _x010.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_FunctionTypeDelete)
  "_WasmEdge_FunctionTypeGetParameters", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_FunctionTypeGetParameters in _x008.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_FunctionTypeGetParametersLength, __cgo_0190cfa8e5d1_Cfunc_WasmEdge_FunctionTypeGetParameters )
  "_WasmEdge_FunctionTypeGetParametersLength", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_FunctionTypeGetParametersLength in _x008.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_FunctionTypeGetParametersLength)
  "_WasmEdge_FunctionTypeGetReturns", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_FunctionTypeGetReturns in _x008.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_FunctionTypeGetReturnsLength, __cgo_0190cfa8e5d1_Cfunc_WasmEdge_FunctionTypeGetReturns )
  "_WasmEdge_FunctionTypeGetReturnsLength", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_FunctionTypeGetReturnsLength in _x008.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_FunctionTypeGetReturnsLength)
  "_WasmEdge_GlobalInstanceCreate", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_GlobalInstanceCreate in _x009.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_GlobalInstanceCreate)
  "_WasmEdge_GlobalInstanceDelete", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_GlobalInstanceDelete in _x009.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_GlobalInstanceDelete)
  "_WasmEdge_GlobalInstanceGetMutability", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_GlobalInstanceGetMutability in _x009.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_GlobalInstanceGetMutability)
  "_WasmEdge_GlobalInstanceGetValType", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_GlobalInstanceGetValType in _x009.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_GlobalInstanceGetValType)
  "_WasmEdge_GlobalInstanceGetValue", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_GlobalInstanceGetValue in _x009.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_GlobalInstanceGetValue)
  "_WasmEdge_GlobalInstanceSetValue", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_GlobalInstanceSetValue in _x009.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_GlobalInstanceSetValue)
  "_WasmEdge_HostFunctionCreateBinding", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_HostFunctionCreateBinding in _x010.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_HostFunctionCreateBinding)
  "_WasmEdge_HostFunctionDelete", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_HostFunctionDelete in _x010.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_HostFunctionDelete)
  "_WasmEdge_ImportObjectAddGlobal", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ImportObjectAddGlobal in _x011.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ImportObjectAddGlobal)
  "_WasmEdge_ImportObjectAddHostFunction", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ImportObjectAddHostFunction in _x011.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ImportObjectAddHostFunction)
  "_WasmEdge_ImportObjectAddMemory", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ImportObjectAddMemory in _x011.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ImportObjectAddMemory)
  "_WasmEdge_ImportObjectAddTable", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ImportObjectAddTable in _x011.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ImportObjectAddTable)
  "_WasmEdge_ImportObjectCreate", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ImportObjectCreate in _x011.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ImportObjectCreateWasmEdgeProcess, __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ImportObjectCreate , __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ImportObjectCreateWASI )
  "_WasmEdge_ImportObjectCreateWASI", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ImportObjectCreateWASI in _x011.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ImportObjectCreateWASI)
  "_WasmEdge_ImportObjectCreateWasmEdgeProcess", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ImportObjectCreateWasmEdgeProcess in _x011.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ImportObjectCreateWasmEdgeProcess)
  "_WasmEdge_ImportObjectDelete", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ImportObjectDelete in _x011.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ImportObjectDelete)
  "_WasmEdge_ImportObjectInitWASI", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ImportObjectInitWASI in _x011.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ImportObjectInitWASI)
  "_WasmEdge_ImportObjectInitWasmEdgeProcess", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ImportObjectInitWasmEdgeProcess in _x011.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ImportObjectInitWasmEdgeProcess)
  "_WasmEdge_InterpreterCreate", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_InterpreterCreate in _x012.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_InterpreterCreate)
  "_WasmEdge_InterpreterDelete", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_InterpreterDelete in _x012.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_InterpreterDelete)
  "_WasmEdge_InterpreterInstantiate", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_InterpreterInstantiate in _x012.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_InterpreterInstantiate)
  "_WasmEdge_InterpreterInvoke", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_InterpreterInvoke in _x012.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_InterpreterInvoke, __cgo_0190cfa8e5d1_Cfunc_WasmEdge_InterpreterInvokeRegistered )
  "_WasmEdge_InterpreterInvokeRegistered", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_InterpreterInvokeRegistered in _x012.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_InterpreterInvokeRegistered)
  "_WasmEdge_InterpreterRegisterImport", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_InterpreterRegisterImport in _x012.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_InterpreterRegisterImport)
  "_WasmEdge_InterpreterRegisterModule", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_InterpreterRegisterModule in _x012.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_InterpreterRegisterModule)
  "_WasmEdge_LoaderCreate", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_LoaderCreate in _x014.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_LoaderCreate)
  "_WasmEdge_LoaderDelete", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_LoaderDelete in _x014.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_LoaderDelete)
  "_WasmEdge_LoaderParseFromBuffer", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_LoaderParseFromBuffer in _x014.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_LoaderParseFromBuffer)
  "_WasmEdge_LoaderParseFromFile", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_LoaderParseFromFile in _x014.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_LoaderParseFromFile)
  "_WasmEdge_LogSetDebugLevel", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_LogSetDebugLevel in _x015.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_LogSetDebugLevel)
  "_WasmEdge_LogSetErrorLevel", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_LogSetErrorLevel in _x015.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_LogSetErrorLevel)
  "_WasmEdge_MemoryInstanceCreate", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_MemoryInstanceCreate in _x016.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_MemoryInstanceCreate)
  "_WasmEdge_MemoryInstanceDelete", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_MemoryInstanceDelete in _x016.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_MemoryInstanceDelete)
  "_WasmEdge_MemoryInstanceGetData", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_MemoryInstanceGetData in _x016.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_MemoryInstanceGetData)
  "_WasmEdge_MemoryInstanceGetPageSize", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_MemoryInstanceGetPageSize in _x016.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_MemoryInstanceGetPageSize)
  "_WasmEdge_MemoryInstanceGrowPage", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_MemoryInstanceGrowPage in _x016.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_MemoryInstanceGrowPage)
  "_WasmEdge_MemoryInstanceSetData", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_MemoryInstanceSetData in _x016.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_MemoryInstanceSetData)
  "_WasmEdge_ResultGetMessage", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ResultGetMessage in _x017.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ResultGetMessage)
  "_WasmEdge_ResultOK", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ResultOK in _x005.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ResultOK)
  "_WasmEdge_StatisticsCreate", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StatisticsCreate in _x018.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StatisticsCreate)
  "_WasmEdge_StatisticsDelete", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StatisticsDelete in _x018.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StatisticsDelete)
  "_WasmEdge_StatisticsGetInstrCount", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StatisticsGetInstrCount in _x018.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StatisticsGetInstrCount)
  "_WasmEdge_StatisticsGetInstrPerSecond", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StatisticsGetInstrPerSecond in _x018.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StatisticsGetInstrPerSecond)
  "_WasmEdge_StatisticsGetTotalCost", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StatisticsGetTotalCost in _x018.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StatisticsGetTotalCost)
  "_WasmEdge_StatisticsSetCostLimit", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StatisticsSetCostLimit in _x018.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StatisticsSetCostLimit)
  "_WasmEdge_StatisticsSetCostTable", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StatisticsSetCostTable in _x018.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StatisticsSetCostTable)
  "_WasmEdge_StoreCreate", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreCreate in _x019.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreCreate)
  "_WasmEdge_StoreDelete", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreDelete in _x019.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreDelete)
  "_WasmEdge_StoreFindFunction", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreFindFunction in _x019.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreFindFunction, __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreFindFunctionRegistered )
  "_WasmEdge_StoreFindFunctionRegistered", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreFindFunctionRegistered in _x019.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreFindFunctionRegistered)
  "_WasmEdge_StoreFindGlobal", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreFindGlobal in _x019.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreFindGlobalRegistered, __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreFindGlobal )
  "_WasmEdge_StoreFindGlobalRegistered", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreFindGlobalRegistered in _x019.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreFindGlobalRegistered)
  "_WasmEdge_StoreFindMemory", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreFindMemory in _x019.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreFindMemoryRegistered, __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreFindMemory )
  "_WasmEdge_StoreFindMemoryRegistered", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreFindMemoryRegistered in _x019.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreFindMemoryRegistered)
  "_WasmEdge_StoreFindTable", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreFindTable in _x019.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreFindTableRegistered, __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreFindTable )
  "_WasmEdge_StoreFindTableRegistered", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreFindTableRegistered in _x019.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreFindTableRegistered)
  "_WasmEdge_StoreListFunctionLength", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreListFunctionLength in _x019.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreListFunctionLength)
  "_WasmEdge_StoreListFunctionRegisteredLength", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreListFunctionRegisteredLength in _x019.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreListFunctionRegisteredLength)
  "_WasmEdge_StoreListGlobalLength", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreListGlobalLength in _x019.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreListGlobalLength)
  "_WasmEdge_StoreListGlobalRegisteredLength", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreListGlobalRegisteredLength in _x019.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreListGlobalRegisteredLength)
  "_WasmEdge_StoreListMemoryLength", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreListMemoryLength in _x019.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreListMemoryLength)
  "_WasmEdge_StoreListMemoryRegisteredLength", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreListMemoryRegisteredLength in _x019.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreListMemoryRegisteredLength)
  "_WasmEdge_StoreListModule", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreListModule in _x019.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreListModuleLength, __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreListModule )
  "_WasmEdge_StoreListModuleLength", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreListModuleLength in _x019.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreListModuleLength)
  "_WasmEdge_StoreListTableLength", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreListTableLength in _x019.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreListTableLength)
  "_WasmEdge_StoreListTableRegisteredLength", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreListTableRegisteredLength in _x019.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StoreListTableRegisteredLength)
  "_WasmEdge_StringDelete", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StringDelete in _x019.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StringDelete)
  "_WasmEdge_StringWrap", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StringWrap in _x020.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_StringWrap)
  "_WasmEdge_TableInstanceCreate", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_TableInstanceCreate in _x021.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_TableInstanceCreate)
  "_WasmEdge_TableInstanceDelete", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_TableInstanceDelete in _x021.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_TableInstanceDelete)
  "_WasmEdge_TableInstanceGetData", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_TableInstanceGetData in _x021.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_TableInstanceGetData)
  "_WasmEdge_TableInstanceGetRefType", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_TableInstanceGetRefType in _x021.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_TableInstanceGetRefType)
  "_WasmEdge_TableInstanceGetSize", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_TableInstanceGetSize in _x021.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_TableInstanceGetSize)
  "_WasmEdge_TableInstanceGrow", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_TableInstanceGrow in _x021.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_TableInstanceGrow)
  "_WasmEdge_TableInstanceSetData", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_TableInstanceSetData in _x021.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_TableInstanceSetData)
  "_WasmEdge_VMCleanup", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMCleanup in _x025.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMCleanup)
  "_WasmEdge_VMCreate", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMCreate in _x025.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMCreate)
  "_WasmEdge_VMDelete", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMDelete in _x025.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMDelete)
  "_WasmEdge_VMExecute", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMExecute in _x025.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMExecuteRegistered, __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMExecute )
  "_WasmEdge_VMExecuteRegistered", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMExecuteRegistered in _x025.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMExecuteRegistered)
  "_WasmEdge_VMGetFunctionList", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMGetFunctionList in _x025.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMGetFunctionListLength, __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMGetFunctionList )
  "_WasmEdge_VMGetFunctionListLength", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMGetFunctionListLength in _x025.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMGetFunctionListLength)
  "_WasmEdge_VMGetFunctionType", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMGetFunctionType in _x025.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMGetFunctionTypeRegistered, __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMGetFunctionType )
  "_WasmEdge_VMGetFunctionTypeRegistered", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMGetFunctionTypeRegistered in _x025.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMGetFunctionTypeRegistered)
  "_WasmEdge_VMGetImportModuleContext", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMGetImportModuleContext in _x025.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMGetImportModuleContext)
  "_WasmEdge_VMGetStatisticsContext", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMGetStatisticsContext in _x025.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMGetStatisticsContext)
  "_WasmEdge_VMGetStoreContext", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMGetStoreContext in _x025.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMGetStoreContext)
  "_WasmEdge_VMInstantiate", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMInstantiate in _x025.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMInstantiate)
  "_WasmEdge_VMLoadWasmFromASTModule", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMLoadWasmFromASTModule in _x025.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMLoadWasmFromASTModule)
  "_WasmEdge_VMLoadWasmFromBuffer", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMLoadWasmFromBuffer in _x025.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMLoadWasmFromBuffer)
  "_WasmEdge_VMLoadWasmFromFile", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMLoadWasmFromFile in _x025.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMLoadWasmFromFile)
  "_WasmEdge_VMRegisterModuleFromASTModule", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMRegisterModuleFromASTModule in _x025.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMRegisterModuleFromASTModule)
  "_WasmEdge_VMRegisterModuleFromBuffer", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMRegisterModuleFromBuffer in _x025.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMRegisterModuleFromBuffer)
  "_WasmEdge_VMRegisterModuleFromFile", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMRegisterModuleFromFile in _x025.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMRegisterModuleFromFile)
  "_WasmEdge_VMRegisterModuleFromImport", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMRegisterModuleFromImport in _x025.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMRegisterModuleFromImport)
  "_WasmEdge_VMValidate", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMValidate in _x025.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VMValidate)
  "_WasmEdge_ValidatorCreate", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValidatorCreate in _x022.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValidatorCreate)
  "_WasmEdge_ValidatorDelete", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValidatorDelete in _x022.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValidatorDelete)
  "_WasmEdge_ValidatorValidate", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValidatorValidate in _x022.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValidatorValidate)
  "_WasmEdge_ValueGenF32", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValueGenF32 in _x023.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValueGenF32)
  "_WasmEdge_ValueGenF64", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValueGenF64 in _x023.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValueGenF64)
  "_WasmEdge_ValueGenFuncRef", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValueGenFuncRef in _x023.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValueGenFuncRef)
  "_WasmEdge_ValueGenI32", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValueGenI32 in _x023.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValueGenI32)
  "_WasmEdge_ValueGenI64", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValueGenI64 in _x023.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValueGenI64)
  "_WasmEdge_ValueGenV128", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValueGenV128 in _x023.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValueGenV128)
  "_WasmEdge_ValueGetF32", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValueGetF32 in _x023.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValueGetF32)
  "_WasmEdge_ValueGetF64", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValueGetF64 in _x023.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValueGetF64)
  "_WasmEdge_ValueGetI32", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValueGetI32 in _x023.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValueGetI32)
  "_WasmEdge_ValueGetI64", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValueGetI64 in _x023.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValueGetI64)
  "_WasmEdge_ValueGetV128", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValueGetV128 in _x023.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_ValueGetV128)
  "_WasmEdge_VersionGet", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VersionGet in _x024.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VersionGetMinor, __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VersionGet , __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VersionGetPatch , __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VersionGetMajor )
  "_WasmEdge_VersionGetMajor", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VersionGetMajor in _x024.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VersionGetMajor)
  "_WasmEdge_VersionGetMinor", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VersionGetMinor in _x024.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VersionGetMinor)
  "_WasmEdge_VersionGetPatch", referenced from:
      __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VersionGetPatch in _x024.o
     (maybe you meant: __cgo_0190cfa8e5d1_Cfunc_WasmEdge_VersionGetPatch)
ld: symbol(s) not found for architecture x86_64
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
kannman commented 2 years ago

got same issue on mac catalina, intel, go 1.16

q82419 commented 2 years ago

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.

karfield commented 2 years ago

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.

q82419 commented 2 years ago

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.

hydai commented 2 years ago

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
hydai commented 2 years ago

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. :-)