Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin build failing with 2.0 #439

Closed
henrisokka opened this issue Mar 17, 2022 · 6 comments
Closed

Plugin build failing with 2.0 #439

henrisokka opened this issue Mar 17, 2022 · 6 comments

Comments

@henrisokka
Copy link

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/compress@v1.13.1/zstd/internal/xxhash/xxhash_amd64.s:120)       ADDQ    R15, AX
asm: assembly failed

The dependency klauspost/compress has already patched the bug (klauspost/compress#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:

  1. clone krakend-ce and go to folder
  2. git checkout tags/v2.0.0
  3. copy your plugin code to krakend-ce/plugins
  4. go build -buildmode=plugin plugins/plugin.go
@flyznex
Copy link

flyznex commented Mar 18, 2022

Check my Issue #437 and you need update xxhash to version v2.1.2 to solve it

@taik0
Copy link
Member

taik0 commented Mar 18, 2022

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.

@chrismeyers
Copy link

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

@github-actions
Copy link

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.

@github-actions github-actions bot added the stale label Sep 30, 2022
@github-actions
Copy link

This issue was closed because it has been marked as stalled for 15 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 15, 2022
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants