Compile gcc on AIX 5.2

I'm trying to compile gcc 3.4.6 on AIX 5.2 but I get this error:

bison -t --name-prefix=java_  -o java/parse.c java/parse.y
M4sugar requires GNU M4. Install it before installing M4sugar or
set the M4 environment variable to its path name.make[1]: *** [java/parse.c] Broken pipe
gcc -c   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes     -DHAVE_CONFIG_H    -I. -Ijava -I. -I./java -I./../include -I../intl java/parse.c -o java/parse.o
gcc: java/parse.c: No such file or directory
gcc: no input files
make[1]: *** [java/parse.o] Error 1
make[1]: Leaving directory `/home/root/gcc-3.4.6/gcc'
make: *** [all-gcc] Error 2

I already set the M4 variable:

-bash-3.00# echo $M4
/usr/bin/m4
-bash-3.00# echo $PATH
/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java14/jre/bin:/usr/java14/bin:/usr/local/ant/bin
-bash-3.00# which m4
/usr/bin/m4

but the error remains... :confused:

If you don't need the version you are trying to compile you can get a compiled version here: http://www.bullfreeware.com/listaix52.html

I need that version.

What is so hard to understand in

?

I have boldened for you the relevant part in case you still ponder the question i raised. AIX M4 is not GNU M4 and perhaps GNU M4 has features the AIX M4 lacks and M4sugar relies upon those. Setting environment variables will not change the features a certain version of M4 has or has not.

bakunin

Sorry, I didn't specified that I already installed GNU M4.
Now I'm trying by compiling bison and m4 with a recent version...

Sorry, but i think you are mistaken: if you have installed GNU M4 it should reside somewhere in /usr/local/bin and definitely not in /usr/bin. In /usr/bin reside the original OS binaries and nothing else. By letting the M4 variable point to /usr/bin/m4 you probably overrode any possiblity left that the make-utility might find it.

1) check your path: perhaps your PATH variable looks like "/usr/bin:.....:/usr/local/bin:.....", which means that - first come first serve - if a command resides in /usr/bin AND in /usr/local/bin the one in /usr/bin (the original OS binaries) will be taken until explicitly stated otherwise. To use the one in /usr/local/bin either change your path (not advisable) or specify /usr/local/bin/command explicitly.

2) set your M4 variable to where the GNU M4 resides, not where ANY M4 is.

I hope this helps.

bakunin

I checked my path and now I can go over that error but:

gcc   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long    -DHAVE_CONFIG_H    -I. -I. -I. -I./. -I./../include -I../intl -c insn-attrtab.c \
  -o insn-attrtab.o
as: There is not enough space in the file system.
Assembler:
/tmp//ccpLs5Gx.s: line 546700: 1252-161 A system problem occurred while processing file /tmp/asC3Cqia
make[1]: *** [insn-attrtab.o] Error 1
make[1]: Leaving directory `/home/root/gcc-3.4.6/gcc'
make: *** [all-gcc] Error 2

The problem is on space left on /tmp? Can I remove its content (or part of it)?

Now, after 12 hours of make, I have this error:

...
checking for modfl... yes
checking for powl declaration... yes
checking for powl... yes
checking for sqrtl declaration... /bin/sh: 62116 Segmentation fault(coredump)
make: *** [configure-target-libstdc++-v3] Error 1

:confused:

:frowning: