Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpftrace: move from dynamic-layers/openembedded-layer to dynamic-laye… #1007

Merged
merged 3 commits into from
Sep 4, 2024

Conversation

shr-project
Copy link
Contributor

@shr-project shr-project commented Sep 3, 2024

…rs/meta-python

  • bpftrace itself doesn't depend on meta-python, but bpftrace from dynamic-layers/openembedded-layer depends on bcc from dynamic-layers/meta-python so better to move it there. This way both bcc and bpftrace are either both available at the same time or neither of them.

  • fixes bcc recipe not visible in poky #985

    ERROR: Nothing PROVIDES 'bcc' (but /mnt/secondary/poky/meta-clang/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.20.1.bb DEPENDS on or otherwise requires it). Close matches: bc byacc NOTE: Runtime target 'bpftrace' is unbuildable, removing... Missing or unbuildable dependency chain was: ['bpftrace', 'bcc'] ERROR: Required build target 'core-image-minimal' has no buildable providers. Missing or unbuildable dependency chain was: ['core-image-minimal', 'bpftrace', 'bcc']

    when only openembedded-layer (meta-oe) is in BBLAYERS and meta-python isn't.


Contributor checklist

Reviewer Guidelines

  • When submitting a review, please pick:
    • 'Approve' if this change would be acceptable in the codebase (even if there are minor or cosmetic tweaks that could be improved).
    • 'Request Changes' if this change would not be acceptable in our codebase (e.g. bugs, changes that will make development harder in future, security/performance issues, etc).
    • 'Comment' if you don't feel you have enough information to decide either way (e.g. if you have major questions, or you don't understand the context of the change sufficiently to fully review yourself, but want to make a comment)

…rs/meta-python

* bpftrace itself doesn't depend on meta-python, but
  bpftrace from dynamic-layers/openembedded-layer depends on bcc from dynamic-layers/meta-python
  so better to move it there. This way both bcc and bpftrace are either both available
  at the same time or neither of them.

* fixes kraj#985

  ERROR: Nothing PROVIDES 'bcc' (but /mnt/secondary/poky/meta-clang/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.20.1.bb DEPENDS on or otherwise requires it). Close matches:
    bc
    byacc
  NOTE: Runtime target 'bpftrace' is unbuildable, removing...
  Missing or unbuildable dependency chain was: ['bpftrace', 'bcc']
  ERROR: Required build target 'core-image-minimal' has no buildable providers.
  Missing or unbuildable dependency chain was: ['core-image-minimal', 'bpftrace', 'bcc']

  when only openembedded-layer (meta-oe) is in BBLAYERS and meta-python isn't.

Signed-off-by: Martin Jansa <[email protected]>
@kraj
Copy link
Owner

kraj commented Sep 3, 2024

hmmm let me cherry-pick the three commits from you @shr-project onto my 19.x branch, they are in mix and match right now.

@shr-project
Copy link
Contributor Author

Ups sorry, didn't intend to include the clang upgrade here, but mismatched them indeed, will repush with just the bpftrace changes, but feel free to close and handle through your PR.

WARNING: bcc-0.30.0+git-r0 do_package_qa: QA Issue: File /usr/lib/bcc/ptest/tests/cc/test_libbcc_no_libbpf in package bcc-ptest contains reference to TMPDIR [buildpaths]

This one is difficult to resolve, because the tests use CMAKE_CURRENT_BINARY_DIR directly in .cc e.g.:
iovisor/bcc@7271bfc#diff-233a0bfa490f3d7466c49935b64c86dd93956bbc0461f5af703b344cf6601461
we would probably need to use separate variable for "runtime" path for test assets from the standard CMAKE_CURRENT_BINARY_DIR variable or use relative
path from the test binary

Signed-off-by: Martin Jansa <[email protected]>
* Avoid line statements from bison to fix:
  WARNING: bpftrace-0.21.2+git-r0 do_package_qa: QA Issue: File /usr/src/debug/bpftrace/0.21.2+git/parser.tab.cc in package bpftrace-src contains reference to TMPDIR [buildpaths]
  WARNING: bpftrace-0.21.2+git-r0 do_package_qa: QA Issue: File /usr/src/debug/bpftrace/0.21.2+git/location.hh in package bpftrace-src contains reference to TMPDIR [buildpaths]
  WARNING: bpftrace-0.21.2+git-r0 do_package_qa: QA Issue: File /usr/src/debug/bpftrace/0.21.2+git/parser.tab.hh in package bpftrace-src contains reference to TMPDIR [buildpaths]
  WARNING: bpftrace-0.21.2+git-r0 do_package_qa: QA Issue: File /usr/src/debug/bpftrace/0.21.2+git/lex.yy.cc in package bpftrace-src contains reference to TMPDIR [buildpaths]

