Error Compiling Ruby 1.8.4 on AIX 5.2

I have a question about compiling Ruby. I’m new to this list so kindly
let me know if I need to send this question to another mailing list.

I’m attempting to compile Ruby 1.8.4 on an AIX 5.2 OS. I’m ran
./configure, then make, and got this error:

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 f

ile.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 var

iable.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: `-b’ must come at the start of the command line

make: 1254-004 The error code from the last command is 1.

Thanks,

Randy Weytens

On Apr 19, 2006, at 3:59 PM, Weytens, Randy J. wrote:

I’m attempting to compile Ruby 1.8.4 on an AIX 5.2 OS. I’m ran
./configure, then make, and got this error:

make

    gcc -g -O2  -DRUBY_EXPORT  -I. -I.  -c array.c

<…snip…>

    gcc -g -O2  -DRUBY_EXPORT  -I.
     gcc main.o  libruby-static.a -ldl -lcrypt -lm   -o  

miniruby -g
-O2 -DRUBY_EXPORT -brtl

gcc: `-b’ must come at the start of the command line

make: 1254-004 The error code from the last command is 1.

There is an extra -brtl in the Makefile for LDFLAGS under AIX and you
need gmake, but those are just the first of the problems you will
encounter.

Its a bit rough getting Ruby to compile on AIX; however, it is possible.

I put a HOWTO together for it and posted it some weeks ago for the
Visual Age for C compiler, but I recently updated it for compilation
with gcc, so here is the link again: http://homepage.mac.com/
cjgibbons/rubyonaixhowto/t1.html

Hope this helps, let me know if it doesn’t work as described.

Christopher Gibbons