Created
July 13, 2023 09:49
-
-
Save TomasTomecek/2abcdb8b33eb96d31cdc58eb138dc344 to your computer and use it in GitHub Desktop.
Find the error in the rpmbuild output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
/usr/lib/golang/pkg/tool/linux_amd64/compile -o $WORK/b852/_pkg_.a -trimpath "$WORK/b852=>" -p github.com/containers/podman/v4/pkg/specgen/generate/kube -lang=go1.18 -complete -installsuffix shared -buildid AXJTWutV-zkO52RMAmWr/AXJTWutV-zkO52RMAmWr -goversion go1.20.5 -shared -c=2 -nolocalimports -importcfg $WORK/b852/importcfg -pack ./pkg/specgen/generate/kube/kube.go ./pkg/specgen/generate/kube/seccomp.go ./pkg/specgen/generate/kube/volume.go | |
# github.com/containers/podman/v4/pkg/specgen/generate/kube | |
pkg/specgen/generate/kube/kube.go:617:3: undefined: portNum | |
pkg/specgen/generate/kube/kube.go:619:3: undefined: portNum | |
pkg/specgen/generate/kube/kube.go:621:9: undefined: portNum | |
github.com/containers/podman/v4/pkg/systemd/generate | |
mkdir -p $WORK/b853/ | |
cat >/tmp/go-build1875107258/b853/importcfg << 'EOF' # internal | |
# import config | |
packagefile bytes=/tmp/go-build1875107258/b027/_pkg_.a | |
packagefile errors=/tmp/go-build1875107258/b003/_pkg_.a | |
packagefile fmt=/tmp/go-build1875107258/b038/_pkg_.a | |
packagefile github.com/containers/podman/v4/libpod=/tmp/go-build1875107258/b707/_pkg_.a | |
packagefile github.com/containers/podman/v4/libpod/define=/tmp/go-build1875107258/b426/_pkg_.a | |
packagefile github.com/containers/podman/v4/pkg/domain/entities=/tmp/go-build1875107258/b413/_pkg_.a | |
packagefile github.com/containers/podman/v4/pkg/systemd/define=/tmp/go-build1875107258/b827/_pkg_.a | |
packagefile github.com/containers/podman/v4/version=/tmp/go-build1875107258/b427/_pkg_.a | |
packagefile github.com/sirupsen/logrus=/tmp/go-build1875107258/b160/_pkg_.a | |
packagefile github.com/spf13/pflag=/tmp/go-build1875107258/b057/_pkg_.a | |
packagefile os=/tmp/go-build1875107258/b041/_pkg_.a | |
packagefile sort=/tmp/go-build1875107258/b040/_pkg_.a | |
packagefile strconv=/tmp/go-build1875107258/b037/_pkg_.a | |
packagefile strings=/tmp/go-build1875107258/b049/_pkg_.a | |
packagefile text/template=/tmp/go-build1875107258/b070/_pkg_.a | |
packagefile time=/tmp/go-build1875107258/b022/_pkg_.a | |
EOF | |
/usr/lib/golang/pkg/tool/linux_amd64/compile -o $WORK/b853/_pkg_.a -trimpath "$WORK/b853=>" -p github.com/containers/podman/v4/pkg/systemd/generate -lang=go1.18 -complete -installsuffix shared -buildid e2gfU6emmewsZ2QPZEo4/e2gfU6emmewsZ2QPZEo4 -goversion go1.20.5 -shared -c=2 -nolocalimports -importcfg $WORK/b853/importcfg -pack ./pkg/systemd/generate/common.go ./pkg/systemd/generate/containers.go ./pkg/systemd/generate/pods.go | |
/usr/lib/golang/pkg/tool/linux_amd64/buildid -w $WORK/b851/_pkg_.a # internal | |
cp $WORK/b851/_pkg_.a /builddir/.cache/go-build/99/997870759dc68b3e4dee718f430d1c378c56764eb78743ae8fe13b8e6b8d2083-d # internal | |
/usr/lib/golang/pkg/tool/linux_amd64/buildid -w $WORK/b853/_pkg_.a # internal | |
cp $WORK/b853/_pkg_.a /builddir/.cache/go-build/74/74bef0efd82600907aab16e4804180f8066f0afe269a997b0c26898b684b44be-d # internal | |
``` | |
################## | |
# ChatGPT Answer # | |
################## | |
The root cause of the error is that there are undefined symbols in the source code of the podman package during the RPM build process. Specifically, the symbols portNum are undefined in the file pkg/specgen/generate/kube/kube.go. | |
To fix this error, you need to address the undefined symbols. Here's the likely way to fix it: | |
Locate the source code for the podman package, which should be available in a directory like /builddir/build/BUILD/podman-<version>. | |
Open the file pkg/specgen/generate/kube/kube.go mentioned in the error log. | |
Go to line 617, 619, and 621 in the file and check how the symbol portNum is being used. It seems that portNum is not defined in the current scope, which is causing the error. | |
Find the correct definition or import statement for portNum and add it to the file kube.go. Make sure the definition or import statement is correct and compatible with the rest of the codebase. | |
Save the changes to kube.go and reattempt the RPM build process. | |
By addressing the undefined symbols, you should be able to resolve the error. However, it's important to note that modifying the source code of a package may require careful consideration, especially if you are an RPM package maintainer. You should ensure that the modifications are necessary and don't introduce any unintended side effects. Additionally, it may be helpful to report the issue upstream to the developers of podman so that they can address it officially in a future release. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment