Problems building ruby1.9 on Blue Gene/L

C

Chad Brewbaker

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:


/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
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?
 
N

Nobuyoshi Nakada

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?
./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.
 
C

Chad Brewbaker

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.

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?

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

Chad Brewbaker

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?
 

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,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top