# Noob: Building Yarv 0.4.0

**URL:** <https://www.ruby-forum.com/t/noob-building-yarv-0-4-0/72894>\
**Category:** Ruby\
**Created:** [February 24, 2006, 5:40pm UTC](https://www.ruby-forum.com/t/noob-building-yarv-0-4-0/72894 "2006-02-24T17:40:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gzoller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/278dde/32.png) [@gzoller](https://www.ruby-forum.com/u/gzoller)\
**Post date:** [February 24, 2006, 5:40pm UTC](https://www.ruby-forum.com/t/noob-building-yarv-0-4-0/72894/1 "2006-02-24T17:40:01Z")

</div>

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 for`all’.  
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:in`basename’: 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:in`each’  
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:in`each’  
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:in`each’  
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:in`extmake’  
from ./ext/extmk.rb:398:in `block in <main>' from ./ext/extmk.rb:397:in`each’  
from ./ext/extmk.rb:397:in `’  
make: \*\*\* [all] Error 1

Thanks!  
Greg

---

<div class="post-metadata">

**Author:** ![gzoller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/278dde/32.png) [@gzoller](https://www.ruby-forum.com/u/gzoller)\
**Post date:** [February 24, 2006, 6:25pm UTC](https://www.ruby-forum.com/t/noob-building-yarv-0-4-0/72894/2 "2006-02-24T18:25:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gzoller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/278dde/32.png) [@gzoller](https://www.ruby-forum.com/u/gzoller)\
**Post date:** [February 24, 2006, 10:02pm UTC](https://www.ruby-forum.com/t/noob-building-yarv-0-4-0/72894/3 "2006-02-24T22:02:12Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![gzoller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/278dde/32.png) [@gzoller](https://www.ruby-forum.com/u/gzoller)\
**Post date:** [February 24, 2006, 11:49pm UTC](https://www.ruby-forum.com/t/noob-building-yarv-0-4-0/72894/4 "2006-02-24T23:49:50Z")

</div>

Greg Zoller wrote:

> Thanks, E, but I’m still having the same issues. ☹

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

---

<div class="post-metadata">

**Author:** ![gzoller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/278dde/32.png) [@gzoller](https://www.ruby-forum.com/u/gzoller)\
**Post date:** [February 25, 2006, 5:12am UTC](https://www.ruby-forum.com/t/noob-building-yarv-0-4-0/72894/5 "2006-02-25T05:12:35Z")

</div>

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

> Thanks, E, but I’m still having the same issues. ☹
> 
> 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:

- 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).

---

<div class="post-metadata">

**Author:** ![gzoller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/278dde/32.png) [@gzoller](https://www.ruby-forum.com/u/gzoller)\
**Post date:** [February 25, 2006, 4:05pm UTC](https://www.ruby-forum.com/t/noob-building-yarv-0-4-0/72894/6 "2006-02-25T16:05:20Z")

</div>

> > > > > “R” == Ross B. [removed\_email\_address@domain.invalid](mailto: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]

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:in `block (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:in `module: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
