Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to soIve IoTDB compile error with iotdb-client-go?

Can not build the file session_example.go. The error info is

go build session_exmaple.go
github.com/apache/iotdb-client-go/rpc
/root/go/src/github.com/apache/iotdb-client-go/rpc/rpc.go:106:36: not enough arguments in call to iprot.ReadStructBegin
have ()
want (context.Context)
/root/go/src/github.com/apache/iotdb-client-go/rpc/rpc.go:114:55: not enough arguments in call to iprot.ReadFieldBegin
have ()
want (context.Context)
/root/go/src/github.com/apache/iotdb-client-go/rpc/rpc.go:198:32: too many errors

The functions of interface TProtocol of thrift does not match. There may be other errors which may not be printed.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You may check where thrift is 0.13.0 or later version.
Without go mod, you can try as follow:

# get thrift 0.13.0
go get github.com/apache/thrift
cd $GOPATH/src/github.com/apache/thrift
git checkout 0.13.0

mkdir -p $GOPATH/src/iotdb-client-go-example/session_example
cd $GOPATH/src/iotdb-client-go-example/session_example

curl -o session_example.go -L https://github.com/apache/iotdb-client-go/raw/main/example/session_example.go
go run session_example.go
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading