From: Paul David Buchan
Subject: Trouble compiling Clisp 2.47 on AIX 5.1
Date: 
Message-ID: <pan.2009.02.10.18.37.12.785000@yahoo.com>
Hi guys/gals.

I'm attempting to compile Clisp 2.47 on AIX 5.1 
running on an IBM 43P Model 140.

The INSTALL file in the unix directory suggests a
few pre-installations, so I performed the following steps:

1) gunzip libsigsegv-2.6.tar.gz
   from ftp://ftp.gnu.org/pub/gnu/libsigsegv

2) tar -xf libsigsegv-2.6.tar

3) cd src

4) ../configure

5) cd src (i.e., I'm in src/src)

6) gmake

7) gmake install



8) gunzip ffcall-1.10.tar.gz
    from http://www.haible.de/bruno/gnu/ffcall-1.10.tar.gz

9) tar -xf ffcall-1.10.tar

10) configure

11) gmake

12) gmake install



13) rpm -Uvh gettext-0.10.40-6.aix5.1.ppc.rpm
    from ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/gettext/



14) rpm -Uvh readline-4.3-2.aix5.1.ppc.rpm
    from ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/readline/



15) rpm -Uvh --nodeps libiconv-1.12-2.aix5.1.ppc.rpm
    from http://www.perzl.org/aix/index.php?n=Main.Libiconv

Note that I used --nodeps flag to install libiconv. 
Otherwise I had the following prerequisite error:

error: failed dependencies:
        libintl.a(libintl.so.8) is needed by libiconv-1.12-2



16) gunzip clisp-2.47.tar.gz
    from ftp://ftp.gnu.org/pub/gnu/clisp/release/2.47/

17) tar -xf clisp-2.47.tar

18) configure build-with-gcc

19) gmake

20) gmake install

The compilation fails as follows:

...lots of stuff to std output...
rm -rf data
mkdir data
cd data && ln -s /usr/sys/inst.images/clisp-2.47/utils/unicode/UnicodeDataFull.txt .
cd data && ln -s /usr/sys/inst.images/clisp-2.47/doc/Symbol-Table.text .
gcc -g -O2 -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -O2 
-falign-functions=4 -DUNICODE -DNO_TERMCAP_NCURSES -DDYNAMIC_FFI -I. -x none spvw.o spvwtabf.o spvwtabs.o spvwtabo.o eval.o 
control.o encoding.o pathname.o stream.o socket.o io.o funarg.o array.o hashtabl.o list.o package.o record.o weak.o 
sequence.o charstrg.o debug.o error.o misc.o time.o predtype.o symbol.o lisparit.o i18n.o foreign.o unixaux.o built.o 
gllib/uniwidth/width.o gllib/uniname/uniname.o gllib/localcharset.o modules.o -lintl /usr/local/lib/libavcall.a 
/usr/local/lib/libcallback.a -liconv -L/usr/local/lib -lsigsegv -lc -o lisp.run
gcc: gllib/uniwidth/width.o: No such file or directory
gcc: gllib/uniname/uniname.o: No such file or directory
gcc: gllib/localcharset.o: No such file or directory
gmake: *** [lisp.run] Error 1

One strange thing is, I can find the following files:

gllib/uniwidth/.libs/width.o
gllib/uniname/.libs/uniname.o
gllib/.libs/localcharset.o

So in a cheeky move, I linked these to the directories
the make file expected them to be in. It failed. I forget
the error. If someone thinks it warranted, I can do it
again and capture the error.

Does anyone have a suggestion on where to go next?

Thanks,
Dave Buchan
········@yahoo.com
From: Paul David Buchan
Subject: Re: Trouble compiling Clisp 2.47 on AIX 5.1
Date: 
Message-ID: <pan.2009.02.17.15.33.39.695000@yahoo.com>
Here's a report on my progress so far.

I went back and re-examined the installation of libiconv.
I was uneasy about forcing the --nodeps flag on the rpm
installation.

So I retrieved libiconv-1.12.tar.gz from 
ftp://ftp.gnu.org/pub/gnu/libiconv/
gunzip
tar -xf libiconv-1.12.tar
configure
gmake
gmake install

This worked without complaint. For whatever reason,
it didn't ask for libintl.a(libintl.so.8).
This is odd, because I thought libintl.a was from
libgcc. Regardless, I also upgraded from gcc 4.0.0
to 4.2.4. I obtained the binary rpm from

http://www.perzl.org/aix/index.php?n=Main.Gcc

I cleared out all the old clisp attempted compilation
stuff and started fresh.

It fails again, but with a new error...


****SNIP****
gcc -I/usr/local/include -Igllib -g -O2 -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type 
-Wmissing-declarations -Wno-sign-compare -O2 -falign-functions=4 -DUNICODE -DNO_TERMCAP_NCURSES -DDYNAMIC_FFI -I. -c 
control.c
/usr/sys/inst.images/clisp-2.47/src/control.d: In function 'C_tagbody':
/usr/sys/inst.images/clisp-2.47/src/control.d:1565: warning: variable 'body' might be clobbered by 'longjmp' or 'vfork'

cc1: out of memory allocating 374048 bytes after a total of 133570220 bytes
gmake: *** [control.o] Error 1
****END SNIP****

This error is interesting, because the notes for clisp
compilation on AIX read...

****SNIP****
* On AIX 3 and 4:

You can't use "cc" as compiler since it wants more than 64 MB RAM to compile
eval.d. You will use GNU gcc without regrets.
You can't use "xlc" as compiler on AIX 4 since it miscompiled certain casts
between integer types.
Choose gcc as compiler, as described in paragraph 2 of the INSTALL file.

The /bin/sh which is used during configuration may complain about
the config.cache which is generated.  If this happens, start over
with the variable CONFIG_SHELL exported as a reliable shell, like bash.


* On AIX 5.1:

When using "xlc -D_ALL_SOURCE" as compiler, you cannot use optimizations.
So remove any -O from the CFLAGS in the Makefile.
****END SNIP****

I'm compiling on AIX 5.1, but the notes for AIX 3 and 4 are intriguing.

Does anybody know why my error message says,
"cc1: out of memory..."?

Does that mean it didn't use gcc? I can see it DID use gcc 
for most of the compilation.

Regardless, I retried compilation, but I typed
export CC="gcc -Wall"
as directed in paragraph 2 of the INSTALL file.
I'm using ksh.

Same compilation problem.

As always, suggestions are welcome.

Dave