Building on AIX 5.3

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

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 forall’.
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

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

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

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

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

Christopher Gibbons

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

Fabulous! Thanks!

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