# Ruby 1.8.5 on AIX 5.3 "ruby -v" errors

**URL:** <https://www.ruby-forum.com/t/ruby-1-8-5-on-aix-5-3-ruby-v-errors/69262>\
**Category:** Ruby\
**Created:** [September 19, 2006, 8:26pm UTC](https://www.ruby-forum.com/t/ruby-1-8-5-on-aix-5-3-ruby-v-errors/69262 "2006-09-19T20:26:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mehdi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d07c76/32.png) [@mehdi](https://www.ruby-forum.com/u/mehdi)\
**Post date:** [September 19, 2006, 8:26pm UTC](https://www.ruby-forum.com/t/ruby-1-8-5-on-aix-5-3-ruby-v-errors/69262/1 "2006-09-19T20:26:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mehdi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d07c76/32.png) [@mehdi](https://www.ruby-forum.com/u/mehdi)\
**Post date:** [September 20, 2006, 2:13am UTC](https://www.ruby-forum.com/t/ruby-1-8-5-on-aix-5-3-ruby-v-errors/69262/2 "2006-09-20T02:13:30Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![mehdi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d07c76/32.png) [@mehdi](https://www.ruby-forum.com/u/mehdi)\
**Post date:** [September 27, 2006, 3:22pm UTC](https://www.ruby-forum.com/t/ruby-1-8-5-on-aix-5-3-ruby-v-errors/69262/3 "2006-09-27T15:22:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mehdi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d07c76/32.png) [@mehdi](https://www.ruby-forum.com/u/mehdi)\
**Post date:** [September 30, 2006, 5:21am UTC](https://www.ruby-forum.com/t/ruby-1-8-5-on-aix-5-3-ruby-v-errors/69262/4 "2006-09-30T05:21:38Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![mehdi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d07c76/32.png) [@mehdi](https://www.ruby-forum.com/u/mehdi)\
**Post date:** [September 29, 2006, 6:55pm UTC](https://www.ruby-forum.com/t/ruby-1-8-5-on-aix-5-3-ruby-v-errors/69262/5 "2006-09-29T18:55:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mehdi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d07c76/32.png) [@mehdi](https://www.ruby-forum.com/u/mehdi)\
**Post date:** [October 5, 2006, 7:51pm UTC](https://www.ruby-forum.com/t/ruby-1-8-5-on-aix-5-3-ruby-v-errors/69262/6 "2006-10-05T19:51:24Z")

</div>

No it didnt work