* there are still few more buildpaths issues with ptest enabled:
  WARNING: bpftrace-0.21.2+git-r0 do_package_qa: QA Issue: File /usr/src/debug/bpftrace/0.21.2+git/tests/data/dwarf_data.h in package bpftrace-src contains reference to TMPDIR [buildpaths]
  WARNING: bpftrace-0.21.2+git-r0 do_package_qa: QA Issue: File /usr/lib/bpftrace/ptest/tests/.debug/bpftrace_test in package bpftrace-dbg contains reference to TMPDIR [buildpaths]
  WARNING: bpftrace-0.21.2+git-r0 do_package_qa: QA Issue: File /usr/lib/bpftrace/ptest/tests/bpftrace_test in package bpftrace-ptest contains reference to TMPDIR [buildpaths]
  WARNING: bpftrace-0.21.2+git-r0 do_package_qa: QA Issue: File /usr/lib/bpftrace/ptest/tests/testlibs/cmake_install.cmake in package bpftrace-ptest contains reference to TMPDIR [buildpaths]
  WARNING: bpftrace-0.21.2+git-r0 do_package_qa: QA Issue: File /usr/lib/bpftrace/ptest/tests/testlibs/CTestTestfile.cmake in package bpftrace-ptest contains reference to TMPDIR [buildpaths]
  WARNING: bpftrace-0.21.2+git-r0 do_package_qa: QA Issue: File /usr/lib/bpftrace/ptest/tests/testprogs/cmake_install.cmake in package bpftrace-ptest contains reference to TMPDIR [buildpaths]
  WARNING: bpftrace-0.21.2+git-r0 do_package_qa: QA Issue: File /usr/lib/bpftrace/ptest/tests/testprogs/CTestTestfile.cmake in package bpftrace-ptest contains reference to TMPDIR [buildpaths]

* lower buildpaths from ERROR_QA to WARN_QA when ptest is enabled
  fixing .cmake files might be simple, but the embedded path to dwarf_data.h
  in bpftrace_test will be more complicated, so will leave it to
  someone actually using bpftrace (and its ptest).

  bpftrace/0.21.2+git/package $ grep -R styhead .
  ./usr/lib/bpftrace/ptest/tests/testlibs/cmake_install.cmake:# Install script for directory: ${WORKDIR}/git/tests/testlibs
  ./usr/lib/bpftrace/ptest/tests/testlibs/cmake_install.cmake:  set(CMAKE_OBJDUMP "${WORKDIR}/recipe-sysroot-native/usr/bin/aarch64-webos-linux/aarch64-webos-linux-objdump")
  ./usr/lib/bpftrace/ptest/tests/testlibs/CTestTestfile.cmake:# Source directory: ${WORKDIR}/git/tests/testlibs
  ./usr/lib/bpftrace/ptest/tests/testlibs/CTestTestfile.cmake:# Build directory: ${WORKDIR}/build/tests/testlibs
  grep: ./usr/lib/bpftrace/ptest/tests/.debug/bpftrace_test: binary file matches
  grep: ./usr/lib/bpftrace/ptest/tests/bpftrace_test: binary file matches
  ./usr/lib/bpftrace/ptest/tests/testprogs/cmake_install.cmake:# Install script for directory: ${WORKDIR}/git/tests/testprogs
  ./usr/lib/bpftrace/ptest/tests/testprogs/cmake_install.cmake:  set(CMAKE_OBJDUMP "${WORKDIR}/recipe-sysroot-native/usr/bin/aarch64-webos-linux/aarch64-webos-linux-objdump")
  ./usr/lib/bpftrace/ptest/tests/testprogs/CTestTestfile.cmake:# Source directory: ${WORKDIR}/git/tests/testprogs
  ./usr/lib/bpftrace/ptest/tests/testprogs/CTestTestfile.cmake:# Build directory: ${WORKDIR}/build/tests/testprogs
  ./usr/src/debug/bpftrace/0.21.2+git/tests/data/dwarf_data.h:constexpr inline const char *dwarf_data_cxx_path = "${WORKDIR}/build/tests/data/data_source_cxx";

Signed-off-by: Martin Jansa <[email protected]>
@kraj
Copy link
Owner

kraj commented Sep 3, 2024

Ups sorry, didn't intend to include the clang upgrade here, but mismatched them indeed, will repush with just the bpftrace changes, but feel free to close and handle through your PR.

awesome !

@kraj kraj merged commit 814d209 into kraj:master Sep 4, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bcc recipe not visible in poky
2 participants