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

external (cgo) linking - failure to build groupcache #310

Open
daniejstriata opened this issue Feb 13, 2024 · 1 comment
Open

external (cgo) linking - failure to build groupcache #310

daniejstriata opened this issue Feb 13, 2024 · 1 comment

Comments

@daniejstriata
Copy link
Collaborator

When building gdu 5.26.0 in COPR for the various rpm distros, the Fedora Rawhide builds fail with the error snip below. (All the other distros builds) I set the go build command like:
GO111MODULE=on CGO_ENABLED=0 go build \

Is groupcache requiring cgo on newer versions of go? Should I enable cgo for all builds or only Rawhide?

go: downloading github.com/cespare/xxhash v1.1.0
go: downloading github.com/klauspost/compress v1.12.3
go: downloading golang.org/x/net v0.0.0-20220722155237-a158d28d115b
go: downloading github.com/cespare/xxhash/v2 v2.1.1
go: downloading github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
go: downloading github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6
-linkmode=external requires external (cgo) linking, but cgo is not enabled
error: Bad exit status from /var/tmp/rpm-tmp.XO7oTi (%build)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.XO7oTi (%build)
Finish: rpmbuild gdu-5.26.0-1.fc40.src.rpm
Finish: build phase for gdu-5.26.0-1.fc40.src.rpm
INFO: chroot_scan: 1 files copied to /var/lib/copr-rpmbuild/results/chroot_scan
INFO: /var/lib/mock/fedora-rawhide-aarch64-1707806942.943790/root/var/log/dnf5.log
ERROR: Exception(/var/lib/copr-rpmbuild/results/gdu-5.26.0-1.fc40.src.rpm) Config(fedora-rawhide-aarch64) 0 minutes 20 seconds
INFO: Results and/or logs in: /var/lib/copr-rpmbuild/results
INFO: Cleaning up build root ('cleanup_on_failure=True')
Start: clean chroot
@dundee
Copy link
Owner

dundee commented Feb 13, 2024

I think you need to remove -linkmode=external from gdu.spec. CGO is not used by Gdu or it's dependencies and should be disabled.

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

No branches or pull requests

2 participants