lightning icon indicating copy to clipboard operation
lightning copied to clipboard

Build issue on `x86_64-darwin`

Open nepet opened this issue 1 year ago • 9 comments

Building Core Lightning (state v23.11) on x86_64-darwin returns the following error.

ccan/ccan/fdpass/fdpass.c:16:8: error: variable length array folded to constant array as an extension [-Werror,-Wgnu-folding-constant] char buf[CMSG_SPACE(sizeof(fd))];

nepet avatar Nov 30 '23 13:11 nepet

We should fix this for the next version. However, I have no device to test it out so I will leave space for someone to take this otherwise when we are close to the next release I will try to fix it 😄

vincenzopalazzo avatar Dec 02 '23 11:12 vincenzopalazzo

If @rustyrussell can help us interpret the error message, and what it is complaining about I can give it a shot.

cdecker avatar Dec 15 '23 10:12 cdecker

Maybe someone that have access to the machine can test https://github.com/ElementsProject/lightning/pull/6950

I was not able to reproduce it so this is just a blinded patch

vincenzopalazzo avatar Dec 16 '23 10:12 vincenzopalazzo

@ddustin you have an intel mac, right?

chrisguida avatar Dec 19 '23 02:12 chrisguida

I'm on M2 now

ddustin avatar Dec 19 '23 15:12 ddustin

@ddustin Darn, was hoping you still had it around somewhere...

chrisguida avatar Dec 19 '23 18:12 chrisguida

I think I was wrong.

I was chatting with some friends who are working on GCC and he pointed me to this https://github.com/libuv/libuv/issues/454

I think this is a good point, could we check before the compiler version that @nepet is using? and then this problem happens with clang? or with a new version of GCC?

vincenzopalazzo avatar Dec 23 '23 11:12 vincenzopalazzo

Mh I just forwarded the issue from the nixpkg builds for v23.11. Never built it myself on a mac. I got an intel mac though, so I can try to build it if you got a potential fix.

gcc --version gives:

Apple clang version 15.0.0 (clang-1500.1.0.2.5)
Target: x86_64-apple-darwin22.6.0

nepet avatar Dec 25 '23 07:12 nepet

I think I was wrong.

I was chatting with some friends who are working on GCC and he pointed me to this libuv/libuv#454

I think this is a good point, could we check before the compiler version that @nepet is using? and then this problem happens with clang? or with a new version of GCC?

Good find :+1:

cdecker avatar Jan 06 '24 14:01 cdecker