coroutine icon indicating copy to clipboard operation
coroutine copied to clipboard

Coro_setup-error: missing USE_UCONTEXT

Open showstopper opened this issue 16 years ago • 7 comments

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

showstopper avatar Dec 19 '09 22:12 showstopper

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.

stevedekorte avatar Dec 19 '09 22:12 stevedekorte

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

nddrylliog avatar Dec 19 '09 22:12 nddrylliog

Unfortunately, I have no repeat/debug it without being on Linux. I suspect some ifdef isn't finding what it expects.

stevedekorte avatar Dec 19 '09 22:12 stevedekorte

Hm, let me make sure libcoroutine is synced with Io's version.

stevedekorte avatar Dec 19 '09 22:12 stevedekorte

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?

nddrylliog avatar Dec 21 '09 10:12 nddrylliog

can you try using the version from the Io distro?

stevedekorte avatar Dec 21 '09 10:12 stevedekorte

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?

nddrylliog avatar Dec 21 '09 11:12 nddrylliog