What version of Go are you using (go version
)?
go1.17.5
What operating system are you using?
Mac OS 12.1 (Intel)
What version of Badger are you using?
v3.2103.2
Does this issue reproduce with the latest master?
Yes.
Steps to Reproduce the issue
Any go package that depends on Badger and builds using buildmode=plugin or anything using dynamic link will see the error:
when dynamic linking, R15 is clobbered by a global variable access and is used here
To reproduce this, try the following:
git clone https://github.com/appbaseio/reactivesearch-api
make clean && make
^ The above project uses buildmode=plugin to build and badger is a dependency of it.
This is originating from cespare/xxhash
module, the issue is described over here: cespare/xxhash#54. It’s fixed in their latest release: v2.1.2. Updating this module to this release in badger should resolve this issue.
Further reference is here: github.com/golang/go/issues/43661.
What Badger options were set?
N/A
What did you do?
Built the go code
What did you expect to see?
A successful build
What did you see instead?
go build --buildmode=plugin -o build/plugins/auth.so plugins/auth/main/auth.go
# github.com/cespare/xxhash
asm: xxhash_amd64.s:120: when dynamic linking, R15 is clobbered by a global variable access and is used here: 00092 (/Users/sid/.gvm/pkgsets/go1.17.5/global/pkg/mod/github.com/cespare/xxhash@v1.1.0/xxhash_amd64.s:120) ADDQ R15, AX