[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Problems building ruby1.9 on Blue Gene/L

Chad Brewbaker

12/9/2007 8:07:00 AM

Trying to cross-compile a compute node binary of Ruby1.9.

First, the configure.in file is still broken from Ruby1.8.6. You need to
comment out these lines so the configure script doesn't break:

/configure.in:706:#AC_FUNC_GETPGRP
/configure.in:707:#AC_FUNC_SETPGRP

You also need to hack the resulting configure file so it won't exit
complaining you are trying to cross compile.

I used the following configure options:
export CC=blrts_xlc
export F77=blrts_xlf
export FFLAGS=" -O2"
export CFLAGS=" -O2"
#Make sure to link the lmsglayer,lrts,ldevices before and after
everything in the makefile.
export LDFLAGS=" -qarch=440d -qtune=440 -lc -lnss_files -lnss_dns -lresolv -L/bgl/BlueLight/ppcfloor/bglsys/lb -lmpich.rts -lmsglayer.rts
-lrts.rts -ldevices.rts"
echo "Configuring"
export EXTLIBS="-lc -lnss_files -lnss_dns -lresolv" /configure -build powerpc-aix -host ppc-linux-gnu --includedir=/home/crb002/include --oldincludedir=/home/crb002/include
--prefix=/home/crb002/



Now for the make:



> make
/lib/fileutils.rb:1532:in `public': undefined method `commands' for
class `Module' (NameError)
from ./lib/fileutils.rb:1532
from ./lib/fileutils.rb:1531:in `each'
from ./lib/fileutils.rb:1531
from ./mkconfig.rb:10:in `require'
from ./mkconfig.rb:10
make: *** [.rbconfig.time] Error 1

> make -n
ruby -I/MY_FANCY_PATH/ruby -rfake ./mkconfig.rb
-timestamp=.rbconfig.time -install_name=ruby -so_name=ruby rbconfig.rb
ruby -I/MY_FANCY_PATH/ruby -rfake -I. -rrbconfig
/tool/compile_prelude.rb ./prelude.rb ./gem_prelude.rb prelude.c
blrts_xlc -O5 -qarch=440d -qtune=440 -I. -I.ext/include/powerpc-linux
-I./include -I. -DRUBY_EXPORT -D_GNU_SOURCE=1 -c prelude.c
make: *** No rule to make target `thread_.h', needed by `error.o'.
Stop.


Any sugestions?
--
Posted via http://www.ruby-....

4 Answers

Nobuyoshi Nakada

12/9/2007 2:18:00 PM

0

Hi,

At Sun, 9 Dec 2007 17:06:32 +0900,
Chad Brewbaker wrote in [ruby-talk:282763]:
> First, the configure.in file is still broken from Ruby1.8.6. You need to
> comment out these lines so the configure script doesn't break:
>
> ./configure.in:706:#AC_FUNC_GETPGRP
> ./configure.in:707:#AC_FUNC_SETPGRP

How did it fail?

> > make
> ./lib/fileutils.rb:1532:in `public': undefined method `commands' for
> class `Module' (NameError)

How is MINIRUBY defined in Makefile?

> blrts_xlc -O5 -qarch=440d -qtune=440 -I. -I.ext/include/powerpc-linux
> -I./include -I. -DRUBY_EXPORT -D_GNU_SOURCE=1 -c prelude.c
> make: *** No rule to make target `thread_.h', needed by `error.o'.

Seems pthread isn't supported, or isn't detected properly.

--
Nobu Nakada

Chad Brewbaker

12/11/2007 9:18:00 PM

0

Nobuyoshi Nakada wrote:


> How did it fail?

On Blue Gene/L the compute nodes are different from the login node, so
you have to cross compile everything. The configure script stops first
when trying to test the setpgrp functions.

>checking whether setpgrp takes no argument... configure: error: cannot check setpgrp when cross compiling

GNU Autoconf 2.59 was used to generate the configure file.


For Ruby1.8 I just hacked the configure script to comment out offending
lines, but it would be nice if the configure.in file was modified to get
rid of cross compiling problems.


>> > make
>> ./lib/fileutils.rb:1532:in `public': undefined method `commands' for
>> class `Module' (NameError)
>
> How is MINIRUBY defined in Makefile?


MINIRUBY = ruby -I/MY_PATH/ruby -rfake $(MINIRUBYOPT)
RUNRUBY = $(MINIRUBY) -I`cd $(srcdir)/lib; pwd`


Is miniruby anything special or can I just replace it with a working
ruby1.8.6 build?


>
>> blrts_xlc -O5 -qarch=440d -qtune=440 -I. -I.ext/include/powerpc-linux
>> -I./include -I. -DRUBY_EXPORT -D_GNU_SOURCE=1 -c prelude.c
>> make: *** No rule to make target `thread_.h', needed by `error.o'.
>
> Seems pthread isn't supported, or isn't detected properly.

Yes. The compute nodes of Blue Gene/L use a very stripped down kernel
that makes everything run in one process. No forking allowed, no
pthreads. Is there something I have to pass in order to turn off OS
threading? For ruby1.8 this wasn't a problem.
--
Posted via http://www.ruby-....

Chad Brewbaker

12/12/2007 12:17:00 AM

0

Question. Looking into thread.c:

> YARV Thread Desgin
>
> model 1: Userlevel Thread
> Same as traditional ruby thread.
> model 2: Native Thread with Giant VM lock
Using pthread (or Windows thread) and Ruby threads run > concurrent.


And looking into vm_core.h:

>#define RUBY_VM_THREAD_MODEL 2
...
>#if defined(_WIN32)
>#include "thread_win32.h"
>#elif defined(HAVE_PTHREAD_H)
>#include "thread_pthread.h"
>#else
>#error "unsupported thread type"
>#endif
...
>#if RUBY_VM_THREAD_MODEL == 2
>#else
>#error "unsupported thread model"
>#endif

So model 1 threads are not supported in Ruby1.9?
--
Posted via http://www.ruby-....

Chad Brewbaker

12/12/2007 2:31:00 AM

0

Chad Brewbaker wrote:
> Question. Looking into thread.c:
>
>> YARV Thread Desgin
>>
>> model 1: Userlevel Thread
>> Same as traditional ruby thread.
>> model 2: Native Thread with Giant VM lock
>> Using pthread (or Windows thread) and Ruby threads run > concurrent.
>
> So model 1 threads are not supported in Ruby1.9?
Well, according to Matz's keynote I guess not :(

http://rubyconf2007.confreaks.com/d2t1p8_ke...

Well looks like I am stuck with 1.8 until somebody implements green
threading. So if one wanted to do this what would be involved?


--
Posted via http://www.ruby-....