Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save belonesox/8318648c97a91f9f112144c128ecb313 to your computer and use it in GitHub Desktop.
Save belonesox/8318648c97a91f9f112144c128ecb313 to your computer and use it in GitHub Desktop.
Problem with rebuilding golang-github-prometheus-alertmanager on FC38, FC39

Problem with rebuilding golang-github-prometheus-alertmanager on FC38, FC39

Using toolbox with FC39 to demonstrate:

wget https://dl.fedoraproject.org/pub/fedora/linux/releases/39/Everything/source/tree/Packages/g/golang-github-prometheus-alertmanager-0.23.0-15.fc39.src.rpm 

toolbox create bug-prometeus-fc39 --distro fedora --release 39 -y 
toolbox -c bug-prometeus-fc39  run sudo dnf builddep -y ./golang-github-prometheus-alertmanager-0.23.0-15.fc39.src.rpm

toolbox -c bug-prometeus-fc39  run  sudo dnf install -y rpm-build

toolbox -c bug-prometeus-fc39  run  rpmbuild --rebuild ./golang-github-prometheus-alertmanager-0.23.0-15.fc39.src.rpm

We got

/usr/lib/golang/pkg/tool/linux_amd64/compile -o $WORK/b001/_pkg_.a -trimpath "$WORK/b001=>" -p main -complete -installsuffix shared -buildid -QZCO0
O1fW7TXN3Oi8Tr/-QZCO0O1fW7TXN3Oi8Tr -goversion go1.21.6 -c=4 -shared -nolocalimports -importcfg $WORK/b001/importcfg -pack ./_build/src/github.com/
prometheus/alertmanager/cmd/alertmanager/main.go
# github.com/prometheus/alertmanager/cmd/alertmanager
_build/src/github.com/prometheus/alertmanager/cmd/alertmanager/main.go:194:37: not enough arguments in call to webflag.AddFlags
        have (*"gopkg.in/alecthomas/kingpin.v2".Application)
        want (*"github.com/alecthomas/kingpin/v2".Application, string)
_build/src/github.com/prometheus/alertmanager/cmd/alertmanager/main.go:216:23: cannot use kingpin.CommandLine (variable of type *"gopkg.in/alecthom
as/kingpin.v2".Application) as *"github.com/alecthomas/kingpin/v2".Application value in argument to promlogflag.AddFlags
_build/src/github.com/prometheus/alertmanager/cmd/alertmanager/main.go:519:37: cannot use *webConfig (variable of type web.FlagConfig) as *web.Flag
Config value in argument to web.ListenAndServe
error: Bad exit status from /var/tmp/rpm-tmp.rqpddF (%build)

Same problem with FC38 (checked), and probably with Rawhide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment