# Error Compiling Ruby 1.8.4 on AIX 5.2

**URL:** <https://www.ruby-forum.com/t/error-compiling-ruby-1-8-4-on-aix-5-2/58257>\
**Category:** Ruby\
**Created:** [April 20, 2006, 1:00am UTC](https://www.ruby-forum.com/t/error-compiling-ruby-1-8-4-on-aix-5-2/58257 "2006-04-20T01:00:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![WeytensS\_Randy\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/f08c70/32.png) [@WeytensS\_Randy\_J](https://www.ruby-forum.com/u/WeytensS_Randy_J)\
**Post date:** [April 20, 2006, 1:00am UTC](https://www.ruby-forum.com/t/error-compiling-ruby-1-8-4-on-aix-5-2/58257/1 "2006-04-20T01:00:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![WeytensS\_Randy\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/f08c70/32.png) [@WeytensS\_Randy\_J](https://www.ruby-forum.com/u/WeytensS_Randy_J)\
**Post date:** [April 21, 2006, 7:43am UTC](https://www.ruby-forum.com/t/error-compiling-ruby-1-8-4-on-aix-5-2/58257/2 "2006-04-21T07:43:31Z")

</div>

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/](http://homepage.mac.com/)  
cjgibbons/rubyonaixhowto/t1.html

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

Christopher Gibbons
