build: compilation failure with Clang 19
fanquake opened this issue · 2 comments
fanquake commented
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
vincenzopalazzo commented
Thanks for reporting, will try to reproduce and patch it
fanquake commented
Updated the issue, now that Clang 19 is available: https://github.com/llvm/llvm-project/releases/tag/llvmorg-19.1.0.