Closed steffenfritz closed 1 month ago
This is because you have the latest version of the Rust library, but an older version of the Go module. I've published v0.3.0 for the Go module now. You should be able to do: go get github.com/VirusTotal/yara-x/go@v0.3.0
and everything should go fine.
Yes, I can confirm. Thanks!
I built the C library as documented here: https://virustotal.github.io/yara-x/docs/api/c/c-/#building-the-c-library without errors.
Adding it to a project with
import yarax "github.com/VirusTotal/yara-x/go"
and building the Go code fails with:Machine:
Go Environement:
GO111MODULE='' GOARCH='arm64' GOBIN='' GOCACHE='/Users/steffen/Library/Caches/go-build' GOENV='/Users/steffen/Library/Application Support/go/env' GOEXE='' GOEXPERIMENT='' GOFLAGS='' GOHOSTARCH='arm64' GOHOSTOS='darwin' GOINSECURE='' GONOPROXY='' GONOSUMDB='' GOOS='darwin' GOPATH='/Users/steffen/go' GOPRIVATE='' GOPROXY='https://proxy.golang.org,direct' GOROOT='/opt/homebrew/Cellar/go/1.22.3/libexec' GOSUMDB='sum.golang.org' GOTMPDIR='' GOTOOLCHAIN='auto' GOTOOLDIR='/opt/homebrew/Cellar/go/1.22.3/libexec/pkg/tool/darwin_arm64' GOVCS='' GOVERSION='go1.22.3' GCCGO='gccgo' AR='ar' CC='cc' CXX='c++' CGO_ENABLED='1' GOWORK='' CGO_CFLAGS='-O2 -g' CGO_CPPFLAGS='' CGO_CXXFLAGS='-O2 -g' CGO_FFLAGS='-O2 -g' CGO_LDFLAGS='-O2 -g' PKG_CONFIG='pkg-config' GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/rt/mbz5zkp533sgg49fmm6ky3tr0000gn/T/go-build4207267908=/tmp/go-build -gno-record-gcc-switches -fno-common'