Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 924632 - dev-lang/go-1.22.0: Various Go packages fail to build with "-buildmode=pie requires external (cgo) linking, but cgo is not enabled
Summary: dev-lang/go-1.22.0: Various Go packages fail to build with "-buildmode=pie re...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
: 924629 924630 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-02-15 11:06 UTC by Agostino Sarubbo
Modified: 2024-05-29 17:21 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,41.35 KB, text/plain)
2024-02-15 11:06 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2024-02-15 11:06:51 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-go/go-md2man-2.0.3 fails to compile.
Discovered on: x86 (internal ref: tinderbox_x86)
System: GCC-14-SYSTEM (https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#GCC-14)

Info about the issue:
https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0014
Comment 1 Agostino Sarubbo gentoo-dev 2024-02-15 11:06:52 UTC
Created attachment 885018 [details]
build.log

build log and emerge --info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-16 00:50:54 UTC
*** Bug 924630 has been marked as a duplicate of this bug. ***
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-16 00:50:58 UTC
*** Bug 924629 has been marked as a duplicate of this bug. ***
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-16 00:51:34 UTC
I can hit this with syncthing-1.27.2 with dev-lang/go-1.22.0, but downgrading Go to dev-lang/go-1.21.7, it builds fine.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-16 00:52:05 UTC
(In reply to Sam James from comment #4)
> I can hit this with syncthing-1.27.2 with dev-lang/go-1.22.0, but
> downgrading Go to dev-lang/go-1.21.7, it builds fine.

At first, this looked like https://github.com/golang/go/issues/47949, but it doesn't make sense by itself given it's a regression and that linked bug isn't.
Comment 6 lukasstraub2 2024-04-20 10:44:44 UTC
Are you sure this is only affects x86? This comment on github suggests that it is an issue with CGO_ENABLED=0 and -buildmode=pie being incompatible and go-1.22 intentionally breaks the build in this case:
github.com/golang/go/issues/64875#issuecomment-1974786520
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-04-21 02:03:04 UTC
(In reply to lukasstraub2 from comment #6)
> Are you sure this is only affects x86? This comment on github suggests that
> it is an issue with CGO_ENABLED=0 and -buildmode=pie being incompatible and
> go-1.22 intentionally breaks the build in this case:
> github.com/golang/go/issues/64875#issuecomment-1974786520

Yeah, I've seen it on amd64 too.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-04-21 02:03:36 UTC
I hope to look at this over the weekend even though it's.. gross.