Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error #139

Open
lynAzrael opened this issue Sep 27, 2022 · 0 comments
Open

Build error #139

lynAzrael opened this issue Sep 27, 2022 · 0 comments

Comments

@lynAzrael
Copy link

This is my test code

package main

import (
	"fmt"
	sdk "github.com/ontio/ontology-go-sdk"
)

func main() {
	sdkClient := sdk.NewOntologySdk()
	sdkClient.NewRpcClient().SetAddress("http://dappnode1.ont.io:20336")
	height, err := sdkClient.GetCurrentBlockHeight()
	if err != nil {
		fmt.Printf("get current block height failed, err: %s\n", err.Error())
		return
	}
	fmt.Printf("current block height is %d\n", height)
}

It returns some error info where I try to build the project.

# ontSdk
/usr/local/go/pkg/tool/darwin_arm64/link: running clang failed: exit status 1
ld: warning: ignoring file /Users/lilin/go/pkg/mod/github.com/ontio/[email protected]/smartcontract/service/wasmvm/libwasmjit_onto_interface_darwin.a, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
Undefined symbols for architecture arm64:
  "_wasmjit_bytes_destroy", referenced from:
      __cgo_d02b16eeae27_Cfunc_wasmjit_bytes_destroy in 000019.o
     (maybe you meant: __cgo_d02b16eeae27_Cfunc_wasmjit_bytes_destroy)
  "_wasmjit_chain_context_create", referenced from:
      __cgo_d02b16eeae27_Cfunc_wasmjit_chain_context_create in 000019.o
     (maybe you meant: __cgo_d02b16eeae27_Cfunc_wasmjit_chain_context_create)
  "_wasmjit_construct_result", referenced from:
      __cgo_d02b16eeae27_Cfunc_wasmjit_construct_result in 000019.o
     (maybe you meant: __cgo_d02b16eeae27_Cfunc_wasmjit_construct_result)
  "_wasmjit_get_exec_step", referenced from:
      __cgo_d02b16eeae27_Cfunc_wasmjit_get_exec_step in 000019.o
     (maybe you meant: __cgo_d02b16eeae27_Cfunc_wasmjit_get_exec_step)
  "_wasmjit_get_gas", referenced from:
      __cgo_d02b16eeae27_Cfunc_wasmjit_get_gas in 000019.o
     (maybe you meant: __cgo_d02b16eeae27_Cfunc_wasmjit_get_gas)
  "_wasmjit_invoke", referenced from:
      __cgo_d02b16eeae27_Cfunc_wasmjit_invoke in 000019.o
     (maybe you meant: __cgo_d02b16eeae27_Cfunc_wasmjit_invoke)
  "_wasmjit_service_index", referenced from:
      __cgo_d02b16eeae27_Cfunc_wasmjit_service_index in 000019.o
     (maybe you meant: __cgo_d02b16eeae27_Cfunc_wasmjit_service_index)
  "_wasmjit_set_calloutput", referenced from:
      __cgo_d02b16eeae27_Cfunc_wasmjit_set_calloutput in 000019.o
     (maybe you meant: __cgo_d02b16eeae27_Cfunc_wasmjit_set_calloutput)
  "_wasmjit_set_exec_step", referenced from:
      __cgo_d02b16eeae27_Cfunc_wasmjit_set_exec_step in 000019.o
     (maybe you meant: __cgo_d02b16eeae27_Cfunc_wasmjit_set_exec_step)
  "_wasmjit_set_gas", referenced from:
      __cgo_d02b16eeae27_Cfunc_wasmjit_set_gas in 000019.o
     (maybe you meant: __cgo_d02b16eeae27_Cfunc_wasmjit_set_gas)
  "_wasmjit_validate", referenced from:
      __cgo_d02b16eeae27_Cfunc_wasmjit_validate in 000019.o
     (maybe you meant: __cgo_d02b16eeae27_Cfunc_wasmjit_validate)
ld: symbol(s) not found for architecture arm64
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant