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

Fix xxhash asm build errors #64

Conversation

chrismeyers
Copy link

Related issue in krakend-ce: krakend/krakend-ce#439 (comment)


I have been running into issues when trying to upgrade to KrakenD v2 that appear to be related to krakend-opencensus. When trying to build a custom plugin, I run into the following error:

# github.com/cespare/xxhash/v2
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/cespare/xxhash/v2@v2.1.1/xxhash_amd64.s:120)       ADDQ    R15, AX
asm: assembly failed

The above error has been fixed in github.com/cespare/xxhash/v2 v2.1.2 (cespare/xxhash#54), but the version of github.com/prometheus/client_golang used in this project is using github.com/cespare/xxhash/v2 v2.1.1. The xxhash dependency was updated in prometheus/client_golang#913 (v1.12.0).

NOTE: Additional dependencies were updated in this PR. I believe this is just a result of updated transitive dependencies. I'm still pretty new to Go and the module dependency system, so please let me know if this needs to be fixed. I just updated the version of github.com/prometheus/client_golang in go.mod and ran go mod tidy.

@chrismeyers
Copy link
Author

@kpacha @taik0 - I noticed you were the top contributors in this project and just wanted to make sure you were aware of this. I was able to build a local KrakenD image with these changes and confirm that the above build error is resolved and custom plugins are successfully loading. This is blocking our company's upgrade to KrakenD v2, so if this can be included in an upcoming release (hopefully krakend-ce v2.0.5) that would be much appreciated!

@taik0
Copy link
Member

taik0 commented May 15, 2022

Hi @chrismeyers

We are investigating this issue, since this problem also happens when using klausspost/compress which has the cespare/xxhash vendored manually...
So we need to update other dependencies and check that everything works as expected before merging this.

Thank you!

@chrismeyers
Copy link
Author

Something changed with krakend-ce v2.0.5 that solved the error I was getting, I'll close this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants