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

Building sharness tests fails with Go 1.17 #8550

Closed
3 tasks done
aschmahmann opened this issue Nov 14, 2021 · 1 comment · Fixed by #8821 or #8815
Closed
3 tasks done

Building sharness tests fails with Go 1.17 #8550

aschmahmann opened this issue Nov 14, 2021 · 1 comment · Fixed by #8821 or #8815
Assignees
Labels
kind/bug A bug in existing code (including security flaws) P1 High: Likely tackled by core team if no one steps up
Milestone

Comments

@aschmahmann
Copy link
Contributor

Checklist

Installation method

built from source

Version

No response

Config

No response

Description

From @lidel:

I cant build sharness deps: got some issues when running make in test/sharness in a freshly checked-out repo:

$ cd test/sharness
$ make
(...)
go build -buildmode=plugin -pkgdir "/home/lidel/.local/gopath/pkg/linux_amd64_dynlink" "-asmflags=all='-trimpath=/home/lidel/.local/gopath'" "-gcflags=all='-trimpath=/home/lidel/.local/gopath'" -o "plugin/plugins/git.so" "github.com/ipfs/go-ipfs/plugin/plugins/git/main"
# 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 (/home/lidel/.local/gopath/pkg/mod/github.com/klauspost/[email protected]/zstd/internal/xxhash/xxhash_amd64.s:120)	ADDQ	R15, AX
asm: assembly failed
# 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 (/home/lidel/.local/gopath/pkg/mod/github.com/cespare/xxhash/[email protected]/xxhash_amd64.s:120)	ADDQR15, AX
asm: assembly failed
make[1]: *** [plugin/plugins/Rules.mk:15: plugin/plugins/git.so] Error 2
make[1]: Leaving directory '/home/lidel/project/ipfs/go-ipfs'
make: *** [GNUmakefile:7: aggregate] Error 2

This issue is really cespare/xxhash#54. While we can update xxhash with something like:

github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/klauspost/compress v1.13.6 // indirect

We'll still run into this:

go build -buildmode=plugin -pkgdir "/home/adin/go/pkg/linux_amd64_dynlink"  "-asmflags=all='-trimpath='" "-gcflags=all='-trimpath='" -o "plugin/plugins/git.so" "github.com/ipfs/go-ipfs/plugin/plugins/git/main"
chmod +x "plugin/plugins/git.so"
go build -buildmode=plugin -pkgdir "/home/adin/go/pkg/linux_amd64_dynlink"  "-asmflags=all='-trimpath='" "-gcflags=all='-trimpath='" -o "plugin/plugins/badgerds.so" "github.com/ipfs/go-ipfs/plugin/plugins/badgerds/main"
# 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 (/home/adin/go/pkg/mod/github.com/cespare/[email protected]/xxhash_amd64.s:120) ADDQ    R15, AX
asm: assembly failed
make: *** [plugin/plugins/Rules.mk:15: plugin/plugins/badgerds.so] Error 2

Because Badger is on xxhash v1.1.0 which is from September 2018.

Probably the easiest fix here is to not build Badger as an external plugin since it's preloaded with go-ipfs anyway. However, we should report upstream and see if they'll fix (and if they're ok with a v1 backport).

@aschmahmann aschmahmann added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Nov 14, 2021
@BigLep BigLep added this to the go-ipfs 0.13 milestone Mar 18, 2022
@BigLep BigLep moved this to 🥞 Todo in IPFS Shipyard Team Mar 18, 2022
@lidel
Copy link
Member

lidel commented Mar 18, 2022

tested today with go1.17.8 and issue is still here (can be reproduced by clean go-ipfs clone, then doing make clean and then cd test/sharness && make).

@aschmahmann aschmahmann added P1 High: Likely tackled by core team if no one steps up and removed need/triage Needs initial labeling and prioritization labels Mar 22, 2022
@BigLep BigLep moved this from 🥞 Todo to 🏃‍♀️ In Progress in IPFS Shipyard Team Mar 22, 2022
This was linked to pull requests Mar 24, 2022
@BigLep BigLep moved this from 🏃‍♀️ In Progress to 🔎 In Review in IPFS Shipyard Team Mar 24, 2022
Repository owner moved this from 🔎 In Review to 🎉 Done in IPFS Shipyard Team Mar 24, 2022
@aschmahmann aschmahmann reopened this Mar 29, 2022
@BigLep BigLep moved this from 🎉 Done to 🔎 In Review in IPFS Shipyard Team Apr 4, 2022
Repository owner moved this from 🔎 In Review to 🎉 Done in IPFS Shipyard Team Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) P1 High: Likely tackled by core team if no one steps up
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants