Ruby 1.8.5 on AIX 5.3 "ruby -v" errors

HI
I compiled ruby-1.8.5 on AIX 5.3.
When I run ruby -v its giving this error. I tested the ruby with some
of our scripts and it works perfectly fine.

#ruby -v
ruby 1.8.5 (2006-08-25) [powerpc-aix5.3.0.0]
ruby: [BUG] Segmentation fault
ruby 1.8.5 (2006-08-25) [powerpc-aix5.3.0.0]

IOT/Abort trap(coredump)
Can anybody help.
Thanks

Hi,

At Wed, 20 Sep 2006 03:25:16 +0900,
Mehdi wrote in [ruby-talk:215167]:

I compiled ruby-1.8.5 on AIX 5.3.
When I run ruby -v its giving this error. I tested the ruby with some
of our scripts and it works perfectly fine.

#ruby -v
ruby 1.8.5 (2006-08-25) [powerpc-aix5.3.0.0]
ruby: [BUG] Segmentation fault
ruby 1.8.5 (2006-08-25) [powerpc-aix5.3.0.0]

IOT/Abort trap(coredump)

Can you show the stack trace by debugger?

The ruby previously compiled was on AIX 5.3.0.4. It compiled perfectly
and there were no errors and ran perfectly until I upgraded AIX from
maintenance level 4 to maintenance level 5. I tried to compile again
and this is the error I get when I run “make”. When I use the binaries
which I compiled on Maintenance level 4 the test scripts work and looks
like its working but when I run “ruby -v” it gives segmentation fault,
like the one given below when I tried compiling agin.

gcc -g -O2 -DRUBY_EXPORT -I. -I. -c inits.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c io.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c marshal.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c math.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c numeric.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c object.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c pack.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c parse.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c process.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c prec.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c random.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c range.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c re.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c regex.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c ruby.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c signal.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c sprintf.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c st.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c string.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c struct.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c time.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c util.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c variable.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c version.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c ./missing/flock.c
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c dmyext.c
ar rcu libruby-static.a array.o bignum.o class.o compar.o
dir.o dln.o enum.o error.o eval.o file.o gc.o hash.o inits.o
io.o marshal.o math.o numeric.o object.o pack.o parse.o
process.o prec.o random.o range.o re.o regex.o ruby.o signal.o
sprintf.o st.o string.o struct.o time.o util.o variable.o
version.o flock.o dmyext.o
gcc -g -O2 -DRUBY_EXPORT -I. -I. -c main.c
gcc main.o libruby-static.a -ldl -lcrypt -lm -o miniruby -g
-O2 -DRUBY_EXPORT -Wl,-brtl -Wl,-bE:ruby.imp
rbconfig.rb updated
./mkconfig.rb:157: [BUG] Segmentation fault
ruby 1.8.5 (2006-08-25) [powerpc-aix5.3.0.0]

make: 1254-059 The signal code from the last command is 6.

Stop.

Mehdi wrote:

The ruby previously compiled was on AIX 5.3.0.4. It compiled perfectly
and there were no errors and ran perfectly until I upgraded AIX from
maintenance level 4 to maintenance level 5. I tried to compile again
and this is the error I get when I run “make”.

Try it again without -O2 in the CFLAGS, in case it’s an
optimiser issue. However if it’s really crashing inside
exit(), that seems less likely.

Clifford H…

Hello Mehdi,

After upgraded to TL5, my ruby core dumped as well.
But this occurred only if the ruby was compiled by gcc. I mean, the
ruby compiled by using XL C Ver.8 did not core dumped.

The stack trace in my environment is like this:
#I omitted some dbx error…
(dbx) t
raise.raise(??) at 0xd0313754
abort.abort() at 0xd0342cb0
rb_bug(fmt = “Segmentation fault”), line 214 in “error.c”
sigsegv(sig = 11), line 537 in “signal.c”
__modinit.find_rtinit(??, ??, ??) at 0xd032af10
__modinit.__modfini() at 0xd032afa0
cuexit.exit(??) at 0xd032005c
proc_options(argc = 0, argv = 0x2ff22c30), line 776 in “ruby.c”
ruby_process_options(argc = 2, argv = 0x2ff22c28), line 1194 in “ruby.c”
ruby_options(argc = 2, argv = 0x2ff22c28), line 1521 in “eval.c”
main(argc = 2, argv = 0x2ff22c28, envp = 0x2ff22c34), line 45 in
“main.c”

It seemed that my ruby core dumped after calling exit().
This might be AIX issue, I guess.

Unlike your case, I was able to compile the ruby again after upgraded
to TL5 (actually, TL5 + SP1), and it did not core dumped.
I’m using gcc 3.4.6 which I compiled using XL C, when the AIX was TL4.

Which version of gcc are you using? Where/How did you get it?
If you have XL C, it would be worth trying.

Or, contact AIX support, please.

No it didnt work

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs