Forum: Ruby Noob: Building Yarv 0.4.0

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ff8bb181d75a4fbf8f37dcb2f17d8df7?d=identicon&s=25 Greg Zoller (gzoller)
on 2006-02-24 17:40
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:
<clip>
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 `<main>'
make: *** [all] Error 1

Thanks!
Greg
D111305c32e46f7dd2794a956208d347?d=identicon&s=25 E. Saynatkari (Guest)
on 2006-02-24 18:25
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
Ff8bb181d75a4fbf8f37dcb2f17d8df7?d=identicon&s=25 Greg Zoller (gzoller)
on 2006-02-24 22:02
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
D111305c32e46f7dd2794a956208d347?d=identicon&s=25 E. Saynatkari (Guest)
on 2006-02-24 23:49
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
A9b6a93b860020caf9d2d1d58c32478f?d=identicon&s=25 Ross Bamford (Guest)
on 2006-02-25 05:12
(Received via mailing list)
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:

	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).
956f185be9eac1760a2a54e287c4c844?d=identicon&s=25 ts (Guest)
on 2006-02-25 16:05
(Received via mailing list)
>>>>> "R" == Ross Bamford <rossrt@roscopeco.co.uk> 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: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 `<main>'
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
This topic is locked and can not be replied to.