krakend-ce
krakend-ce copied to clipboard
Plugin build failing with 2.0
When trying to build plugins for 2.0 with it's dependencies we got following error:
# github.com/klauspost/compress/zstd/internal/xxhash
asm: xxhash_amd64.s:120: when dynamic linking, R15 is clobbered by a global variable access and is used here: 00092 (/go/pkg/mod/github.com/klauspost/[email protected]/zstd/internal/xxhash/xxhash_amd64.s:120) ADDQ R15, AX
asm: assembly failed
The dependency klauspost/compress
has already patched the bug (https://github.com/klauspost/compress/pull/430) but you're InfluxDB-library seems to be still using old version through it's github.com/influxdata/influxdb
-dependency
We were able to workaround the issue by just editing go.mod to github.com/klauspost/compress v1.13.6
and build a new Docker image.
Steps to reproduce:
- clone krakend-ce and go to folder
-
git checkout tags/v2.0.0
- copy your plugin code to
krakend-ce/plugins
-
go build -buildmode=plugin plugins/plugin.go
Check my Issue #437 and you need update xxhash to version v2.1.2 to solve it
Hi @henrisokka can you share some plugin example to trigger this error? With my current plugins I cannot reproduce it. Also please, fill the template that appears when you open the issue with your environment, versions and any other useful info.
I'm running into this issue as well after upgrading to v2.0.0. Running the following command in this repo points to krakend-opensensus
using an old version of prometheus:
$ go mod why github.com/cespare/xxhash/v2
# github.com/cespare/xxhash/v2
github.com/devopsfaith/krakend-ce/v2
github.com/devopsfaith/krakend-opencensus/v2/exporter/prometheus
github.com/prometheus/client_golang/prometheus
github.com/cespare/xxhash/v2
In my case, a plugin I built is using the cespare/xxhash/v2
library as a result of using github.com/go-redis/redis/v8 v8.11.5
:
$ go mod why github.com/cespare/xxhash/v2
# github.com/cespare/xxhash/v2
github.com/my-org/my-project/plugins/my-plugin
github.com/go-redis/redis/v8
github.com/cespare/xxhash/v2
Adding the following replace
to my go.mod allows the plugin to build, but it fails to load since it's using a different version of cespare/xxhash/v2
than what's used here in KrakenD:
replace github.com/cespare/xxhash/v2 v2.1.2 => github.com/cespare/xxhash/v2 v2.1.1
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 15 days.
This issue was closed because it has been marked as stalled for 15 days with no activity.
This issue was marked as resolved a long time ago and now has been automatically locked as there has not been any recent activity after it. You can still open a new issue and reference this link.