test: fix usdt undeclared function errors on mantis #28629

pull willcl-ark wants to merge 1 commits into bitcoin:master from willcl-ark:mantis-usdt-fix changing 5 files +12 −11
  1. willcl-ark commented at 9:39 am on October 10, 2023: member

    This is one way to fix #28600

    Recently usage of undeclared functions became an error rather than a warning, in C2x. https://reviews.llvm.org/D122983?id=420290

    This change has migrated into the build tools of Ubuntu 23.10 which now causes the USDT tests to fail to compile, see #28600

    I think there are various potential fixes:

    1. Manually declare the functions we use
    2. Fix imports so that manual declarations aren’t needed
    3. Revert the new C2X behaviour and don’t error on implicit function declarations

    I would have preferred solution 2, but I believe this will require changes to the upstream bcc package. Having played with the imports I can get things working in a standalone C program, using system headers, but when building the program from a python context as we do in the test it uses its own headers (bundled with the python lib) rather than the system ones, and manually importing (some) system headers results in definition mismatches. I also investigated explicitly importing required headers from the package, which use paths like #import </virtual/bcc/bcc_helpers.h>, but this seems more obtuse and brittle than simply ignoring the warning.

    Therefore I think that until the upstream python pacakge fixes their declarations, we should fix this by setting -Wno-error=implicit-function-declaration for the tracing programs.

    cc maflcko 0xB10C

  2. test: fix usdt undeclared function errors on mantis
    Recently usage of undeclared functions became an error rather than a
    warning, in C2x. https://reviews.llvm.org/D122983?id=420290
    
    This change has migrated into the build tools of Ubuntu 23.10 which now
    causes the USDT tests to fail to compile, see
    https://github.com/bitcoin/bitcoin/issues/28600
    
    Fix this by setting `-Wno-error=implicit-function-declaration` for the
    tracing programs.
    4077e43bf6
  3. DrahtBot commented at 9:39 am on October 10, 2023: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK maflcko

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  4. DrahtBot added the label Tests on Oct 10, 2023
  5. fanquake commented at 9:45 am on October 10, 2023: member

    Therefore I think that until the upstream python pacakge fixes their declarations,

    Is there an upstream issue tracking this?

  6. willcl-ark commented at 9:46 am on October 10, 2023: member

    Therefore I think that until the upstream python pacakge fixes their declarations,

    Is there an upstream issue tracking this?

    Not to my knowledge. The closest is https://github.com/iovisor/bcc/issues/4740

    I’ll open one over there (and perhaps get clarification that this is something that they can/will fix on their side).

  7. willcl-ark commented at 9:58 am on October 10, 2023: member
  8. maflcko commented at 11:35 am on October 11, 2023: member

    lgtm ACK 4077e43bf62e5afe90d204b9ede9290ef54dee0f

    CI passed on this, and it should be trivial to revert this temporary workaround.

    I may test after merge.

  9. maflcko added this to the milestone 26.0 on Oct 11, 2023
  10. fanquake commented at 9:57 am on October 12, 2023: member
    Seems fine for now as a workaround. Can follow up if there is activity upstream.
  11. fanquake merged this on Oct 12, 2023
  12. fanquake closed this on Oct 12, 2023

  13. willcl-ark deleted the branch on Oct 12, 2023
  14. Frank-GER referenced this in commit 74a1221e45 on Oct 13, 2023
  15. 0xB10C commented at 8:19 am on October 16, 2023: contributor
    Post-merge lgtm ACK. Thanks for tackling this. I’ll update #25832 with the same flags.
  16. bitcoin locked this on Oct 15, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-23 09:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me