Closed hrstrand closed 3 years ago
Hi @hrstrand, did you resolve this? I am getting the same error.
In case it helps, I had same problem while trying to build a go extension. To overcome this I had to use a go.mod
in my extension with the same apache thrift version used by osquery-go:
module ...
require (
github.com/apache/thrift v0.13.1-0.20200603211036-eac4d0c79a5f
github.com/osquery/osquery-go v0.0.0-20210622151333-99b4efa62ec5
)
go 1.13
I'm not sure if there's an issue here. If I build in this repo, I get a working extension:
dover:osquery-go seph$ go build -o /tmp/q.ext ./examples/query/
dover:osquery-go seph$ /tmp/q.ext /tmp/osq.sock "select version from osquery_info"
Got results:
osquery.ExtensionPluginResponse{map[string]string{"version":"4.8.0"}}
I think you can look at this. https://www.cloudwego.io/zh/docs/kitex/tutorials/code-gen/code_generation/ Maybe because of the different api interface of different versions of thrift.
go version go1.15.6 darwin/amd64
Running the default example in
https://github.com/osquery/osquery-go/blob/master/examples/query/main.go
results in compile errors :
Is this expected to work out of the box, or is there any manual Thrift work that needs to be done?