# Building on AIX 5.3

**URL:** <https://www.ruby-forum.com/t/building-on-aix-5-3/64042>\
**Category:** Ruby\
**Created:** [June 21, 2006, 4:17pm UTC](https://www.ruby-forum.com/t/building-on-aix-5-3/64042 "2006-06-21T16:17:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![justinj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b38774/32.png) [@justinj](https://www.ruby-forum.com/u/justinj)\
**Post date:** [June 21, 2006, 4:17pm UTC](https://www.ruby-forum.com/t/building-on-aix-5-3/64042/1 "2006-06-21T16:17:47Z")

</div>

Hello,

I’m having a difficult time building Ruby on AIX 5.3. I’m installing  
it on a separate file system (/svn) to avoid the need for root access.  
First I uncompress the following prebuilt binaries to /svn. I  
downloaded these binaries from [http://aixpdslib.seas.ucla.edu/](http://aixpdslib.seas.ucla.edu/).

autoconf.2.59.tar.Z  
gcc.4.1.0.tar.Z  
libtool.1.5.22.tar.Z  
m4.1.4.4.tar.Z  
make.3.80.tar.Z  
zlib.1.2.3.tar.Z

Note that I didn’t install binutils (ld and company) because it was  
causing some problems for some of the other packages I am building.  
So I’m using the version of ld that comes with the OS.

Then I attempt to build Ruby, first unzipping and configuring it with  
the following commands.

cd $build\_dir  
gunzip $src\_dir/ruby-1.8.4.tar.gz  
tar xvf $src\_dir/ruby-1.8.4.tar  
cd ruby-1.8.4  
./configure --prefix=/svn

This completes successfully. Then I run make, which ends with an error.

svnadm /svn/build/ruby-1.8.4\>make  
gcc -g -O2 -DRUBY\_EXPORT -I. -I. -c array.c  
gcc -g -O2 -DRUBY\_EXPORT -I. -I. -c bignum.c  
gcc -g -O2 -DRUBY\_EXPORT -I. -I. -c class.c  
gcc -g -O2 -DRUBY\_EXPORT -I. -I. -c compar.c  
gcc -g -O2 -DRUBY\_EXPORT -I. -I. -c dir.c  
gcc -g -O2 -DRUBY\_EXPORT -I. -I. -c dln.c  
gcc -g -O2 -DRUBY\_EXPORT -I. -I. -c enum.c  
gcc -g -O2 -DRUBY\_EXPORT -I. -I. -c error.c  
gcc -g -O2 -DRUBY\_EXPORT -I. -I. -c eval.c  
gcc -g -O2 -DRUBY\_EXPORT -I. -I. -c file.c  
gcc -g -O2 -DRUBY\_EXPORT -I. -I. -c gc.c  
gcc -g -O2 -DRUBY\_EXPORT -I. -I. -c hash.c  
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 -brtl  
gcc: unrecognized option ‘-brtl’  
rbconfig.rb updated  
compiling Win32API  
compiling bigdecimal  
make[1]: Entering directory `/svn/build/ruby-1.8.4/ext/bigdecimal' mkdir -p ../../.ext/powerpc-aix5.3.0.0 gcc -g -O2 -I. -I../.. -I../../. -I../.././ext/bigdecimal -c bigdecimal.c In file included from ../../ruby.h:24, from bigdecimal.c:23: ../../config.h:8:1: warning: "_ALL_SOURCE" redefined In file included from /svn/usr/local/bin/../lib/gcc/powerpc-ibm-aix5.3.0.0/4.1.0/include/ctype.h:46, from bigdecimal.c:16: /usr/include/standards.h:130:1: warning: this is the location of the previous definition /usr/ccs/bin/ld -brtl -eInit_bigdecimal -bI:../../ruby.imp -bM:SRE -T512 -H512 -L"../.." -o ../../.ext/powerpc-aix5.3.0.0/bigdecimal.so bigdecimal.o -ldl -lcrypt -lm -lc ld: 0706-003 Cannot find or read import file: ../../ruby.imp ld:accessx(): A file or directory in the path name does not exist. make[1]: *** [../../.ext/powerpc-aix5.3.0.0/bigdecimal.so] Error 255 make[1]: Leaving directory `/svn/build/ruby-1.8.4/ext/bigdecimal’  
make: \*\*\* [all] Error 1  
svnadm /svn/build/ruby-1.8.4\>

As an attempt to get around this error I tried making ruby.imp and  
then running make again. This got me a little further.

svnadm /svn/build/ruby-1.8.4\>make ruby.imp  
svnadm /svn/build/ruby-1.8.4\>make  
compiling Win32API  
make[1]: Entering directory `/svn/build/ruby-1.8.4/ext/Win32API' make[1]: Nothing to be done for `all’.  
make[1]: Leaving directory `/svn/build/ruby-1.8.4/ext/Win32API' compiling bigdecimal make[1]: Entering directory `/svn/build/ruby-1.8.4/ext/bigdecimal’  
/usr/ccs/bin/ld -brtl -eInit\_bigdecimal -bI:…/…/ruby.imp -bM:SRE  
-T512 -H512 -L"…/…" -o …/…/.ext/powerpc-aix5.3.0.0/bigdecimal.so  
bigdecimal.o -ldl -lcrypt -lm -lc  
mkdir -p …/…/.ext/bigdecimal  
cp …/…/./ext/bigdecimal/lib/bigdecimal/jacobian.rb  
…/…/.ext/bigdecimal  
cp …/…/./ext/bigdecimal/lib/bigdecimal/ludcmp.rb …/…/.ext/bigdecimal  
cp …/…/./ext/bigdecimal/lib/bigdecimal/math.rb …/…/.ext/bigdecimal  
cp …/…/./ext/bigdecimal/lib/bigdecimal/newton.rb …/…/.ext/bigdecimal  
cp …/…/./ext/bigdecimal/lib/bigdecimal/util.rb …/…/.ext/bigdecimal  
make[1]: Leaving directory `/svn/build/ruby-1.8.4/ext/bigdecimal' compiling curses make[1]: Entering directory `/svn/build/ruby-1.8.4/ext/curses’  
gcc -g -O2 -I. -I…/… -I…/…/. -I…/…/./ext/curses -DHAVE\_CURSES\_H  
-DHAVE\_BEEP -DHAVE\_BKGD -DHAVE\_BKGDSET -DHAVE\_CURS\_SET -DHAVE\_DELETELN  
-DHAVE\_DOUPDATE -DHAVE\_FLASH -DHAVE\_GETBKGD -DHAVE\_GETNSTR  
-DHAVE\_ISENDWIN -DHAVE\_KEYNAME -DHAVE\_KEYPAD -DHAVE\_SCRL  
-DHAVE\_SETSCRREG -DHAVE\_UNGETCH -DHAVE\_WATTROFF -DHAVE\_WATTRON  
-DHAVE\_WATTRSET -DHAVE\_WBKGD -DHAVE\_WBKGDSET -DHAVE\_WDELETELN  
-DHAVE\_WGETNSTR -DHAVE\_WSCRL -DHAVE\_WSETSCRREG -DHAVE\_DEF\_PROG\_MODE  
-DHAVE\_RESET\_PROG\_MODE -DHAVE\_TIMEOUT -DHAVE\_WTIMEOUT -DHAVE\_NODELAY  
-DHAVE\_INIT\_COLOR -DHAVE\_WCOLOR\_SET -c curses.c  
/usr/ccs/bin/ld -brtl -eInit\_curses -bI:…/…/ruby.imp -bM:SRE -T512  
-H512 -L"…/…" -o …/…/.ext/powerpc-aix5.3.0.0/curses.so curses.o  
-lcurses -ltermcap -ldl -lcrypt -lm -lc  
make[1]: Leaving directory `/svn/build/ruby-1.8.4/ext/curses' compiling dbm make[1]: Entering directory `/svn/build/ruby-1.8.4/ext/dbm’  
gcc -g -O2 -DDBM\_HDR=“\<ndbm.h\>” -I. -I…/… -I…/…/.  
-I…/…/./ext/dbm -DHAVE\_DBM\_OPEN -DHAVE\_NDBM\_H -DHAVE\_TYPE\_DBM  
-DHAVE\_SYS\_CDEFS\_H -DHAVE\_DBM\_OPEN -DHAVE\_DBM\_CLEARERR -c dbm.c  
/usr/ccs/bin/ld -brtl -eInit\_dbm -bI:…/…/ruby.imp -bM:SRE -T512  
-H512 -L"…/…" -o …/…/.ext/powerpc-aix5.3.0.0/dbm.so dbm.o -ldl  
-lcrypt -lm -lc  
make[1]: Leaving directory `/svn/build/ruby-1.8.4/ext/dbm' compiling digest make[1]: Entering directory `/svn/build/ruby-1.8.4/ext/digest’  
gcc -g -O2 -I. -I…/… -I…/…/. -I…/…/./ext/digest -c digest.c  
/usr/ccs/bin/ld -brtl -eInit\_digest -bI:…/…/ruby.imp -bM:SRE -T512  
-H512 -L"…/…" -o …/…/.ext/powerpc-aix5.3.0.0/digest.so digest.o  
-ldl -lcrypt -lm -lc  
cp …/…/./ext/digest/lib/md5.rb …/…/.ext  
cp …/…/./ext/digest/lib/sha1.rb …/…/.ext  
make[1]: Leaving directory `/svn/build/ruby-1.8.4/ext/digest' compiling digest/md5 make[1]: Entering directory `/svn/build/ruby-1.8.4/ext/digest/md5’  
mkdir -p …/…/…/.ext/powerpc-aix5.3.0.0/digest  
gcc -g -O2 -DHAVE\_CONFIG\_H -I…/…/…/./ext/digest/md5/… -I.  
-I…/…/… -I…/…/…/. -I…/…/…/./ext/digest/md5 -DHAVE\_SYS\_CDEFS\_H  
-DHAVE\_INTTYPES\_H -DHAVE\_UNISTD\_H -c md5init.c  
gcc -g -O2 -DHAVE\_CONFIG\_H -I…/…/…/./ext/digest/md5/… -I.  
-I…/…/… -I…/…/…/. -I…/…/…/./ext/digest/md5 -DHAVE\_SYS\_CDEFS\_H  
-DHAVE\_INTTYPES\_H -DHAVE\_UNISTD\_H -c md5.c  
/usr/ccs/bin/ld -brtl -eInit\_md5 -bI:…/…/…/ruby.imp -bM:SRE -T512  
-H512 -L"…/…/…" -o …/…/…/.ext/powerpc-aix5.3.0.0/digest/md5.so  
md5init.o md5.o -ldl -lcrypt -lm -lc  
make[1]: Leaving directory `/svn/build/ruby-1.8.4/ext/digest/md5' compiling digest/rmd160 make[1]: Entering directory `/svn/build/ruby-1.8.4/ext/digest/rmd160’  
gcc -g -O2 -DHAVE\_CONFIG\_H -I…/…/…/./ext/digest/rmd160/… -I.  
-I…/…/… -I…/…/…/. -I…/…/…/./ext/digest/rmd160  
-DHAVE\_SYS\_CDEFS\_H -DHAVE\_INTTYPES\_H -DHAVE\_UNISTD\_H -c rmd160init.c  
gcc -g -O2 -DHAVE\_CONFIG\_H -I…/…/…/./ext/digest/rmd160/… -I.  
-I…/…/… -I…/…/…/. -I…/…/…/./ext/digest/rmd160  
-DHAVE\_SYS\_CDEFS\_H -DHAVE\_INTTYPES\_H -DHAVE\_UNISTD\_H -c rmd160.c  
gcc -g -O2 -DHAVE\_CONFIG\_H -I…/…/…/./ext/digest/rmd160/… -I.  
-I…/…/… -I…/…/…/. -I…/…/…/./ext/digest/rmd160  
-DHAVE\_SYS\_CDEFS\_H -DHAVE\_INTTYPES\_H -DHAVE\_UNISTD\_H -c rmd160hl.c  
/usr/ccs/bin/ld -brtl -eInit\_rmd160 -bI:…/…/…/ruby.imp -bM:SRE  
-T512 -H512 -L"…/…/…" -o  
…/…/…/.ext/powerpc-aix5.3.0.0/digest/rmd160.so rmd160init.o  
rmd160.o rmd160hl.o -ldl -lcrypt -lm -lc  
make[1]: Leaving directory `/svn/build/ruby-1.8.4/ext/digest/rmd160' compiling digest/sha1 make[1]: Entering directory `/svn/build/ruby-1.8.4/ext/digest/sha1’  
gcc -g -O2 -DHAVE\_CONFIG\_H -I…/…/…/./ext/digest/sha1/… -I.  
-I…/…/… -I…/…/…/. -I…/…/…/./ext/digest/sha1  
-DHAVE\_SYS\_CDEFS\_H -DHAVE\_INTTYPES\_H -DHAVE\_UNISTD\_H -c sha1init.c  
gcc -g -O2 -DHAVE\_CONFIG\_H -I…/…/…/./ext/digest/sha1/… -I.  
-I…/…/… -I…/…/…/. -I…/…/…/./ext/digest/sha1  
-DHAVE\_SYS\_CDEFS\_H -DHAVE\_INTTYPES\_H -DHAVE\_UNISTD\_H -c sha1.c  
gcc -g -O2 -DHAVE\_CONFIG\_H -I…/…/…/./ext/digest/sha1/… -I.  
-I…/…/… -I…/…/…/. -I…/…/…/./ext/digest/sha1  
-DHAVE\_SYS\_CDEFS\_H -DHAVE\_INTTYPES\_H -DHAVE\_UNISTD\_H -c sha1hl.c  
/usr/ccs/bin/ld -brtl -eInit\_sha1 -bI:…/…/…/ruby.imp -bM:SRE -T512  
-H512 -L"…/…/…" -o  
…/…/…/.ext/powerpc-aix5.3.0.0/digest/sha1.so sha1init.o sha1.o  
sha1hl.o -ldl -lcrypt -lm -lc  
make[1]: Leaving directory `/svn/build/ruby-1.8.4/ext/digest/sha1' compiling digest/sha2 make[1]: Entering directory `/svn/build/ruby-1.8.4/ext/digest/sha2’  
gcc -g -O2 -DHAVE\_CONFIG\_H -I…/…/…/./ext/digest/sha2/… -I.  
-I…/…/… -I…/…/…/. -I…/…/…/./ext/digest/sha2  
-DHAVE\_SYS\_CDEFS\_H -DHAVE\_INTTYPES\_H -DHAVE\_UNISTD\_H  
-DHAVE\_TYPE\_UINT64\_T -c sha2.c  
gcc -g -O2 -DHAVE\_CONFIG\_H -I…/…/…/./ext/digest/sha2/… -I.  
-I…/…/… -I…/…/…/. -I…/…/…/./ext/digest/sha2  
-DHAVE\_SYS\_CDEFS\_H -DHAVE\_INTTYPES\_H -DHAVE\_UNISTD\_H  
-DHAVE\_TYPE\_UINT64\_T -c sha2hl.c  
gcc -g -O2 -DHAVE\_CONFIG\_H -I…/…/…/./ext/digest/sha2/… -I.  
-I…/…/… -I…/…/…/. -I…/…/…/./ext/digest/sha2  
-DHAVE\_SYS\_CDEFS\_H -DHAVE\_INTTYPES\_H -DHAVE\_UNISTD\_H  
-DHAVE\_TYPE\_UINT64\_T -c sha2init.c  
/usr/ccs/bin/ld -brtl -eInit\_sha2 -bI:…/…/…/ruby.imp -bM:SRE -T512  
-H512 -L"…/…/…" -o  
…/…/…/.ext/powerpc-aix5.3.0.0/digest/sha2.so sha2.o sha2hl.o  
sha2init.o -ldl -lcrypt -lm -lc  
make[1]: Leaving directory `/svn/build/ruby-1.8.4/ext/digest/sha2' compiling dl make[1]: Entering directory `/svn/build/ruby-1.8.4/ext/dl’  
Generating callback.func  
/svn/lib/ruby/1.8/powerpc-aix5.3.0.0/etc.so: [BUG] Segmentation fault  
ruby 1.8.4 (2005-12-24) [powerpc-aix5.3.0.0]

make[1]: \*\*\* [callback.func] IOT/Abort trap (core dumped)  
make[1]: \*\*\* Deleting file `callback.func' make[1]: Leaving directory `/svn/build/ruby-1.8.4/ext/dl’  
make: \*\*\* [all] Error 1  
svnadm /svn/build/ruby-1.8.4\>

Does anyone know how to get around these problems, or what the  
problems are to begin with?

Thanks,  
Justin

---

<div class="post-metadata">

**Author:** ![justinj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b38774/32.png) [@justinj](https://www.ruby-forum.com/u/justinj)\
**Post date:** [June 24, 2006, 9:46am UTC](https://www.ruby-forum.com/t/building-on-aix-5-3/64042/2 "2006-06-24T09:46:45Z")

</div>

On Jun 21, 2006, at 7:16 AM, Justin J. wrote:

> Hello,
> 
> I’m having a difficult time building Ruby on AIX 5.3. I’m installing  
> it on a separate file system (/svn) to avoid the need for root access.  
> First I uncompress the following prebuilt binaries to /svn. I  
> downloaded these binaries from [http://aixpdslib.seas.ucla.edu/](http://aixpdslib.seas.ucla.edu/).

I’ve noticed pdslib is not so hot as it once was. I’ve had much better  
success using the RPM packages that IBM provides with their AIX  
Toolbox for Linux:

[http://www-03.ibm.com/servers/aix/products/aixos/linux/download.html](http://www-03.ibm.com/servers/aix/products/aixos/linux/download.html)

Granted, some of the packages are not as new as the ones below, but  
they work.

> So I’m using the version of ld that comes with the OS.  
> You shouldn’t need it. The linker that ships with AIX is the one you  
> want.

> Then I attempt to build Ruby, first unzipping and configuring it with  
> the following commands.
> 
> cd $build\_dir  
> gunzip $src\_dir/ruby-1.8.4.tar.gz  
> tar xvf $src\_dir/ruby-1.8.4.tar  
> cd ruby-1.8.4  
> ./configure --prefix=/svn

> This completes successfully. Then I run make, which ends with an  
> error.
> 
> svnadm /svn/build/ruby-1.8.4\>make  
> gcc -g -O2 -DRUBY\_EXPORT -I. -I. -c array.c

[snip]

> As an attempt to get around this error I tried making ruby.imp and  
> then running make again. This got me a little further.

You are heading down the same path that I took a couple of months  
ago. There  
is a missing dependency in the Makefile for ruby.imp when building on  
AIX. There  
is a patch for it, but ‘make ruby.imp’ is a simple work-around that  
accomplishes  
the same thing.

> svnadm /svn/build/ruby-1.8.4\>make ruby.imp  
> svnadm /svn/build/ruby-1.8.4\>make

[snip]

> svnadm /svn/build/ruby-1.8.4\>  
> Try removing your entire /svn/lib/ruby directory or moving it out of  
> the way as it appears the ‘dl’ extension  
> is referencing an old library in that directory (or a library from a  
> previous build). I’ve seen this myself  
> and removing my prior install allowed it to compile.

> Does anyone know how to get around these problems, or what the  
> problems are to begin with?

I had the same problems you were experiencing and once I got it  
working I figured I better write it down:

[http://homepage.mac.com/cjgibbons/rubyonaixhowto/t1.html](http://homepage.mac.com/cjgibbons/rubyonaixhowto/t1.html)

Hope it helps, if it doesn’t let me know.

Christopher Gibbons

---

<div class="post-metadata">

**Author:** ![justinj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b38774/32.png) [@justinj](https://www.ruby-forum.com/u/justinj)\
**Post date:** [June 28, 2006, 8:15pm UTC](https://www.ruby-forum.com/t/building-on-aix-5-3/64042/3 "2006-06-28T20:15:36Z")

</div>

Christopher Gibbons wrote:  
[snip]

> I had the same problems you were experiencing and once I got it  
> working I figured I better write it down:
> 
> [http://homepage.mac.com/cjgibbons/rubyonaixhowto/t1.html](http://homepage.mac.com/cjgibbons/rubyonaixhowto/t1.html)

Fabulous! Thanks!
