From patchwork Mon Dec 18 06:07:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victor Kamensky X-Patchwork-Id: 36522 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28694C35274 for ; Mon, 18 Dec 2023 06:08:23 +0000 (UTC) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by mx.groups.io with SMTP id smtpd.web10.37563.1702879698144399016 for ; Sun, 17 Dec 2023 22:08:18 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=kmc0FczN; spf=pass (domain: gmail.com, ip: 209.85.210.175, mailfrom: victor.kamensky7@gmail.com) Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-6d7e67d31caso138498b3a.1 for ; Sun, 17 Dec 2023 22:08:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702879697; x=1703484497; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=vSXScv1uWrzDGG/hTjj7TZfY7ppBHO+8VsBgmKph/S4=; b=kmc0FczN3rOiu9sLRplgouQqG/KoY498WSWqX8IQPbYMjpVnrAYLCv29gRs5hD2h33 y1oqu3SarWudB+nXUDJtRItklSJvNUNFZYVr75zCYMrt49jT3qwtOhtCmgEuQCvNHE6k ushbXCXxy7WMux0LJBgjvB4j2z8PD6HOyNdFK3XMw5G2LefBVJKWDJcgKvPh3jxCu2zc jWxFsM15wmc1Uqj/Ac9To35mix0t95ae1Mw2usAtraKKB7jZzDgbZA9StzBOL5p1lyLi +ComMSeCiWp5wdLGTW+VJIKYT9eXpGfTGicvNehfIj+OX1QoOJaCZutAaqldnykiI2J4 1h4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702879697; x=1703484497; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vSXScv1uWrzDGG/hTjj7TZfY7ppBHO+8VsBgmKph/S4=; b=iFfqqzv22/IAlbsbIJepkaVYDosWsUY6DzNZ0/DSIhncM+z9xxwKriIP6GwcwxRkAn vZT8iJZVSdJhwoJekYDgZUdAbx9YNn8LsTJxEZKVg7eFMcgcclwh/udlANbdI+jrNA4G pvEpIm8KCBY6a/L8LzgZzBmSaqIDrivBtHnUEtT4C+UtQjtPhhp/XjdnIZxdkwuHQbfL rLy0D2gxankDHaMiFtv+3xREsgBTXQzJU57vOJBibnmTIbME+Rikw8PdvDNTGZwMOBxx tRt9I3tqeGtZSmAP+lGVKpPH2lwRRCLYd9mw1cD5Bbo4pp6FnRflegU3UtA6UHRddWtw x2Ng== X-Gm-Message-State: AOJu0YxSaQ5irbbbZZdxt6pGyWnQoVrelF3Dsviw226iqEUAVgN9GCOJ LKaKTZ7XNWIlBf+RlrnWJ7kKEXzn5U8= X-Google-Smtp-Source: AGHT+IECzr09n1xvYnEJYAqqrzDfv1T33zHhIdNIXphER0j25rX7ls28oRy+zGOq1AeFqLEJ/dmK+g== X-Received: by 2002:a17:902:7008:b0:1d0:b594:3367 with SMTP id y8-20020a170902700800b001d0b5943367mr6971685plk.63.1702879697219; Sun, 17 Dec 2023 22:08:17 -0800 (PST) Received: from kamensky-p15s.cisco.com ([2601:641:8080:1a70::73a5]) by smtp.gmail.com with ESMTPSA id t18-20020a170902e85200b001d0675e59f9sm18128716plg.200.2023.12.17.22.08.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 22:08:16 -0800 (PST) From: Victor Kamensky To: openembedded-core@lists.openembedded.org Cc: Martin Jansa , Victor Kamensky Subject: [PATCH 1/2] systemtap: explicit handling debuginfod library dependency Date: Sun, 17 Dec 2023 22:07:56 -0800 Message-Id: <20231218060757.14170-1-victor.kamensky7@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Dec 2023 06:08:23 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/192600 After systemtap commit 2e67b053e3796ee7cf29a39f9698729b52078406 "configury: rework debuginfod searches" automatic detection of libdebuginfod is broken. Let's handle it explicitly with debuginfod package feature. It is good to have such feature anyway. Signed-off-by: Victor Kamensky --- meta/recipes-kernel/systemtap/systemtap_git.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/recipes-kernel/systemtap/systemtap_git.bb b/meta/recipes-kernel/systemtap/systemtap_git.bb index d320a8a5e0..0a1349e128 100644 --- a/meta/recipes-kernel/systemtap/systemtap_git.bb +++ b/meta/recipes-kernel/systemtap/systemtap_git.bb @@ -24,12 +24,13 @@ STAP_DOCS ?= "--disable-docs --disable-publican --disable-refdocs" EXTRA_OECONF += "${STAP_DOCS} " -PACKAGECONFIG ??= "translator sqlite monitor python3-probes" +PACKAGECONFIG ??= "translator sqlite monitor python3-probes ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}" PACKAGECONFIG[translator] = "--enable-translator,--disable-translator,boost,bash" PACKAGECONFIG[libvirt] = "--enable-libvirt,--disable-libvirt,libvirt" PACKAGECONFIG[sqlite] = "--enable-sqlite,--disable-sqlite,sqlite3" PACKAGECONFIG[monitor] = "--enable-monitor,--disable-monitor,ncurses json-c" PACKAGECONFIG[python3-probes] = "--with-python3-probes,--without-python3-probes,python3-setuptools-native" +PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod" inherit autotools gettext pkgconfig systemd inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3-probes', 'setuptools3-base', '', d)} From patchwork Mon Dec 18 06:07:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victor Kamensky X-Patchwork-Id: 36523 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29148C46CA2 for ; Mon, 18 Dec 2023 06:08:23 +0000 (UTC) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by mx.groups.io with SMTP id smtpd.web10.37564.1702879698953256669 for ; Sun, 17 Dec 2023 22:08:19 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=kl+/rpqn; spf=pass (domain: gmail.com, ip: 209.85.215.170, mailfrom: victor.kamensky7@gmail.com) Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-5cd68a0de49so1991288a12.2 for ; Sun, 17 Dec 2023 22:08:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702879698; x=1703484498; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=e6XTO5CCeVBAT0yOYTNMzfmkUurQKCr6yiPBHdW3iNo=; b=kl+/rpqnxiR+kbtoGd2lLhUmM7rbg6utTf3wHGfa580CbXJByXOGbrVgCFAjljVO4L txqIMZghrf3q+VzQ2q2wWCvUMKIkCgJHr26nuuOe4AGCw5y30YO/wCK31W7RjsN/iHbZ RpRYWVfivOVXTCwJofTZ/IOAiCuwilobeJ55eWI2OX9cIrTUTI7zAiqEVagnH2SBEb4b iWjHvUKUfDBXdFUZxBEfLudTcX0WWg98f7yAyWiInIXn8b729hPee9Z3iUuqbVji7IvB MNy1NntAin4pmr6f5CgT5VgK7HvfQ/EBqiBmPUv4dIrxqixzkhJHsDxE2k1V+VauoKYk ckBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702879698; x=1703484498; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=e6XTO5CCeVBAT0yOYTNMzfmkUurQKCr6yiPBHdW3iNo=; b=wCyM4IP+RNJ29XC+auhny5ueNALfip8PV3UUHwDt8TOO0K3pisXuKfbGZa60GaMr/H 465UL7iiYfCDIxXEK0dB+k7LEbEFcgTBlsOYgknLujpsBxoEKdrz3g5MkfTDvL44PXhk LAwA8wsfuq1RfTAXh5t0eS6mve1gm96fq6P0j6Zys4fiSXU67NPoFutgNTUW+XdWWerp THVjbh5u+qCIMhyTrLTYYf09sxs/7qERPTnjYa+mMJ0PzitK7P+ojj1yNbMP6wrWy3+F /D2HRXzT7yBUciERSqGZLYnkN5yjMcXMM44GypNtXgjv/QCHAqS8jSZO6rUKcm+Ur46b zXPQ== X-Gm-Message-State: AOJu0Ywkvvfg4eZjXGZ59DBHoUkfn9E2NkIs55F8NfpyiMFoTBYWd9Sz z7psok4ljVGdrdqEWZKcS1oXCgDCBcg= X-Google-Smtp-Source: AGHT+IGaTLvaZo35AY6krx/kA2smjriU1eZZAqwmqP/hc/RfVcE+1MUZL4DVWgQMqaO8A609iPSgdw== X-Received: by 2002:a17:902:868f:b0:1d3:b308:adb8 with SMTP id g15-20020a170902868f00b001d3b308adb8mr1381992plo.17.1702879698104; Sun, 17 Dec 2023 22:08:18 -0800 (PST) Received: from kamensky-p15s.cisco.com ([2601:641:8080:1a70::73a5]) by smtp.gmail.com with ESMTPSA id t18-20020a170902e85200b001d0675e59f9sm18128716plg.200.2023.12.17.22.08.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 22:08:17 -0800 (PST) From: Victor Kamensky To: openembedded-core@lists.openembedded.org Cc: Martin Jansa , Victor Kamensky Subject: [PATCH 2/2] systemtap: fix libdebuginfod auto detection logic Date: Sun, 17 Dec 2023 22:07:57 -0800 Message-Id: <20231218060757.14170-2-victor.kamensky7@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231218060757.14170-1-victor.kamensky7@gmail.com> References: <20231218060757.14170-1-victor.kamensky7@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 18 Dec 2023 06:08:23 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/192601 Addresses an issue when systemtap is built in situation where debuginfod is not part of DISTRO_FEATURES and latest SystemTap has problem of auto detecting libdebuginfod library as it was reported by Martin Jansa in [1]. [1] https://lists.openembedded.org/g/openembedded-core/message/192109?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3Acreated%2C0%2Csystemtap%2C20%2C2%2C0%2C102987514 Signed-off-by: Victor Kamensky --- ...-broken-libdebuginfod-library-auto-d.patch | 51 +++++++++++++++++++ .../systemtap/systemtap_git.inc | 1 + 2 files changed, 52 insertions(+) create mode 100644 meta/recipes-kernel/systemtap/systemtap/0001-configure.ac-fix-broken-libdebuginfod-library-auto-d.patch diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-configure.ac-fix-broken-libdebuginfod-library-auto-d.patch b/meta/recipes-kernel/systemtap/systemtap/0001-configure.ac-fix-broken-libdebuginfod-library-auto-d.patch new file mode 100644 index 0000000000..98641826f6 --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap/0001-configure.ac-fix-broken-libdebuginfod-library-auto-d.patch @@ -0,0 +1,51 @@ +From 3913ad3e28a19811e1b52338112344a487057e4f Mon Sep 17 00:00:00 2001 +From: Victor Kamensky +Date: Mon, 18 Dec 2023 03:13:38 +0000 +Subject: [PATCH 1/2] configure.ac: fix broken libdebuginfod library auto + detection + +After 2e67b053e3796ee7cf29a39f9698729b52078406 "configury: rework debuginfod searches" +commit, libdebuginfod.so library auto detection is broken. It was reported by Martin Jansa +on openembedded-core mailing list [1]. + +Currently configure.ac does "AC_DEFINE([HAVE_LIBDEBUGINFOD], [1] ..." as long as +no --without-debuginfod option is passed, regardless PKG_CHECK_MODULES check result. +It seems to be bad copy/paste. Address the issue by moving the AC_DEFINE back to +PKG_CHECK_MODULES action-if-found block. + +To reproduce the issue on FC system, one can do the following +"sudo dnf remove elfutils-debuginfod-client-devel" and then try to build SystemTap +util.cxx will fail to compile because of missing elfutils/debuginfod.h because +config.h will have "#define HAVE_LIBDEBUGINFOD 1", while config.log and configure +output indicates that check for libdebuginfod library failed. + +[1] https://lists.openembedded.org/g/openembedded-core/message/192109?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3Acreated%2C0%2Csystemtap%2C20%2C2%2C0%2C102987514 + +Upstream-Status: Submitted [https://sourceware.org/pipermail/systemtap/2023q4/027914.html] +Signed-off-by: Victor Kamensky +--- + configure.ac | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index d9559c5c3..18cd7f84a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -219,12 +219,11 @@ dnl take the user at his or her word + elif test "x$with_debuginfod" != xno; then + dnl check in the system pkgconfig + PKG_CHECK_MODULES([debuginfod], [libdebuginfod >= 0.179], +- [have_debuginfod=1], ++ [have_debuginfod=1 ++ AC_DEFINE([HAVE_LIBDEBUGINFOD], [1], [Define to 1 if debuginfod is enabled.])], + [if test "x$with_debuginfod" = xyes; then + AC_MSG_ERROR(["--with-debuginfod was given, but libdebuginfod is missing or unusable."]) + fi]) +- AC_DEFINE([HAVE_LIBDEBUGINFOD], [1], [Define to 1 if debuginfod is enabled.]) +- AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi +-- +2.31.1 + diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc index 9fe85676fc..bebfa7f777 100644 --- a/meta/recipes-kernel/systemtap/systemtap_git.inc +++ b/meta/recipes-kernel/systemtap/systemtap_git.inc @@ -9,6 +9,7 @@ SRC_URI = "git://sourceware.org/git/systemtap.git;branch=master;protocol=https \ file://0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch \ file://0001-Makefile.am-remove-runtime-linux-uprobes-and-runtime.patch \ file://0001-prerelease-datestamp-fixes.patch \ + file://0001-configure.ac-fix-broken-libdebuginfod-library-auto-d.patch \ " COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64|microblazeel|mips|riscv64).*-linux'