FS#73677 - [alertmanager] FTBFS
Attached to Project:
Arch Linux
Opened by Jeffrey Pan (XieJiSS) - Tuesday, 08 February 2022, 06:10 GMT
Last edited by Jelle van der Waa (jelly) - Tuesday, 08 February 2022, 16:30 GMT
Opened by Jeffrey Pan (XieJiSS) - Tuesday, 08 February 2022, 06:10 GMT
Last edited by Jelle van der Waa (jelly) - Tuesday, 08 February 2022, 16:30 GMT
|
Details
Description:
Failed to build from source due to inappropriate ${LDFLAGS} in PKGBUILD Build output: # github.com/prometheus/alertmanager/cmd/alertmanager flag provided but not defined: -flto usage: link [options] main.o Additional info: * package version(s) 0.23.0-3 (latest) * config and/or log files etc. * link to upstream bug report, if any Steps to reproduce: asp checkout extra-x86_64-build In PKGBUILD: ``` go build -ldflags "-extldflags ${LDFLAGS} ...(trimmed)" ``` However, as lto is enabled by default, $LDFLAGS now contains space: -Wl,foobar -flto. This causes -flto to be interpreted as a go tool link argument instead of being passed to the external linker. Patched version: use \"\" to wrap $LDFLAGS. ``` go build -ldflags "-extldflags \"${LDFLAGS}\" ...(trimmed)" ``` |
This task depends upon
Closed by Jelle van der Waa (jelly)
Tuesday, 08 February 2022, 16:30 GMT
Reason for closing: Fixed
Additional comments about closing: Quoting the flags doesn't make it compile, as golang still doesn't know what to do with -flto. So I added options=(!lto) in svn now.
Tuesday, 08 February 2022, 16:30 GMT
Reason for closing: Fixed
Additional comments about closing: Quoting the flags doesn't make it compile, as golang still doesn't know what to do with -flto. So I added options=(!lto) in svn now.