Coro_setup-error: missing USE_UCONTEXT
Platform: Archlinux 32-bit When I try to compile libcoroutine I get cc -MM -MT _build/objs/Coro.o -MF _build/objs/Coro.d -DINSTALL_PREFIX="" -O3 -g -Wstrict-prototypes -I. -I./source -I../basekit/_build/headers -falign-loops=16 -fPIC -DBUILDING_CORO_DLL -c source/Coro.c -o _build/objs/Coro.o source/Coro.c:484:2: Error: #error "Coro.c Error: Coro_setup() function needs to be defined for this platform." Adding #define USE_UCONTEXT in Coro.c fixes the problem
I'm on OSX, so you'll need to figure this one out. You might check the ifdefs to see if they are correctly detecting your platform.
We had this problem some months ago, Steve, remember? I don't know how you fixed it then, but I'm surprised this bug rises again.
EDIT: It occurs on my system too, e.g. Gentoo 32bits
Unfortunately, I have no repeat/debug it without being on Linux. I suspect some ifdef isn't finding what it expects.
Hm, let me make sure libcoroutine is synced with Io's version.
Any news on that? We can't really use it in ooc unless the standard distribution compiles out-of-the-box for Linux..
I'm wondering where HAS_UCONTEXT should be defined. It seems the only way that USE_UCONTEXT would be defined in Coro.h right now. Wouldn't it be a good idea to add a
#if defined(__unix__) || defined(__APPLE__) #define USE_UCONTEXT #endif
In case nothing else was specified?
can you try using the version from the Io distro?
I did that:
hub clone stevekorte/io cd io/libs/basekit make cd ../coroutine make
And it compiled fine. There's no "install" target on the Makefiles, though.
The whole io distribution seems to be pretty much monolithic - why is that?