ruby 1.8.1 crosscompiling for armv4l (iPAQ)

K

Kero

Hi all!

Cross Compiled Ruby on i386 with an arm-linux-suite, after I had to add
__const to the declaration and implementation of gai_strerror(), like is
done in /xcompile/arm/3.3.1/include/netdb.h (why is the function
implemented in Ruby at all??)

Then (after partial install, I can not put everything on the iPAQ)

# cd /mnt/ruby-1.8.1/test
# ruby runner.rb
/usr/lib/ruby/1.8/webrick/httpservlet/cgihandler.rb:23: uninitialized constant Config::LIBDIR (NameError)
from /usr/lib/ruby/1.8/webrick/httpservlet.rb:13:in `require'
from /usr/lib/ruby/1.8/webrick/httpservlet.rb:13
from /usr/lib/ruby/1.8/webrick/httpserver.rb:16:in `require'
from /usr/lib/ruby/1.8/webrick/httpserver.rb:16
from /usr/lib/ruby/1.8/soap/rpc/standaloneServer.rb:28:in `require'
from /usr/lib/ruby/1.8/soap/rpc/standaloneServer.rb:28
from /mnt/iPAQ/Ruby/ruby-1.8.1/test/soap/calc/server.rb:3:in `require'
from /mnt/iPAQ/Ruby/ruby-1.8.1/test/soap/calc/server.rb:3
... 15 levels...
from /usr/lib/ruby/1.8/test/unit/autorunner.rb:54:in `[]'
from /usr/lib/ruby/1.8/test/unit/autorunner.rb:183:in `run'
from /usr/lib/ruby/1.8/test/unit/autorunner.rb:13:in `run'
from runner.rb:7

and indeed, it's not defined, but Config::CONFIG["libdir"] is, and even
set to the value of "/usr/lib" which seems sane to me.

I know I'm messing with various paths due to the crosscompiling, and I
guess the question is this: who generates rbconfig.rb ?

Bye,
Kero.

+--- Kero ----------------------- kero@chello@nl ---+
| all the meaningless and empty words I spoke |
| Promises -- The Cranberries |
+--- M38c --- http://httpd.chello.nl/k.vangelder ---+
 
K

Kero

/usr/lib/ruby/1.8/webrick/httpservlet/cgihandler.rb:23: uninitialized constant Config::LIBDIR (NameError)

OK, that one resolved itself when I rebuilt cleanly.
Next:
$ LD_PRELOAD=../libruby.so ../ruby -I ../ipkg/root/usr/lib/ruby/1.8/ -I../ipkg/root/usr/lib/ruby/1.8/arm-linux/ runner.rb
(eval):3:in `initialize': Unsupported digest algorithm (SHA1).: (RuntimeError)
from (eval):3:in `initialize'
from ../ipkg/root/usr/lib/ruby/1.8/drb/ssl.rb:91:in `new'
[snip]

But, digest/sha1/sha1.so has been compiled just fine (and running with -d
-w options does not warn me of the file not being found/loaded/containing
errors). What's going on?

One other thing I'm wondering about: why are so many files being
loaded before I see a single '.' telling me there are tests being ran? I
fear that by the time all is loaded, my iPAQ runs out of memory. "load
useful -- run tests -- unload" seems a proper way to go, is that done or
not?

Thanks,
Kero.

+--- Kero ----------------------- kero@chello@nl ---+
| all the meaningless and empty words I spoke |
| Promises -- The Cranberries |
+--- M38c --- http://httpd.chello.nl/k.vangelder ---+
 
N

nobu.nokada

Hi,

At Sun, 11 Jan 2004 05:11:40 +0900,
Kero said:
Next:
$ LD_PRELOAD=../libruby.so ../ruby -I ../ipkg/root/usr/lib/ruby/1.8/ -I../ipkg/root/usr/lib/ruby/1.8/arm-linux/ runner.rb
(eval):3:in `initialize': Unsupported digest algorithm (SHA1).: (RuntimeError)
from (eval):3:in `initialize'
from ../ipkg/root/usr/lib/ruby/1.8/drb/ssl.rb:91:in `new'
[snip]

But, digest/sha1/sha1.so has been compiled just fine (and running with -d
-w options does not warn me of the file not being found/loaded/containing
errors). What's going on?

sha1.so needs to be located under digest/ but not digest/sha1/.
You seem to install ext to ../ipkg/root/ temporarily, is there
sha1.so under ../ipkg/root/usr/lib/ruby/1.8/arm-linux/digest/?
One other thing I'm wondering about: why are so many files being
loaded before I see a single '.' telling me there are tests being ran? I
fear that by the time all is loaded, my iPAQ runs out of memory. "load
useful -- run tests -- unload" seems a proper way to go, is that done or
not?

Unload feature is not provided.
 
K

Kero

$ LD_PRELOAD=../libruby.so ../ruby -I ../ipkg/root/usr/lib/ruby/1.8/ -I../ipkg/root/usr/lib/ruby/1.8/arm-linux/ runner.rb
(eval):3:in `initialize': Unsupported digest algorithm (SHA1).: (RuntimeError)
from (eval):3:in `initialize'
from ../ipkg/root/usr/lib/ruby/1.8/drb/ssl.rb:91:in `new'
[snip]

But, digest/sha1/sha1.so has been compiled just fine (and running with -d
-w options does not warn me of the file not being found/loaded/containing
errors). What's going on?

sha1.so needs to be located under digest/ but not digest/sha1/.
You seem to install ext to ../ipkg/root/ temporarily, is there
sha1.so under ../ipkg/root/usr/lib/ruby/1.8/arm-linux/digest/?

yes, it's there.
Unload feature is not provided.

could load(file, true) be used for it?

+--- Kero ----------------------- kero@chello@nl ---+
| all the meaningless and empty words I spoke |
| Promises -- The Cranberries |
+--- M38c --- http://httpd.chello.nl/k.vangelder ---+
 
N

nobu.nokada

Hi,

At Sun, 11 Jan 2004 19:01:39 +0900,
Kero said:
$ LD_PRELOAD=../libruby.so ../ruby -I ../ipkg/root/usr/lib/ruby/1.8/ -I../ipkg/root/usr/lib/ruby/1.8/arm-linux/ runner.rb
(eval):3:in `initialize': Unsupported digest algorithm (SHA1).: (RuntimeError)
from (eval):3:in `initialize'
from ../ipkg/root/usr/lib/ruby/1.8/drb/ssl.rb:91:in `new'
[snip]

But, digest/sha1/sha1.so has been compiled just fine (and running with -d
-w options does not warn me of the file not being found/loaded/containing
errors). What's going on?

I misunderstood. That exception is raised from ossl.so, but
not concerned with digest/*.so at all.
could load(file, true) be used for it?

It can load libraries, indeed, but loaded never get unloaded
too.
 
K

Kero

$ LD_PRELOAD=../libruby.so ../ruby -I ../ipkg/root/usr/lib/ruby/1.8/ -I../ipkg/root/usr/lib/ruby/1.8/arm-linux/ runner.rb
(eval):3:in `initialize': Unsupported digest algorithm (SHA1).: (RuntimeError)
from (eval):3:in `initialize'
from ../ipkg/root/usr/lib/ruby/1.8/drb/ssl.rb:91:in `new'
[snip]

But, digest/sha1/sha1.so has been compiled just fine (and running with -d
-w options does not warn me of the file not being found/loaded/containing
errors). What's going on?

I misunderstood. That exception is raised from ossl.so, but
not concerned with digest/*.so at all.

Woops! Next attempt:
I verified with strace and libssl and libcrypto (v0.9.7c) are found. But
I can not find the three lines of code that are eval()uated and throw the
exception.

What strikes my with strace is that suddenly, at the end, a lot of
--- SIGVTALRM (Virtual timer expired) ---
scrolls over my screen, which did not happen while loading all the other
files.

hth,
Kero.

+--- Kero ----------------------- (e-mail address removed) ---+
| all the meaningless and empty words I spoke |
| Promises -- The Cranberries |
+--- M38c --- http://httpd.chello.nl/k.vangelder ---+
 
N

nobu.nokada

Hi,

At Mon, 12 Jan 2004 07:16:38 +0900,
Kero said:
$ LD_PRELOAD=../libruby.so ../ruby -I ../ipkg/root/usr/lib/ruby/1.8/ -I../ipkg/root/usr/lib/ruby/1.8/arm-linux/ runner.rb
(eval):3:in `initialize': Unsupported digest algorithm (SHA1).: (RuntimeError)
from (eval):3:in `initialize'
from ../ipkg/root/usr/lib/ruby/1.8/drb/ssl.rb:91:in `new'
[snip]

But, digest/sha1/sha1.so has been compiled just fine (and running with -d
-w options does not warn me of the file not being found/loaded/containing
errors). What's going on?

I misunderstood. That exception is raised from ossl.so, but
not concerned with digest/*.so at all.

Woops! Next attempt:
I verified with strace and libssl and libcrypto (v0.9.7c) are found. But
I can not find the three lines of code that are eval()uated and throw the
exception.

In ext/openssl/lib/openssl/digest.rb.
What strikes my with strace is that suddenly, at the end, a lot of
--- SIGVTALRM (Virtual timer expired) ---
scrolls over my screen, which did not happen while loading all the other
files.

Something timed out?

You can use strace -o option to save the output.
 
K

Kero

I took out the drbssl test; I need to delve deeper in
libcrypto to find out why SHA1 is not used. Some other time.
You can use strace -o option to save the output.

Yes :)

The rest of the suite starts, if I kill about everything else on the iPAQ
to save memory. It runs for a while then hangs, and after waiting a couple
of hours, I ^C it.

~/iPAQ/tmp$ ls -l
total 1084
-rw-r--r-- 1 identd telnetd 17763 Jan 13 08:17 stderr
-rw-r--r-- 1 identd telnetd 410 Jan 13 08:17 stdout
-rw-r--r-- 1 identd telnetd 1080493 Jan 13 08:17 strace-runner
~/iPAQ/tmp$ cat stdout
Set XSD::XMLParser::REXMLParser as XML processor.
Loaded suite .
Started
....................................................................Eremoving /tmp/out.csv742.2...done
removing /tmp/out.csv742.1...done
removing /tmp/out2.csv742.0...done
removing /tmp/out.csv742.0...done
removing /tmp/in.csv742.3...done
removing /tmp/in.csv742.2...done
removing /tmp/in.csv742.1...done
removing /tmp/in.csv742.0...done
~/iPAQ/tmp$ tail stderr
Exception `NoMethodError' at
/mnt/iPAQ/Ruby/ruby-1.8.1/test/drb/drbtest.rb:240 - unde fined method
`stop_service' for nil:NilClass
.../ipkg/root/usr/lib/ruby/1.8/drb/extservm.rb:78:in `stop': Interrupt
from ../ipkg/ root/usr/lib/ruby/1.8/drb/extservm.rb:78:in `invoke_service'
from ../ipkg/root/usr/lib/ruby/1.8/drb/extservm.rb:38:in `service'
from /mnt/iPAQ/Ruby/ruby-1.8.1/test/drb/drbtest.rb:235:in `setup'
from ../ipkg/root/usr/lib/ruby/1.8/test/unit/testcase.rb:69:in
`run' from
../ipkg/root/usr/lib/ruby/1.8/test/unit/testsuite.rb:34:in `run'
from ../ipkg/root/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in
`each' from
../ipkg/root/usr/lib/ruby/1.8/test/unit/testsuite.rb:33:in `run'
from ../ipkg/root/usr/lib/ruby/1.8/test/unit/testsuite.rb:34:in
`run'
... 8 levels...
from
../ipkg/root/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:21:in
`
run'
from ../ipkg/root/usr/lib/ruby/1.8/test/unit/autorunner.rb:185:in
`run' from
../ipkg/root/usr/lib/ruby/1.8/test/unit/autorunner.rb:13:in `run'
from runner.rb:7

with test_drbssl.rb file removed; I also seem to have dns resolving
problems; nslookup works fine, but both ruby and kaffe are having troubles.

Any insights?

Bye,
Kero.

+--- Kero ----------------------- kero@chello@nl ---+
| all the meaningless and empty words I spoke |
| Promises -- The Cranberries |
+--- M38c --- http://httpd.chello.nl/k.vangelder ---+
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top