[23.x] Additional backports for 23.x #27475

pull fanquake wants to merge 3 commits into bitcoin:23.x from fanquake:23_2_more_backports changing 2 files +6 −1
  1. fanquake commented at 3:04 pm on April 17, 2023: member

    Any further backports for 23.x. Currently:

  2. build: suppress array-bounds errors in libxkbcommon
    These occur when building with GCC 12.1.
    
    It might be the case that these would be suppressed by updating the
    package, but that would also require installing new build tools (meson),
    as well as potentially more dependencies (wayland).
    
    ```bash
    In function 'ExprCreateBoolean',
        inlined from 'BoolVarCreate' at src/xkbcomp/ast-build.c:316:19:
    src/xkbcomp/ast-build.c:119:23: error: array subscript 'ExprDef[0]' is partly outside array bounds of 'unsigned char[32]' [-Werror=array-bounds]
      119 |     expr->boolean.set = set;
          |     ~~~~~~~~~~~~~~~~~~^~~~~
    In function 'ExprCreate',
        inlined from 'ExprCreateBoolean' at src/xkbcomp/ast-build.c:118:5,
        inlined from 'BoolVarCreate' at src/xkbcomp/ast-build.c:316:19:
    src/xkbcomp/ast-build.c:75:21: note: object of size 32 allocated by 'malloc'
       75 |     ExprDef *expr = malloc(size);
          |                     ^~~~~~~~~~~~
    ```
    
    Github-Pull: #25436
    Rebased-From: 1bdbbbdc46c4e50bf07bc362e7e391ea1a53ea2f
    ec7a8839a2
  3. DrahtBot commented at 3:04 pm on April 17, 2023: contributor

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

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK TheCharlatan

    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 Backport on Apr 17, 2023
  5. bdb: disable Werror for format-security
    This is causing build failures in some build environments, like NixOS.
    I don't think we are going to patch bdb at this point, and this warning
    has existed for as long as we've used bdb.
    
    Fixes #25211.
    
    Tested (in Docker) with:
    ```bash
    docker run -it nixos/nix
    nix-shell -p gitMinimal gcc12 libtool pkg-config curl gnumake patch autoconf automake
    git clone https://github.com/bitcoin/bitcoin
    make -C bitcoin/depends bdb
    ```
    
    Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
    
    Github-Pull: #25763
    Rebased-From: b46c6ec52e1501b8c4337cead0301ef2c3777dd6
    c14f3b3905
  6. depends: fix compiling bdb with clang-16 on aarch64
    Compiling bdb with clang-16 on aarch64 (hardware) currently fails:
    ```bash
    make -C depends/ bdb CC=clang CXX=clang++
    ...
    checking for mutexes... UNIX/fcntl
    configure: WARNING: NO SHARED LATCH IMPLEMENTATION FOUND FOR THIS PLATFORM.
    configure: error: Unable to find a mutex implementation
    ```
    
    Looking at config.log we've got:
    ```bash
    configure:18704: checking for mutexes
    configure:18815: clang -o conftest -pipe -std=c11 -O2 -Wno-error=implicit-function-declaration -Wno-error=format-security    -I/bitcoin/depends/aarch64-unknown-linux-gnu/include -D_GNU_SOURCE -D_REENTRANT   -L/bitcoin/depends/aarch64-unknown-linux-gnu/lib conftest.c  -lpthread >&5
    conftest.c:45:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
    main() {
    ^
    int
    conftest.c:50:2: warning: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
            exit (
            ^
    conftest.c:50:2: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'
    1 warning and 1 error generated.
    ```
    
    Clang-16 changed `-Wimplicit-function-declaration` and `-Wimplicit-int`
    warnings into errors, see:
    https://releases.llvm.org/16.0.0/tools/clang/docs/ReleaseNotes.html#potentially-breaking-changes.
    
    > The -Wimplicit-function-declaration and -Wimplicit-int warnings now
    > default to an error in C99, C11, and C17. As of C2x, support for implicit
    > function declarations and implicit int has been removed, and the
    > warning options will have no effect. Specifying -Wimplicit-int in
    > C89 mode will now issue warnings instead of being a noop.
    
    Github-Pull: #27462
    Rebased-From: f8b8458276983f8fc1e2a47c4d00c1e30633067d
    f0919339bf
  7. fanquake marked this as ready for review on Apr 21, 2023
  8. TheCharlatan approved
  9. TheCharlatan commented at 7:07 pm on April 30, 2023: contributor
    ACK f0919339bfd983975fe3b85f51423302a1d8a5a0
  10. fanquake merged this on May 1, 2023
  11. fanquake closed this on May 1, 2023

  12. fanquake deleted the branch on May 1, 2023
  13. jamesdorfman referenced this in commit 94e41b10f3 on Sep 25, 2023
  14. bitcoin locked this on Apr 30, 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: 2025-01-06 12:12 UTC

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