from Roland Priem on 2001-08-03 at 09:32:49:
> 
> Eli Green [mailto:eli.green / codedogs.ca] wrote:
> 
> > 	I've been trying to get Ruby to compile/run under QNX's
> > RTOS (the free
> > download one), and it's remarkable how easy it's been so far... =)
> 
> > The interpreter itself works just fine:
> 
> Did you try "make test"?

test succeeded. =)

> > However, the minute
> > I try and load a .so:
> >
> > manhattan ~% ruby
> > require 'socket'
> > unknown symbol: rb_eSecurityError
> > unknown symbol: rb_cSymbol
> > ... it goes on like this for a while ...
> 
> I ported ruby to QNX a while ago (using QNX 6.0B, I'll give the new 6.1 a
> try in a few days), applying only some minor changes. I'm using this version
> of ruby for nearly two months now without problems.
> 
> Matz: Could you please have a look at the change notes at the end of this
> message and include them in the next release? Thanks in advance...
> 
> Roland

I did it with 6.1a ... I think the Dinkum C libraries have fixed almost all
the problems you had. The only changes you made that I had to do were:

- Adding the unix.h include to the top of io.c, 
- Adding QNXNTO to the #ifdef for excluding socketpair

In io.c, I added this to the READ_DATA_PENDING #ifdef block:

#elif defined(__QNXNTO__)
#  define READ_DATA_PENDING(fp) !eof(fp->_Handle)

but I'm not 100% sure that this is the right way to do it. The _Filet
structure isn't exactly well-documented.

Oh, and I just rebuilt it with a libruby.so, and everything seems to be
working OK. I can now run irb and anything that has a "require 'socket'" at
the top of it. I guess the answer is that either you build everything shared
or everything static. I'll see what the QNX folks have to say about it.

I have a binary .qpr of the port if anybody's interested. I just need to find
a way to convince it that it DOES in fact contain libruby ... it gives
dependency warnings about it, but after forcing the install, it works fine.

Matz, I'm not sure wether you'll want to include all those changes in there or
not ... they were required under QNX 6.0, but are apparently unnecessary
under 6.1 (brand new C libaries!) ... I don't know how much use 6.0 is going
to see .. 6.1 is a pretty vital bug fix release. Once I've fixed up the
packages, I'll make them available for download somewhere.

Eli