Greetings,
I’ve had several request to update my Ruby “release” for the Nokia 770
to include gems. Gems, as I understand it, requires a few external
components to be compiled into Ruby, e.g., openssl, stringio, etc.; and
of course modifying ext/Setup accordingly works flawlessly on Windows
and Linux flavors. Unfortunately, I’m having trouble making the same
mods to my Maemo cross compiled version of Ruby and I’m hoping someone
might be able to diagnose the problem I’m having (its escaping me, I’m
sorry to say So… I’ve tried this several times, several
different ways all w/the same outcome. Also of note is that because
the Nokia 770 linux distro is highly pruned down, I’m compiling ruby
and the necessary external components as static, ie, non-dynamic, so
all necessary extermal libs are linked into the resultant Ruby.
Thx in advance!
Ken
Starting from a clean untar of Ruby 184, we do the following:
- Edit ext/Setup - notice nodymaic is uncommented and only openssl and
stringio are uncommented.
option nodynamic
#Win32API
#bigdecimal
#curses
#dbm
#digest
#digest/md5
#digest/rmd160
#digest/sha1
#digest/sha2
#dl
#enumerator
#etc
#fcntl
#gdbm
#iconv
#io/wait
#nkf
#pty
openssl
#racc/cparse
#readline
#sdbm
#socket
stringio
#strscan
#syck
#syslog
#tcltklib
#tk
#win32ole
#zlib
-
./configure --with-static-linked-ext # config finishes w/out
incident. -
make # Ruby and openssl compile fine but when (what appear to be)
openssl dependencies begin to compile, we get the following:
Checking out the (apparently) dynamically generated file
“callback.func”, we see the following (no, this isn’t a copy and past
error - the file begins on line 1 w/ “f( RSTRING(proto)->len >= 15 )”.
Any idea why this file would be incomplete/corrupt? Is there another
parameter I need to perhaps pass to “configure” that pertains to
statically “building” Ruby?
f( RSTRING(proto)->len >= 15 )
rb_raise(rb_eArgError, “too many arguments”);
rb_dl_scan_callback_args(buff, RSTRING(proto)->ptr, &argc, argv);
retval = rb_funcall2(proc, id_call, argc, argv);
return rb_dlptr2cptr(retval);
}
obj;
VALUE argv[15];
int argc;
long buff[15];
buff[0] = arg0;
buff[1] = arg1;
buff[2] = arg2;
buff[3] = arg3;
buff[4] = arg4;
buff[5] = arg5;
buff[6] = arg6;
buff[7] = arg7;
buff[8] = arg8;
buff[9] = arg9;
buff[10] = arg10;
buff[11] = arg11;
buff[12] = arg12;
buff[13] = arg13;
buff[14] = arg14;
obj = rb_hash_aref(DLFuncTable, rb_assoc_new(INT2NUM(0),INT2NUM(0)));
proto = rb_ary_entry(obj, 0);
proc = rb_ary_entry(obj, 1);
Check_Type(proto, T_STRING);
if( RSTRING(proto)->len >= 15 )
rb_raise(rb_eArgError, “too many arguments”);
rb_dl_scan_callback_args(buff, RSTRING(proto)->ptr, &argc, argv);
retval = rb_funcall2(proc, id_call, argc, argv);
/* no return value */
}