Error compiling Ruby 1.9.3 on AIX 6.1: uninitialized constant Encoding::ASCII_8BIT

I’m compiling Ruby 1.9.3-p545 from source on an AIX 6 host with following procedure:

./configure --prefix=/usr/local --enable-shared
make
make install

The configuration seems ok but in the end of running make, RDoc panic:

......
Target "all" is up to date.
Generating RDoc documentation
Parsing sources...
Before reporting this, could you check that the file you're documenting has proper syntax:

/usr/local/bin/ruby -c addr2line.c

RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.

The internal error was:

    (NameError) uninitialized constant Encoding::ASCII_8BIT

uh-oh! RDoc had a problem:
uninitialized constant Encoding::ASCII_8BIT

run with --debug for full backtrace
make: 1254-004 The error code from the last command is 1.

So, how should I fix this “uninitialized constant Encoding::ASCII_8BIT” error? I’ve tried changing some locales but not working.

Some env info:

locale:

LANG=en_US.ISO8859-1
LC_COLLATE="en_US.ISO8859-1"
LC_CTYPE="en_US.ISO8859-1"
LC_MONETARY="en_US.ISO8859-1"
LC_NUMERIC="en_US.ISO8859-1"
LC_TIME="en_US.ISO8859-1"
LC_MESSAGES="en_US.ISO8859-1"
LC_ALL=

gcc -v:

Using built-in specs.
Target: powerpc-ibm-aix6.1.0.0
Configured with: ../configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld --enable-languages=c,c++,java --prefix=/opt/freeware --enable-threads --enable-version-specific-runtime-libs --host=powerpc-ibm-aix6.1.0.0 --target=powerpc-ibm-aix6.1.0.0 --build=powerpc-ibm-aix6.1.0.0 --disable-libjava-multilib
Thread model: aix
gcc version 4.2.0

Thank you!


Source: gcc

Leave a Reply