bcc's tools/funccount_example.txt documents tracing a binary that
upstream placed under /home/ubuntu:
# ./funccount -p 1442 /home/ubuntu/contentions:*
Tracing 15 functions for "/home/ubuntu/contentions:*"...
If /home/ubuntu is in the $PATH, then the following command will also work:
That is documentation prose, not a leaked build path, but the buildpaths
QA check flags any packaged file containing the builder's HOME, so on a
host whose HOME is /home/ubuntu it warns twice - once for the copy in
${datadir}/bcc/tools/doc and once for the copy do_install_ptest places
in ${libdir}/tools:
WARNING: bcc-0.37.0-r0 do_package_qa: QA Issue: File
/usr/share/bcc/tools/doc/funccount_example.txt in package bcc contains
a reference to the build host HOME directory. [buildpaths]
WARNING: bcc-0.37.0-r0 do_package_qa: QA Issue: File
/usr/lib/tools/funccount_example.txt in package bcc-ptest contains a
reference to the build host HOME directory. [buildpaths]
Both packaged copies are byte identical to the file in the upstream tree
and contain no reference to TMPDIR, confirming nothing is baked in at
build time. Set OEQA_BUILDPATHS_SKIP as the QA message suggests, which
suppresses only the HOME half of the check; the TMPDIR half still guards
against real build path leaks. oe-core does the same for sudo, perl,
python3-numpy and python3-pytest.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
LLVM 23 changed the MCContext constructor to take MCAsmInfo,
MCRegisterInfo and MCSubtargetInfo by reference rather than by pointer,
so bcc no longer builds:
src/cc/bcc_debug.cc:151:68: error: no matching function for call to
'llvm::MCContext::MCContext(...)'
Backport the upstream fix. It is guarded on LLVM_VERSION_MAJOR so older
Clang keeps working. There is no release carrying it yet; v0.37.0 is
still the newest tag.
Co-authored-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Signed-off-by: Sunil Dora <sunilkumar.dora@windriver.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
tests/cc passes -DCMAKE_CURRENT_BINARY_DIR="${CMAKE_CURRENT_BINARY_DIR}" to
every test object so the tests can find archive.zip, the debuginfo libraries
and dummy_proc_map.txt at runtime. That put 13 copies of the absolute build
directory into the installed test binary:
QA Issue: File /usr/lib/bcc/ptest/tests/cc/test_libbcc_no_libbpf in package
bcc-ptest contains reference to TMPDIR [buildpaths]
and, on autobuilders whose TMPDIR sits below $HOME, additionally:
QA Issue: ... contains a reference to the build host HOME directory.
The recipe worked around this by installing the assets to ${D}${B}/tests/cc,
i.e. by reproducing the build path inside the image, and by demoting
buildpaths to a warning.
Add a patch introducing a TEST_ASSET_DIR cache variable, defaulting to
CMAKE_CURRENT_BINARY_DIR so the upstream default is unchanged, and point it at
${PTEST_PATH}/tests/cc. The assets are now installed next to the test binaries
and no build path is embedded, so the buildpaths overrides can go away.
Also install dummy_proc_map.txt, which the tests reference but which was never
shipped.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
0001-Add-ARM64-syscall-prefix-detection-in-C-API.patch
0002-Add-riscv-syscall-prefix-detection-in-C-API.patch
0003-folly-tracing-Remove-x86-specific-naming-from-tracin.patch
0004-folly-tracing-Add-ARM-and-AArch64-support-to-static-.patch
0001-Fix-build-with-LLVM-22.patch
removed since they're included in 0.37.0
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Without xz present, compilation fails with the following error:
| <...>/x86_64-oe-linux-ld: warning: liblzma.so.5, needed by <...>/libbcc.so, not found (try using -rpath or -rpath-link)
| <...>/x86_64-oe-linux-ld: <...>/libbcc.so: undefined reference to `lzma_code@XZ_5.0'
| <...>/x86_64-oe-linux-ld: <...>/libbcc.so: undefined reference to `lzma_end@XZ_5.0'
| <...>/x86_64-oe-linux-ld: <...>/libbcc.so: undefined reference to `lzma_stream_decoder@XZ_5.0'
| collect2: error: ld returned 1 exit status
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This resolves USDT probe test failures on ARM64 platforms.
Without these changes, the .note.stapsdt section containing probe
information was missing entirely on ARM64, causing test failures when
attempting to find and attach to USDT probes in the BCC test suite.
Upstream-Status: Submitted [https://github.com/iovisor/bcc/pull/5491]
Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
These recipes depend on clang, and clang being on core
it is better place for these tools to be in a common
layer for now that is meta-oe
Signed-off-by: Khem Raj <raj.khem@gmail.com>