« Return to Thread: io on openbsd - problems installing

Re: io on openbsd - problems installing

by nlb0666 :: Rate this Message:

Reply to Author | View in Thread

Hmmm hacked my way through a little more... Seems like "OpenBSD" needs to be in the same Makefile line for the tools dir as well or the math libraries won't link.  Its not really clear to me why this helped with the number of CPUs issue below, but anyway...

More seriously it looks like Coro.c is really not set up to result in a compilation that will work for OpenBSD.  I tried a rather savage hack - essentially uncommenting the "Coro_Start" function and reusing the old code for Coro_setup for NetBSD as the OpenBSD Coro_Setup function.  This compiled (obviously) but since I'm basically guessing here I'm doubtful that its healthy.

Sure enough, the resultant io binary instantly seg faults....

Guidance here would be welcome - at least on how to get a reasonably probably workable Coro.c....

--- In iolanguage@..., "nlb0666" <me@...> wrote:

>
> Jeremy - thanks for the reply.  I through "OpenBSD" into the overall makefile on the "NEEDS_M := FreeBSD" etc line (line 10) and that seems to have got past that particular problem.  I'm not sure if thats what you meant... In any event, there are no specific references to FreeBSD in IoSystem.c to which I could add "or OpenBSD please!"...
>
> Anyway the overall make still fails, but it gets past the last failure (or fails earlier... looks like later though...)
>  It seems it cannot find the coroutine library:
>
> <...lots of build stuff...>
> cc -shared  -L../basekit/_build/dll -L../coroutine/_build/dll -L../garbagecollector/_build/dll _build/objs/*.o -o _build/dll/libiovm.so -lbasekit -lcoroutine -lgarbagecollector
> /usr/bin/ld: cannot find -lcoroutine
> collect2: ld returned 1 exit status
> gmake[2]: *** [_build/dll/libiovm.so] Error 1
> gmake[2]: Leaving directory `/tmp/io/libs/iovm'
> gmake[1]: *** [all] Error 2
> gmake[1]: Leaving directory `/tmp/io/libs/iovm'
> gmake: *** [vm] Error 2
>
> Trying to build the coroutine library directly yields
>
> /io/libs/coroutine $ gmake
> cp source/Coro.h _build/headers/Coro.h
> cp source/PortableUContext.h _build/headers/PortableUContext.h
> cp source/PortableUContext386.h _build/headers/PortableUContext386.h
> gmake _build/lib/libcoroutine.a
> gmake[1]: Entering directory `/tmp/io/libs/coroutine'
> cc -MM -MT _build/objs/Coro.o -MF _build/objs/Coro.d -DINSTALL_PREFIX=\"\" -Os -g  -Wstrict-prototypes  -I. -I./source -I../basekit/_build/headers  -DBUILDING_CORO_DLL  -c source/Coro.c -o _build/objs/Coro.o
> source/Coro.c:459:2: #error "Coro.c Error: Coro_setup() function needs to be defined for this platform."
> gmake[1]: *** [_build/objs/Coro.o] Error 1
> gmake[1]: Leaving directory `/tmp/io/libs/coroutine'
> gmake: *** [all] Error 2
>
> ...making me think I'm in IFDEF land again.  I didn't find an immediately obvious approach to getting Coro_setup to be defined (ie I looked at the manual compiler flag settings in the overall Makefile for coroutine, but I didn't come up with something in the Coro.c code itself)....
>
> Advice?
>
> --- In iolanguage@..., Jeremy Tregunna <jeremy.tregunna@> wrote:
> >
> > OpenBSD should work with the same code for FreeBSD for ncpu's (I think  
> > I wrote this code, but cannot remember now). Just add an &&  
> > defined(__OpenBSD__) and see if that works.
> >
> > On 5-May-09, at 12:11 PM, nlb0666 wrote:
> >
> > > Just getting started at looking at io and thought I'd try installing  
> > > it on my OpenBSD box (Macbook(s) running OpenBSD 4.5 beta).
> > >
> > > I downloadeded io-fd8745c00b079963c5bc8398f634cc5651b57bbc.tar.gz...
> > >
> > > Untarred etc, gmake'd (make fails, so it looks like a gmake to me)...
> > >
> > > Result is
> > >
> > > <...lots of compilation stuff...>
> > > cc -MM -MT _build/objs/IoSystem.o -MF _build/objs/IoSystem.d -
> > > DINSTALL_PREFIX=\"/usr/local\" -Os -g  -Wstrict-prototypes
> > > -I. -I./source -I../basekit/_build/headers -I../coroutine/_build/
> > > headers -I../garbagecollector/_build/headers  -DBUILDING_
> > > IOVM_DLL  -c source/IoSystem.c -o _build/objs/IoSystem.o
> > > source/IoSystem.c:415:2: #error
> > > gmake[2]: *** [_build/objs/IoSystem.o] Error 1
> > > gmake[2]: Leaving directory `/tmp/io/libs/iovm'
> > > gmake[1]: *** [all] Error 2
> > > gmake[1]: Leaving directory `/tmp/io/libs/iovm'
> > > gmake: *** [vm] Error 2
> > >
> > > Anyone encountered this or have advice here?  A quick look at the  
> > > code suggests a missing conditional compilation for calculating  
> > > number of CPUs...
> > >
> > >
> > >
> > > ------------------------------------
> > >
> > > Yahoo! Groups Links
> > >
> > >
> > >
> >
> > Regards,
> >
> > Jeremy Tregunna
> > jeremy.tregunna@
> >
>


 « Return to Thread: io on openbsd - problems installing