Skip Menu |

This queue is for tickets about the Coro CPAN distribution.

Report information
The Basics
Id: 22579
Status: resolved
Priority: 0/
Queue: Coro

People
Owner: Nobody in particular
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 2.0
Fixed in: (no value)



Subject: Missing size_t when using ucontext.h on OS X
For giggles, I tried using ucontext on OS X. The compilation failed because size_t is undefined. You probably simply need to include stddef.h when compiling for ucontext, it was probably getting loaded by coincidence on other platforms. Its a pretty common OS X thing. 0 windhund /private/var/local/cpan_shell/build/Coro-2.0$ make cp Coro/State.pm blib/lib/Coro/State.pm cp Coro/Signal.pm blib/lib/Coro/Signal.pm cp Coro/SemaphoreSet.pm blib/lib/Coro/SemaphoreSet.pm cp Coro/RWLock.pm blib/lib/Coro/RWLock.pm cp Coro/AIO.pm blib/lib/Coro/AIO.pm cp Coro/Specific.pm blib/lib/Coro/Specific.pm cp Coro/Semaphore.pm blib/lib/Coro/Semaphore.pm cp Coro/Timer.pm blib/lib/Coro/Timer.pm cp Coro/Channel.pm blib/lib/Coro/Channel.pm cp Coro/CoroAPI.h blib/lib/Coro/CoroAPI.h cp Coro/MakeMaker.pm blib/lib/Coro/MakeMaker.pm cp Coro/Cont.pm blib/lib/Coro/Cont.pm cp Coro.pm blib/lib/Coro.pm Skip ../blib/lib/Coro/Cont.pm (unchanged) Skip ../blib/lib/Coro/SemaphoreSet.pm (unchanged) Skip ../blib/lib/Coro/MakeMaker.pm (unchanged) Skip ../blib/lib/Coro/Semaphore.pm (unchanged) Skip ../blib/lib/Coro/AIO.pm (unchanged) Skip ../blib/lib/Coro/Timer.pm (unchanged) Skip ../blib/lib/Coro/State.pm (unchanged) Skip ../blib/lib/Coro/RWLock.pm (unchanged) Skip ../blib/lib/Coro/Signal.pm (unchanged) Skip ../blib/lib/Coro/Channel.pm (unchanged) Skip ../blib/lib/Coro/Specific.pm (unchanged) /usr/local/bin/perl /usr/local/perl/5.8.8/lib/ExtUtils/xsubpp -typemap /usr/local/perl/5.8.8/lib/ExtUtils/typemap -typemap typemap State.xs > State.xsc && mv State.xsc State.c cc -c -I/sw/include -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/opt/local/include -O3 -DVERSION=\"1.9\" -DXS_VERSION=\"1.9\" "-I/usr/local/perl/5.8.8/lib/darwin-thread-multi-2level/CORE" -DHAVE_MMAP -DCORO_LAZY_STACK -DCORO_UCONTEXT -DSTACKSIZE=16384 State.c State.xs:857:1: warning: "PRIO_MAX" redefined In file included from /usr/include/sys/wait.h:111, from /usr/include/stdlib.h:64, from /usr/local/perl/5.8.8/lib/darwin-thread-multi-2level/CORE/perl.h:491, from State.xs:6: /usr/include/sys/resource.h:110:1: warning: this is the location of the previous definition State.xs:862:1: warning: "PRIO_MIN" redefined /usr/include/sys/resource.h:109:1: warning: this is the location of the previous definition In file included from State.xs:4: libcoro/coro.c: In function 'coro_create': libcoro/coro.c:109: error: 'size_t' undeclared (first use in this function) libcoro/coro.c:109: error: (Each undeclared identifier is reported only once libcoro/coro.c:109: error: for each function it appears in.) make[1]: *** [State.o] Error 1 make: *** [subdirs] Error 2
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #22579] Missing size_t when using ucontext.h on OS X
Date: Thu, 26 Oct 2006 07:25:34 +0200
To: Michael_G_Schwern via RT <bug-Coro [...] rt.cpan.org>
From: Marc Lehmann <schmorp [...] schmorp.de>
On Wed, Oct 25, 2006 at 04:07:14PM -0400, Michael_G_Schwern via RT <bug-Coro@rt.cpan.org> wrote: Show quoted text
> because size_t is undefined. You probably simply need to include > stddef.h when compiling for ucontext, it was probably getting loaded by
I'll try this, could you report this upstream, thoguh, so it gets fixed eventually? Show quoted text
> coincidence on other platforms. Its a pretty common OS X thing.
yeah, it's simply too far from any standards, and its cheaper for apple to provide hacks and let everybody else work around them. Show quoted text
> /usr/local/perl/5.8.8/lib/darwin-thread-multi-2level/CORE/perl.h:491, > from State.xs:6: > /usr/include/sys/resource.h:110:1: warning: this is the location of the > previous definition > State.xs:862:1: warning: "PRIO_MIN" redefined > /usr/include/sys/resource.h:109:1: warning: this is the location of the > previous definition
no size_t, as is required, but PRIO_MIN, which isn't. Yes, thats a pretty common OS X thing. -- The choice of a -----==- _GNU_ ----==-- _ generation Marc Lehmann ---==---(_)__ __ ____ __ pcg@goof.com --==---/ / _ \/ // /\ \/ / http://schmorp.de/ -=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE
fixed in CVS, >2.0
CC: MSCHWERN [...] cpan.org
Subject: Re: [rt.cpan.org #22579] Missing size_t when using ucontext.h on OS X
Date: Wed, 25 Oct 2006 23:09:50 -0700
To: bug-Coro [...] rt.cpan.org
From: Michael G Schwern <schwern [...] gmail.com>
Marc Lehmann via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=22579 > > > On Wed, Oct 25, 2006 at 04:07:14PM -0400, Michael_G_Schwern via RT <bug-Coro@rt.cpan.org> wrote:
>> because size_t is undefined. You probably simply need to include >> stddef.h when compiling for ucontext, it was probably getting loaded by
> > I'll try this, could you report this upstream, thoguh, so it gets fixed > eventually?
I don't know where upstream is or that there even was an upstream. I'm just installing this as a dependency. Show quoted text
>> coincidence on other platforms. Its a pretty common OS X thing.
> > yeah, it's simply too far from any standards, and its cheaper for apple to > provide hacks and let everybody else work around them.
I don't think OS X is violating any standards. I think everyone has come to rely on other C library implementations coincidentally loading things like stddef when you load other unrelated libraries. Show quoted text
>> /usr/local/perl/5.8.8/lib/darwin-thread-multi-2level/CORE/perl.h:491, >> from State.xs:6: >> /usr/include/sys/resource.h:110:1: warning: this is the location of the >> previous definition >> State.xs:862:1: warning: "PRIO_MIN" redefined >> /usr/include/sys/resource.h:109:1: warning: this is the location of the >> previous definition
> > no size_t, as is required, but PRIO_MIN, which isn't. Yes, thats a pretty > common OS X thing. >
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #22579] Missing size_t when using ucontext.h on OS X
Date: Thu, 26 Oct 2006 09:42:22 +0200
To: Michael G Schwern via RT <bug-Coro [...] rt.cpan.org>
From: Marc Lehmann <schmorp [...] schmorp.de>
On Thu, Oct 26, 2006 at 02:11:17AM -0400, Michael G Schwern via RT <bug-Coro@rt.cpan.org> wrote: Show quoted text
> > I'll try this, could you report this upstream, thoguh, so it gets fixed > > eventually?
> > I don't know where upstream is or that there even was an upstream.
well, apple, I guess. Show quoted text
> > provide hacks and let everybody else work around them.
> > I don't think OS X is violating any standards.
ucontext.h has to provide everything necessary to use it (see the SuS). Show quoted text
> I think everyone has come to rely on other C library implementations coincidentally loading things like stddef when you load other unrelated libraries.
At least in the case of coro, it doesn't load any libraries (libraries are outside the unix standard), but uses include files. If OS X requires a specific librray to be linked with to provide ucontext functionality, this would be fine w.r.t. standards. And OS X is indeed not violating any standards it is following - if it claims to follow the unix standard then it miserably fails on too many fronts. It would be nice, however, if OS X *would* indeed follow even outdated versions of POSIX, preferably, of course, something newer. -- The choice of a -----==- _GNU_ ----==-- _ generation Marc Lehmann ---==---(_)__ __ ____ __ pcg@goof.com --==---/ / _ \/ // /\ \/ / http://schmorp.de/ -=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE
CC: MSCHWERN [...] cpan.org
Subject: Re: [rt.cpan.org #22579] Missing size_t when using ucontext.h on OS X
Date: Thu, 26 Oct 2006 08:47:00 -0700
To: bug-Coro [...] rt.cpan.org
From: Michael G Schwern <schwern [...] gmail.com>
Marc Lehmann via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=22579 > > > On Thu, Oct 26, 2006 at 02:11:17AM -0400, Michael G Schwern via RT <bug-Coro@rt.cpan.org> wrote:
>>> I'll try this, could you report this upstream, thoguh, so it gets fixed >>> eventually?
>> I don't know where upstream is or that there even was an upstream.
> > well, apple, I guess. >
>>> provide hacks and let everybody else work around them.
>> I don't think OS X is violating any standards.
> > ucontext.h has to provide everything necessary to use it (see the SuS).
The who? Look at that, I'm already out of my league. :)
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #22579] Missing size_t when using ucontext.h on OS X
Date: Thu, 26 Oct 2006 18:21:23 +0200
To: Michael G Schwern via RT <bug-Coro [...] rt.cpan.org>
From: Marc Lehmann <schmorp [...] schmorp.de>
On Thu, Oct 26, 2006 at 11:49:11AM -0400, Michael G Schwern via RT <bug-Coro@rt.cpan.org> wrote: Show quoted text
> > ucontext.h has to provide everything necessary to use it (see the SuS).
> > The who? Look at that, I'm already out of my league. :)
Single Unix Specification, properly spelled SUS, not SuS, anyways :) It does not matter, however, I ran into so many problems on macosx (no select (or was it poll?) (yes, recent versions have it), non-working internationalisation, non-working X, generally buggy as hell etc.), my opinion of it cannot be raised easily anyways :) -- The choice of a -----==- _GNU_ ----==-- _ generation Marc Lehmann ---==---(_)__ __ ____ __ pcg@goof.com --==---/ / _ \/ // /\ \/ / http://schmorp.de/ -=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE
Looks like this is resolved.