From: Chen Qi <[email protected]>

Yocto/OE has its own way to control binary stripping. So don't do
it in the go build process. Otherwise, we'll get empty dbg packages.

Setting DBG=1 solves this problem, as stated in comments in the Makefile.
"""
  # Note: Specify DBG=1 for building unstripped binaries, which allows you to 
use code debugging
  # tools like delve. When DBG is unspecified, it defaults to "-s -w" which 
strips debug
  # information.
"""

Signed-off-by: Chen Qi <[email protected]>
---
 recipes-containers/kubernetes/kubernetes_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-containers/kubernetes/kubernetes_git.bb 
b/recipes-containers/kubernetes/kubernetes_git.bb
index 3a6e711..8b7c9e0 100644
--- a/recipes-containers/kubernetes/kubernetes_git.bb
+++ b/recipes-containers/kubernetes/kubernetes_git.bb
@@ -87,7 +87,7 @@ do_compile() {
        export GOBIN=""
 
        # to limit what is built, use 'WHAT', i.e. make WHAT=cmd/kubelet
-       make cross CGO_FLAGS=${CGO_FLAGS} GO=${GO} 
KUBE_BUILD_PLATFORMS=${GOOS}/${GOARCH} GOLDFLAGS=""
+       make cross CGO_FLAGS=${CGO_FLAGS} GO=${GO} 
KUBE_BUILD_PLATFORMS=${GOOS}/${GOARCH} GOLDFLAGS="" DBG=1
 }
 
 do_install() {
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#8113): 
https://lists.yoctoproject.org/g/meta-virtualization/message/8113
Mute This Topic: https://lists.yoctoproject.org/mt/99823673/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to