Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 919314 - =app-containers/podman-4.7.2 relocation target not defined
Summary: =app-containers/podman-4.7.2 relocation target not defined
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Zac Medico
URL: https://github.com/containers/podman/...
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2023-12-06 03:01 UTC by Rick Farina (Zero_Chaos)
Modified: 2024-01-25 18:53 UTC (History)
3 users (show)

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


Attachments
build.log (app-containers:podman-4.7.2:20231206-025758.log.bz2,218.71 KB, application/x-bzip)
2023-12-06 03:05 UTC, Rick Farina (Zero_Chaos)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Farina (Zero_Chaos) gentoo-dev 2023-12-06 03:01:58 UTC
upgrading from 4.5.0 to 4.7.2 and hit this

/usr/lib/go/pkg/tool/linux_amd64/link -o $WORK/b001/exe/a.out -importcfg $WORK/b001/importcfg.link -installsuffix shared -X=runtime.godebugDefault=panicnil=1 -buildmode=pie -buildid=64094ltGhfcbotervIVa/IJix4xUdym1GQRu9yV63/ijFnxmKU3tyK6bdR3VXA/64094ltGhfcbotervIVa -X github.com/containers/podman/v4/libpod/define.buildInfo=1701831537 -X github.com/containers/podman/v4/libpod/config._installPrefix=/usr -X github.com/containers/podman/v4/libpod/config._etcDir=/etc -X github.com/containers/podman/v4/pkg/systemd/quadlet._binDir=/usr/bin -X github.com/containers/common/pkg/config.additionalHelperBinariesDir= -extld=x86_64-pc-linux-gnu-gcc $WORK/b001/_pkg_.a
# github.com/containers/podman/v4/cmd/quadlet
loadelf: /var/tmp/portage/app-containers/podman-4.7.2/temp/go-build/11/118867aa6de3f74f12bc06b905b42a981024a4722f9c44d49098f2bb484a0c5e-d(_x001.o): 101433: sym#47 (wm4.0.681933eea8fc83966fe60a92770a2a1b): ignoring symbol in section 1 (type 0)
loadelf: /var/tmp/portage/app-containers/podman-4.7.2/temp/go-build/11/118867aa6de3f74f12bc06b905b42a981024a4722f9c44d49098f2bb484a0c5e-d(_x002.o): 101444: sym#68 (wm4.0.681933eea8fc83966fe60a92770a2a1b): ignoring symbol in section 1 (type 0)
loadelf: /var/tmp/portage/app-containers/podman-4.7.2/temp/go-build/11/118867aa6de3f74f12bc06b905b42a981024a4722f9c44d49098f2bb484a0c5e-d(_x003.o): 101452: sym#55 (wm4.0.681933eea8fc83966fe60a92770a2a1b): ignoring symbol in section 1 (type 0)
loadelf: /var/tmp/portage/app-containers/podman-4.7.2/temp/go-build/58/5838ff7facffb90b6e2007543f4fc837c37b4474593c07b6e2f2e3e56db932af-d(_x001.o): 101456: sym#47 (wm4.0.681933eea8fc83966fe60a92770a2a1b): ignoring symbol in section 1 (type 0)
loadelf: /var/tmp/portage/app-containers/podman-4.7.2/temp/go-build/58/5838ff7facffb90b6e2007543f4fc837c37b4474593c07b6e2f2e3e56db932af-d(_x002.o): 101463: sym#27 (wm4.0.681933eea8fc83966fe60a92770a2a1b): ignoring symbol in section 1 (type 0)
loadelf: /var/tmp/portage/app-containers/podman-4.7.2/temp/go-build/58/5838ff7facffb90b6e2007543f4fc837c37b4474593c07b6e2f2e3e56db932af-d(_x003.o): 101468: sym#59 (wm4.0.681933eea8fc83966fe60a92770a2a1b): ignoring symbol in section 1 (type 0)
loadelf: /var/tmp/portage/app-containers/podman-4.7.2/temp/go-build/58/5838ff7facffb90b6e2007543f4fc837c37b4474593c07b6e2f2e3e56db932af-d(_x004.o): 101474: sym#59 (wm4.0.681933eea8fc83966fe60a92770a2a1b): ignoring symbol in section 1 (type 0)
loadelf: /var/tmp/portage/app-containers/podman-4.7.2/temp/go-build/58/5838ff7facffb90b6e2007543f4fc837c37b4474593c07b6e2f2e3e56db932af-d(_x005.o): 101486: sym#79 (wm4.0.681933eea8fc83966fe60a92770a2a1b): ignoring symbol in section 1 (type 0)
loadelf: /var/tmp/portage/app-containers/podman-4.7.2/temp/go-build/58/5838ff7facffb90b6e2007543f4fc837c37b4474593c07b6e2f2e3e56db932af-d(_x006.o): 101494: sym#91 (wm4.0.681933eea8fc83966fe60a92770a2a1b): ignoring symbol in section 1 (type 0)
loadelf: /var/tmp/portage/app-containers/podman-4.7.2/temp/go-build/58/5838ff7facffb90b6e2007543f4fc837c37b4474593c07b6e2f2e3e56db932af-d(_x007.o): 101499: sym#63 (wm4.0.681933eea8fc83966fe60a92770a2a1b): ignoring symbol in section 1 (type 0)
loadelf: /var/tmp/portage/app-containers/podman-4.7.2/temp/go-build/58/5838ff7facffb90b6e2007543f4fc837c37b4474593c07b6e2f2e3e56db932af-d(_x008.o): 101504: sym#59 (wm4.0.681933eea8fc83966fe60a92770a2a1b): ignoring symbol in section 1 (type 0)
loadelf: /var/tmp/portage/app-containers/podman-4.7.2/temp/go-build/58/5838ff7facffb90b6e2007543f4fc837c37b4474593c07b6e2f2e3e56db932af-d(_x009.o): 101509: sym#78 (wm4.0.681933eea8fc83966fe60a92770a2a1b): ignoring symbol in section 1 (type 0)
loadelf: /var/tmp/portage/app-containers/podman-4.7.2/temp/go-build/58/5838ff7facffb90b6e2007543f4fc837c37b4474593c07b6e2f2e3e56db932af-d(_x010.o): 101514: sym#69 (wm4.0.681933eea8fc83966fe60a92770a2a1b): ignoring symbol in section 1 (type 0)
loadelf: /var/tmp/portage/app-containers/podman-4.7.2/temp/go-build/58/5838ff7facffb90b6e2007543f4fc837c37b4474593c07b6e2f2e3e56db932af-d(_x011.o): 101519: sym#59 (wm4.0.681933eea8fc83966fe60a92770a2a1b): ignoring symbol in section 1 (type 0)
loadelf: /var/tmp/portage/app-containers/podman-4.7.2/temp/go-build/58/5838ff7facffb90b6e2007543f4fc837c37b4474593c07b6e2f2e3e56db932af-d(_x012.o): 101525: sym#60 (wm4.0.681933eea8fc83966fe60a92770a2a1b): ignoring symbol in section 1 (type 0)
loadelf: /var/tmp/portage/app-containers/podman-4.7.2/temp/go-build/58/5838ff7facffb90b6e2007543f4fc837c37b4474593c07b6e2f2e3e56db932af-d(_x013.o): 101530: sym#71 (wm4.0.681933eea8fc83966fe60a92770a2a1b): ignoring symbol in section 1 (type 0)
os/user._cgo_6f668e16310a_Cfunc_mygetpwuid_r: relocation target _cgo_6f668e16310a_Cfunc_mygetpwuid_r not defined
runtime.cgo_yield: relocation target _cgo_yield not defined
runtime._cgo_setenv: relocation target x_cgo_setenv not defined
runtime._cgo_unsetenv: relocation target x_cgo_unsetenv not defined
_cgo_init: relocation target x_cgo_init not defined
/usr/lib/go/pkg/tool/linux_amd64/link: too many errors
make: *** [Makefile:385: bin/quadlet] Error 1


Reproducible: Always
Comment 1 Rick Farina (Zero_Chaos) gentoo-dev 2023-12-06 03:05:38 UTC
Created attachment 877655 [details]
build.log

MAKEOPTS="-j1 --shuffle=none"
Comment 2 Rick Farina (Zero_Chaos) gentoo-dev 2023-12-06 15:16:07 UTC
Confirmed, I did add lto to my setup systemwide recently enough that it may be the cause.  That said, I'm having a hard time testing that as a fix.  I tried filter-lto from flag-o-matic at the top of src_prepare and src_compile and it still fails to build.  I don't know much about how go works, but I'm able to test fixes if you have ideas.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-06 16:25:10 UTC
go-module.eclass sets up *FLAGS via go-env_set_compile_environment called in src_unpack which makes filter-lto hard to use at any reasonable point..

we'll have to call it in src_unpack before calling go-module_src_unpack
Comment 4 Rick Farina (Zero_Chaos) gentoo-dev 2023-12-06 22:32:56 UTC
Based on the URL it looks like this isn't podman specific, it's a go thing in general?  Would it make more sense to just filter-lto in go-module_src_unpack ?

Also, this very simple patch didn't fix the issue:

diff --git a/app-containers/podman/podman-4.7.2.ebuild b/app-containers/podman/podman-4.7.2.ebuild
index 2905f1069a60..759385c754bc 100644
--- a/app-containers/podman/podman-4.7.2.ebuild
+++ b/app-containers/podman/podman-4.7.2.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit go-module tmpfiles linux-info
+inherit flag-o-matic go-module tmpfiles linux-info
 
 DESCRIPTION="A tool for managing OCI containers and pods with Docker-compatible CLI"
 HOMEPAGE="https://github.com/containers/podman/ https://podman.io/"
@@ -62,6 +62,11 @@ pkg_setup() {
        linux-info_pkg_setup
 }
 
+src_unpack() {
+       filter-lto
+       go-module_src_unpack
+}
+
 src_prepare() {
        default
Comment 5 Rick Farina (Zero_Chaos) gentoo-dev 2024-01-25 18:53:02 UTC
This appears to have been caused by me overriding something in the wrong place and accidentally dumping most of my cflags.  Fixed my bug and no longer able to replicate.