deps: Bump lief to 0.16.5 #32431

pull davidgumberg wants to merge 1 commits into bitcoin:master from davidgumberg:5-6-25-lief-noci changing 4 files +66 −63
  1. davidgumberg commented at 0:59 am on May 7, 2025: contributor

    Partially resolves #30520

    1. Fixes an existing bug, where bcrypt.dll was not one of the expected symbols in contrib/devtools/symbol-check.py, even though this symbol gets included by way of secp256k1:https://github.com/bitcoin/bitcoin/blob/44057fe38ccc5d05a6249413467e002db2ae023d/src/secp256k1/examples/CMakeLists.txt#L9
    2. Updates the version of the lief package to 0.16.5
    3. Add usage notes for contrib/devtools/security-check.py
  2. DrahtBot commented at 0:59 am on May 7, 2025: contributor

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

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32431.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept ACK laanwj, hebasto

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #25573 ([POC] guix: produce a fully -static-pie bitcoind by fanquake)
    • #24123 (guix: Pointer Authentication and Branch Target Identification for aarch64 Linux by fanquake)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  3. davidgumberg force-pushed on May 7, 2025
  4. DrahtBot added the label CI failed on May 7, 2025
  5. DrahtBot commented at 1:29 am on May 7, 2025: contributor

    🚧 At least one of the CI tasks failed. Task lint: https://github.com/bitcoin/bitcoin/runs/41764401882 LLM reason (✨ experimental): (empty)

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

  6. davidgumberg force-pushed on May 7, 2025
  7. davidgumberg force-pushed on May 7, 2025
  8. laanwj commented at 5:51 am on May 7, 2025: member

    Concept ACK.

    Fixes an existing bug, where bcrypt.dll was not one of the expected symbols in contrib/devtools/symbol-check.py, even though this symbol gets included by way of secp256k1:

    From what i understand, that’s only used for the example, not for the library itself. The bcrypt-using code (fill_random in examples/examples_util.h) is never included in the library.

    It’s unlikely that the LIEF version changes anything there.

  9. laanwj added the label Build system on May 7, 2025
  10. hebasto commented at 6:13 am on May 7, 2025: member
    Also the LIEF version must be bumped here
  11. in contrib/guix/manifest.scm:163 in 3d1465f074 outdated
    157@@ -158,7 +158,7 @@ chain for " target " development."))
    158 (define-public python-lief
    159   (package
    160     (name "python-lief")
    161-    (version "0.13.2")
    162+    (version "0.16.5")
    


    hebasto commented at 6:16 am on May 7, 2025:
    Does Guix build succeed?

    davidgumberg commented at 6:20 am on May 7, 2025:
    In the process of testing this, I’ll mark as draft in the meanwhile.
  12. hebasto commented at 6:17 am on May 7, 2025: member
    Concept ACK.
  13. davidgumberg force-pushed on May 7, 2025
  14. davidgumberg commented at 6:23 am on May 7, 2025: contributor

    From what i understand, that’s only used for the example, not for the library itself. The bcrypt-using code (fill_random in examples/examples_util.h) is never included in the library.

    It’s unlikely that the LIEF version changes anything there.

    Oops, my bad, I must have ran symbol-check.py against a stale build of the bcrypt branch, rebased to drop adding bcrypt to symbol-check.py, marking draft until I test this as working in Guix.

  15. davidgumberg marked this as a draft on May 7, 2025
  16. DrahtBot removed the label CI failed on May 7, 2025
  17. fanquake commented at 8:05 am on May 7, 2025: member

    Add usage notes for contrib/devtools/security-check.py

    I think you can actually remove these docs. The symbol / security scripts are not for general developer usage, and there’s no expectation that the scripts should pass, outside of a Guix build. We could move them out of contrib to make this more clear.

    Fixes an existing bug, where bcrypt.dll was not one of the expected symbols in contrib/devtools/symbol-check.py, even though this symbol gets included by way of secp256k1:

    This seems to be a symptom of the above. Dependencies in libsecp256k1 example code, are not relevant for our release builds. Looking at a Guix build of master, I cannot see any dependency on bcrypt.dll in any binary.

  18. in contrib/devtools/security-check.py:277 in ae6c79c319 outdated
    283 
    284 if __name__ == '__main__':
    285     retval: int = 0
    286     for filename in sys.argv[1:]:
    287         binary = lief.parse(filename)
    288+        if binary is None:
    


    fanquake commented at 8:12 am on May 7, 2025:
    Was this added to appease a linter? There should be no need for code like this, as every file passed to these scripts in Guix, is a binary. Leaving the script to fail if .parse fails is fine.

    davidgumberg commented at 0:56 am on May 9, 2025:
    Yes, but it was to appease the CI linter, I understand now that this script is not meant for general use, so I changed this to just cast to lief.Binary without checking
  19. davidgumberg force-pushed on May 9, 2025
  20. davidgumberg force-pushed on May 9, 2025
  21. davidgumberg commented at 0:51 am on May 9, 2025: contributor

    I think you can actually remove these docs.

    Thanks, fixed. I did not understand that these were not meant for use outside of Guix builds,

    I definitely opened this PR prematurely, thinking I could get away with just bumping the version and fixing the python scripts 😂.

    Working on getting guix builds working right, I referenced prior art by @willcl-ark here (https://github.com/willcl-ark/bitcoin/commit/ede9aa93fe6339fe6285c954dc8fbd9ae8623916).

    The python build is convinced that a build option is set in config-settings, even when I override configure-flags, which is where config-settings is supposed to get it’s value from (https://github.com/fanquake/guix/blob/ac2d792aae241f5233ee3fdfa29cd3dbaeb9338c/guix/build/pyproject-build-system.scm#L107-L111) :

     0starting phase `set-pythonpath'
     1phase `set-pythonpath' succeeded after 0.0 seconds
     2starting phase `change-directory'
     3phase `change-directory' succeeded after 0.0 seconds
     4starting phase `build'
     5Using 'setup' to build wheels, auto-detected 'setup', override '#f'.
     6ERROR: Unrecognized options in config-settings:
     7  build -> Did you mean: build-dir?
     8error: in phase 'build': uncaught exception:
     9%exception #<&invoke-error program: "python" arguments: ("-c" "import sys, importlib, json\nconfig_settings = json.loads (sys.argv[3])\nbuilder = importlib.import_module(sys.argv[1])\nbuilder.build_wheel(sys.argv[2], config_settings=config_settings)" "setup" "dist" "[]") exit-status: 7 term-signal: #f stop-signal: #f>
    10phase `build' failed after 0.1 seconds
    11command "python" "-c" "import sys, importlib, json\nconfig_settings = json.loads (sys.argv[3])\nbuilder = importlib.import_module(sys.argv[1])\nbuilder.build_wheel(sys.argv[2], config_settings
    
  22. deps: bump lief to 0.16.5
    Some of the primary changes are:
    - lief.EXE_FORMATS became lief.Binary.FORMATS IN 0.14.0
            - https://github.com/lief-project/LIEF/blob/494f116c6b8c9163fc4b5f6497233f18424981ee/doc/sphinx/changelog.rst?plain=1#L702
    - lief.ARCHITECTURES became lief.Header.ARCHITECTURES in 0.16.0
            - https://github.com/lief-project/LIEF/blob/494f116c6b8c9163fc4b5f6497233f18424981ee/doc/sphinx/changelog.rst?plain=1#L226C18-L227C18
    - lief.ELF.ARCH.x86_64 became lief.ELF.ARCH.X86_64
    
    Co-authored-by: willcl-ark <will8clark@gmail.com>
    69d59f7092
  23. davidgumberg force-pushed on May 9, 2025
  24. laanwj commented at 11:17 am on May 9, 2025: member

    The symbol / security scripts are not for general developer usage, and there’s no expectation that the scripts should pass, outside of a Guix build. We could move them out of contrib to make this more clear.

    i think this makes sense, especially for the symbol check. It doesn’t have any use outside the guix build. The security check may have some value as a more general “binary security check”. But moving both to a guix-specific path would be fine with me.

  25. fanquake commented at 12:54 pm on May 9, 2025: member

    But moving both to a guix-specific path would be fine with me.

    See #32458.


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: 2025-05-11 15:12 UTC

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