Skip to content

build: compilation failure with Clang 19 #7634

@fanquake

Description

@fanquake

Issue and Steps to Reproduce

When testing Clang 19 in some fuzzing infra, we noticed that lighting failed to compile (master at 5ec5580):

# clang-19 --version
Ubuntu clang version 19.1.0 (++20240901083933+6d7e428df611-1~exp1~20240901084058.28)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-19/bin

./configure CC=clang-19
make -j17
<snip>
cc lightningd/offer.c
cc lightningd/signmessage.c
lightningd/subd.c:945:16: error: variable length array folded to constant array as an extension [-Werror,-Wgnu-folding-constant]
  945 |         char permfail[strlen("PERMFAIL")];
      |                       ^~~~~~~~~~~~~~~~~~
cc wallet/db.c
1 error generated.
make: *** [Makefile:301: lightningd/subd.o] Error 1
make: *** Waiting for unfinished jobs....
rm external/build-x86_64-pc-linux-gnu/libwally-core-build/src/secp256k1/libsecp256k1.la

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions