# Problems compiling Ruby 1.8.6 on AIX

**URL:** <https://www.ruby-forum.com/t/problems-compiling-ruby-1-8-6-on-aix/112255>\
**Category:** Ruby\
**Created:** [August 16, 2007, 9:33pm UTC](https://www.ruby-forum.com/t/problems-compiling-ruby-1-8-6-on-aix/112255 "2007-08-16T21:33:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clif\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a6a055/32.png) [@Clif\_S](https://www.ruby-forum.com/u/Clif_S)\
**Post date:** [August 16, 2007, 9:33pm UTC](https://www.ruby-forum.com/t/problems-compiling-ruby-1-8-6-on-aix/112255/1 "2007-08-16T21:33:01Z")

</div>

I’m trying to get ruby running on AIX 5.3 as I can’t find any  
precompiled versions… 😉

I’ve installed the following rpms:

- openssl-0.9.7l-1
- libgcc-4.0.0-1
- zlib-1.2.3-3
- gcc-c+±4.0.0-1
- gcc-4.0.0-1
- libstdc+±4.0.0-1
- libstdc+±devel-4.0.0-1
- zlib-devel-1.2.3-3
- openssl-devel-0.9.7l-1

I set my path to  
/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java14/jre/bin:/usr/java14/bin:/opt/freeware/bin/

I tried a simply ./configure as well as ./configure  
–prefix=/usr/local/ruby/ruby-1.8.6 --disable-ipv6  
–with-openssl-include=/opt/freeware/include/openssl  
–with-openssl-lib=/opt/freeware/lib  
–with-zlib-include=/opt/freeware/include  
–with-zlib-lib=/opt/freeware/lib to no avail.

Here’s a snippet of the make with a number of errors:  
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  
dir.c: In function ‘dir\_inspect’:  
dir.c:481: warning: incompatible implicit declaration of built-in  
function ‘snprintf’  
gcc -g -O2 -DRUBY\_EXPORT -I. -I. -c dln.c  
dln.c: In function ‘init\_funcname\_len’:  
dln.c:122: warning: incompatible implicit declaration of built-in  
function ‘snprintf’  
dln.c: In function ‘aix\_loaderror’:  
dln.c:1241: warning: incompatible implicit declaration of built-in  
function ‘snprintf’  
gcc -g -O2 -DRUBY\_EXPORT -I. -I. -c enum.c  
gcc -g -O2 -DRUBY\_EXPORT -I. -I. -c error.c  
error.c: In function ‘err\_position’:  
error.c:46: warning: incompatible implicit declaration of built-in  
function ‘snprintf’  
error.c:49: warning: incompatible implicit declaration of built-in  
function ‘snprintf’

error.c:165: warning: incompatible implicit declaration of built-in  
function ‘snprintf’  
error.c: In function ‘get\_syserr’:  
error.c:859: warning: incompatible implicit declaration of built-in  
function ‘snprintf’  
bash-3.00# tail -f /tmp/ruby.errors  
/opt/freeware/lib/gcc/powerpc-ibm-aix5.1.0.0/4.0.0/include/wchar.h:299:  
error: parse error before ‘mbstate\_t’  
/opt/freeware/lib/gcc/powerpc-ibm-aix5.1.0.0/4.0.0/include/wchar.h:302:  
error: parse error before ‘mbstate\_t’  
make: 1254-004 The error code from the last command is 1.  
Stop.  
make: 1254-004 The error code from the last command is 1.  
Stop.

Any help would be greatly appreciated!

cjs

---

<div class="post-metadata">

**Author:** ![Clif\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a6a055/32.png) [@Clif\_S](https://www.ruby-forum.com/u/Clif_S)\
**Post date:** [August 17, 2007, 8:07am UTC](https://www.ruby-forum.com/t/problems-compiling-ruby-1-8-6-on-aix/112255/2 "2007-08-17T08:07:01Z")

</div>

Hi,

2007/8/17, Clif S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> I’m trying to get ruby running on AIX 5.3 as I can’t find any precompiled versions… 😉  
>   
> /opt/freeware/lib/gcc/powerpc-ibm-aix5.1.0.0/4.0.0/include/wchar.h:299: error: parse error before ‘mbstate\_t’  
> /opt/freeware/lib/gcc/powerpc-ibm-aix5.1.0.0/4.0.0/include/wchar.h:302: error: parse

It seemed that you’ve installed gcc for AIX 5.1 to AIX 5.3.  
I was able to recreate this error using gcc for 5.1 in my test  
environment(AIX5.3).  
Please install correct version of gcc.  
You can download them from  
ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/gcc

## Regards,

Yutaka KANEMOTO

> **[きっかけは29126](https://kinpoco.hatenadiary.org/)**
>
> きっかけは29126
