Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package bcc for openSUSE:Factory checked in at 2021-10-01 22:29:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/bcc (Old) and /work/SRC/openSUSE:Factory/.bcc.new.2443 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "bcc" Fri Oct 1 22:29:02 2021 rev:47 rq:922456 version:0.22.0 Changes: -------- --- /work/SRC/openSUSE:Factory/bcc/bcc.changes 2021-09-17 23:26:25.225261267 +0200 +++ /work/SRC/openSUSE:Factory/.bcc.new.2443/bcc.changes 2021-10-01 22:29:15.513396787 +0200 @@ -1,0 +2,8 @@ +Fri Oct 1 02:10:01 UTC 2021 - Shung-Hsi Yu <[email protected]> + +- Use shared libbpf library instead of building it along with bcc + + Delete libbpf-0.5.tar.gz +- Fix build on i586 due to use of shared libbpf library + + Do-not-export-USDT-function-when-ENABLE_USDT-is-OFF.patch + +------------------------------------------------------------------- Old: ---- libbpf-0.5.tar.gz New: ---- Do-not-export-USDT-function-when-ENABLE_USDT-is-OFF.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bcc.spec ++++++ --- /var/tmp/diff_new_pack.VWcSiT/_old 2021-10-01 22:29:16.445398509 +0200 +++ /var/tmp/diff_new_pack.VWcSiT/_new 2021-10-01 22:29:16.445398509 +0200 @@ -26,8 +26,6 @@ %{!?with_lua: %global with_lua 0} %endif -%define libbpf_version 0.5 - Name: bcc Version: 0.22.0 Release: 0 @@ -36,12 +34,14 @@ Group: Development/Tools/Other URL: https://github.com/iovisor/bcc Source: https://github.com/iovisor/bcc/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz -Source1: https://github.com/libbpf/libbpf/archive/refs/tags/v%{libbpf_version}.0.tar.gz#/libbpf-%{libbpf_version}.tar.gz +# PATCH-FIX-UPSTREAM https://github.com/iovisor/bcc/pull/3642 +Patch1: Do-not-export-USDT-function-when-ENABLE_USDT-is-OFF.patch ExcludeArch: ppc s390 BuildRequires: bison BuildRequires: cmake >= 2.8.7 BuildRequires: flex BuildRequires: gcc-c++ +BuildRequires: libbpf-devel BuildRequires: libelf-devel BuildRequires: llvm-clang-devel >= 3.7.0 BuildRequires: llvm-devel >= 3.7.0 @@ -130,10 +130,7 @@ %prep %setup -q - -pushd src/cc/libbpf -tar xf %{SOURCE1} --strip 1 -popd +%autopatch -p1 %build # Prevent the cpp examples from compilation and installation @@ -154,6 +151,7 @@ mkdir build pushd build CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" cmake \ + -DCMAKE_USE_LIBBPF_PACKAGE=yes \ -DPYTHON_CMD=python3 \ -DREVISION_LAST=%{version} \ -DREVISION=%{version} \ ++++++ Do-not-export-USDT-function-when-ENABLE_USDT-is-OFF.patch ++++++ >From e3e181583bd417d981fa65b365db9ccfdde2174e Mon Sep 17 00:00:00 2001 From: Shung-Hsi Yu <[email protected]> Date: Thu, 30 Sep 2021 14:11:46 +0800 Subject: [PATCH 1/1] Do not export USDT function when ENABLE_USDT is OFF When compiling with CMAKE_USE_LIBBPF_PACKAGE=yes and ENABLE_USDT=OFF, linking of test_static will fail due to undefined references to `bcc_usdt_new_frompath', `bcc_usdt_close' and `bcc_usdt_new_frompid'. The reference comes from link_all.cc which references those functions irrespective of ENABLE_USDT. As a fix, introduce EXPORT_USDT and wrap references to USDT functions inside link_all.cc within #ifdef. --- src/cc/CMakeLists.txt | 1 + src/cc/link_all.cc | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/cc/CMakeLists.txt b/src/cc/CMakeLists.txt index 974fa49f..bcbbaebe 100644 --- a/src/cc/CMakeLists.txt +++ b/src/cc/CMakeLists.txt @@ -89,6 +89,7 @@ set_target_properties(bcc-shared PROPERTIES VERSION ${REVISION_LAST} SOVERSION 0 set_target_properties(bcc-shared PROPERTIES OUTPUT_NAME bcc) if(ENABLE_USDT) + add_definitions(-DEXPORT_USDT) set(bcc_usdt_sources usdt/usdt.cc usdt/usdt_args.cc) # else undefined endif() diff --git a/src/cc/link_all.cc b/src/cc/link_all.cc index e03ea76c..d3dbd9aa 100644 --- a/src/cc/link_all.cc +++ b/src/cc/link_all.cc @@ -13,9 +13,11 @@ namespace { if (::getenv("bar") != (char *)-1) return; +#ifdef EXPORT_USDT (void)bcc_usdt_new_frompid(-1, nullptr); (void)bcc_usdt_new_frompath(nullptr); (void)bcc_usdt_close(nullptr); +#endif } } LinkAll; // declare one instance to invoke the constructor } -- 2.33.0
