Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generator.h: Generators require coroutines #95

Open
jsarenik opened this issue Sep 23, 2021 · 4 comments
Open

generator.h: Generators require coroutines #95

jsarenik opened this issue Sep 23, 2021 · 4 comments

Comments

@jsarenik
Copy link
Contributor

$ uname -a
Linux singer 5.10.61-0-lts #1-Alpine SMP Thu, 26 Aug 2021 17:42:24 +0000 x86_64 GNU/Linux
$ git clone git://git.ozlabs.org/~ccan/ccan
$ cd ccan
$ git rev-parse --short HEAD
fc29adfb
$ make
...
cc -g3 -ggdb -Wall -Wstrict-prototypes -Wold-style-definition -Wundef -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wwrite-strings -DCCAN_STR_DEBUG=1 -I.  -MMD -MP -MFccan/generator/generator.o.d -MTccan/generator/generator.o -c ccan/generator/generator.c -o ccan/generator/generator.o
In file included from ccan/generator/generator.c:8:
./ccan/generator/generator.h:23:2: error: #error Generators require coroutines
   23 | #error Generators require coroutines
      |  ^~~~~
make: *** [Makefile:32: ccan/generator/generator.o] Error 1
@jsarenik
Copy link
Contributor Author

Generally I just wanted to compile ccan and run make check to see if it works on musl-libc. It seems to not work there really. Yes, again I just have some issue with c-lightning.

@dgibson
Copy link
Collaborator

dgibson commented Sep 24, 2021

Well, generators do fundamentally require coroutines. The coroutine module requires HAVE_UCONTEXT, so I'm guessing musl-libc isn't supplying that. Fixing that is probably non-trivial.

@jsarenik
Copy link
Contributor Author

How could I skip coroutines then?

@spikeh
Copy link

spikeh commented Sep 11, 2024

I have the same issue. I can work around it by deleting ccan/generator/generator.{h,c} but is there a better solution?

I'm building with GCC with --std=gnu99. Is the expectation that I need C++20?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants