Noob: Building Yarv 0.4.0


#1

Apologies if this is posed in the wrong forum…

I’m having problems building yarv 0.4.0 on Linux.

I’ve tried building with stable/production ruby release and
with ruby 1.9.0 (last night’s snapshot).

Here’s the error I’m getting. Any ideas would be greatly appreciated
as I’d love to try it out.

To build I unpacked the yarv tar.gz file.
cd yarv-0.4.0
autoconf
./configure …
make

Error:

compiling Win32API
make[1]: Entering directory /home/gzoller/src/yarv-0.4.0/ext/Win32API' make[1]: Nothing to be done forall’.
make[1]: Leaving directory /home/gzoller/src/yarv-0.4.0/ext/Win32API' compiling bigdecimal /home/gzoller/src/yarv-0.4.0/lib/mkmf.rb:1137:inbasename’: can’t
convert Array into String (TypeError)
from /home/gzoller/src/yarv-0.4.0/lib/mkmf.rb:1137:in block (3 levels) in create_makefile' from /home/gzoller/src/yarv-0.4.0/lib/mkmf.rb:1136:ineach’
from /home/gzoller/src/yarv-0.4.0/lib/mkmf.rb:1136:in block (2 levels) in create_makefile' from /home/gzoller/src/yarv-0.4.0/lib/mkmf.rb:1131:ineach’
from /home/gzoller/src/yarv-0.4.0/lib/mkmf.rb:1131:in block in create_makefile' from /home/gzoller/src/yarv-0.4.0/lib/mkmf.rb:1129:ineach’
from /home/gzoller/src/yarv-0.4.0/lib/mkmf.rb:1129:in
create_makefile' from ../.././ext/bigdecimal/extconf.rb:2:in<top (required)>’
from ./ext/extmk.rb:138:in load' from ./ext/extmk.rb:138:inextmake’
from ./ext/extmk.rb:398:in block in <main>' from ./ext/extmk.rb:397:ineach’
from ./ext/extmk.rb:397:in `’
make: *** [all] Error 1

Thanks!
Greg


#2

Greg Zoller wrote:

Apologies if this is posed in the wrong forum…

I’m having problems building yarv 0.4.0 on Linux.

I’ve tried building with stable/production ruby release and
with ruby 1.9.0 (last night’s snapshot).

Here’s the error I’m getting. Any ideas would be greatly appreciated
as I’d love to try it out.

To build I unpacked the yarv tar.gz file.
cd yarv-0.4.0
autoconf
./configure …
make

Just to make sure you are not running into any strange
library clash issues, use the instructions on the YARV
page:

  1. Untar files
  2. mkdir build/
  3. cd yarv-0.4.0; autoconf
  4. cd …/build
  5. …/yarv-0.4.0/configure
    –program-suffix=-yarv \ # Or a prefix
    –prefix=/home/gzoller # Optionally
  6. make; make test; make test-all; make benchmark

It might (or might not) help you…

Thanks!
Greg

E


#3

Thanks, E, but I’m still having the same issues. :frowning:

Anybody else have this problem?

Thx,
G

E. Saynatkari wrote:

Greg Zoller wrote:

Apologies if this is posed in the wrong forum…

I’m having problems building yarv 0.4.0 on Linux.

I’ve tried building with stable/production ruby release and
with ruby 1.9.0 (last night’s snapshot).

Here’s the error I’m getting. Any ideas would be greatly appreciated
as I’d love to try it out.

To build I unpacked the yarv tar.gz file.
cd yarv-0.4.0
autoconf
./configure …
make

Just to make sure you are not running into any strange
library clash issues, use the instructions on the YARV
page:

  1. Untar files
  2. mkdir build/
  3. cd yarv-0.4.0; autoconf
  4. cd …/build
  5. …/yarv-0.4.0/configure
    –program-suffix=-yarv \ # Or a prefix
    –prefix=/home/gzoller # Optionally
  6. make; make test; make test-all; make benchmark

It might (or might not) help you…

Thanks!
Greg

E


#4

Greg Zoller wrote:

Thanks, E, but I’m still having the same issues. :frowning:

Maybe download the latest snapshot instead, just
in case. If it still shows no signs of working,
you could try fixing the mkmf file (or generating
one with extconf.rb) or building it with a 1.8.x ruby.

Anybody else have this problem?

Thx,
G

E. Saynatkari wrote:

Greg Zoller wrote:

Apologies if this is posed in the wrong forum…

I’m having problems building yarv 0.4.0 on Linux.

I’ve tried building with stable/production ruby release and
with ruby 1.9.0 (last night’s snapshot).

Here’s the error I’m getting. Any ideas would be greatly appreciated
as I’d love to try it out.

To build I unpacked the yarv tar.gz file.
cd yarv-0.4.0
autoconf
./configure …
make

Just to make sure you are not running into any strange
library clash issues, use the instructions on the YARV
page:

  1. Untar files
  2. mkdir build/
  3. cd yarv-0.4.0; autoconf
  4. cd …/build
  5. …/yarv-0.4.0/configure
    –program-suffix=-yarv \ # Or a prefix
    –prefix=/home/gzoller # Optionally
  6. make; make test; make test-all; make benchmark

It might (or might not) help you…

Thanks!
Greg

E


#5

On Sat, 2006-02-25 at 06:02 +0900, Greg Zoller wrote:

Thanks, E, but I’m still having the same issues. :frowning:

Anybody else have this problem?

Yes. There are big changes going on over there right now I think.

A quick (and dirty) workaround I found was:

  • change yarv/lib/mkmf.rb, line 1136, “files.flatten.each |f|”

  • Run make with -i(gnore errors) switch:

    make -i
    make -i install

  • Manually copy ruby-yarv (or whatever) binary to target bin dir.

This is nasty stuff, but the result does seem to work quite well,
although it might be missing a few standard libraries… The actual
problem seemed tantalisingly close at one point but with it being 4am I
gave up.

(This was with the SVN trunk, which I think is the same as the latest
snapshot, r475, though I had the same problem on the 0.4.0 version too).


#6

“R” == Ross B. removed_email_address@domain.invalid writes:

R> (This was with the SVN trunk, which I think is the same as the latest
R> snapshot, r475, though I had the same problem on the 0.4.0 version
too).

Well with yarv-r475

  • I can build it with ruby 1.9.0 (2006-02-24) [i686-linux]

  • with ruby 1.9.0 (2006-02-24) [x86_64-linux]

    I must break a C optimisation to compile it, otherwise it give

uln% make
gcc -g -O2 -DRUBY_EXPORT -I. -I…/yarv-r475 -c …/yarv-r475/array.c
[…]
gcc main.o libruby-yarv-static.a -lpthread -ldl -lcrypt -lm -o
miniruby -g -O2 -DRUBY_EXPORT -rdynamic -Wl,-export-dynamic
rbconfig.rb updated
/home/ts/ruby/tmp/yarv-r475/lib/fileutils.rb:1503:in module_eval': syntax error, unexpected $end, expecting kEND (SyntaxError) from /home/ts/ruby/tmp/yarv-r475/lib/fileutils.rb:1503:inblock (1
levels) in module:Verbose
from /home/ts/ruby/tmp/yarv-r475/lib/fileutils.rb:1502:in each' from /home/ts/ruby/tmp/yarv-r475/lib/fileutils.rb:1502:inmodule:Verbose
from /home/ts/ruby/tmp/yarv-r475/lib/fileutils.rb:1498:in
<module:FileUtils>' from /home/ts/ruby/tmp/yarv-r475/lib/fileutils.rb:85:in<top
(required)>’
from /home/ts/ruby/tmp/yarv-r475/lib/mkmf.rb:5:in require' from /home/ts/ruby/tmp/yarv-r475/lib/mkmf.rb:5:in<top (required)>’
from …/yarv-r475/ext/extmk.rb:32:in require' from ../yarv-r475/ext/extmk.rb:32:in
make: *** [all] Error 1
uln%

without the optimisation :

uln% ~/local/yarv/bin/ruby-yarv -rsocket -ve ‘p Socket’
ruby 2.0.0 (Base: Ruby 1.9.0 2006-02-14) [x86_64-linux]
YARVCore 0.4.0 Rev: 475 (2006-02-23) [opts: ]
Socket
uln%

Guy Decoux