Problems compiling Ruby 1.8.6 on AIX

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

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

Hi,

2007/8/17, Clif S. [email protected]:

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

/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