PLEASE HELP!!!

Kai Ruottu kai.ruottu@wippies.com
Fri Jan 16 11:24:00 GMT 2009


Lang, Georg M (Georg) wrote:
> 
> I am trying to install GCC4.3.2 on a Sun machine running Solaris 9.  I
> have installed the recommended gmp-4.2.4 and mpfr-2.3.2 downloads.  This
 > is my configure command, which completes without any errors:
> 
> ./../src/gcc-4.3.2/configure --prefix=/build/ndbadm/gnu
> --with-local-prefix=/build/ndbadm/gnu --with-gnu-as=/usr/gnu/bin/as
> --with-gnu-ld=/usr/gnu/bin/ld --enable-languages=c,c++ --disable-nls
> --disable-libgcj --with-gmp=/build/ndbadm/gnu
> --with-mpfr=/build/ndbadm/gnu LDFLAGS="-L/build/ndbadm/gnu/lib -Xlinker
> -R/build/ndbadm/gnu/lib -L/usr/gnu/lib"
> 
> I am using an old verson of gcc and gnu make (I believe 2.8.1) to do the
> compiling.  I am always getting errors when building in the libcc directory.

Probably in 'libgcc'...

 > It is running some test builds (I presume) on a conftest.c file.
 > Here is the error:
> 
> -------
> /build/ndbadm/gnu/obj/gcc-4.3.2/./gcc/xgcc
> -B/build/ndbadm/gnu/obj/gcc-4.3.2/./gcc/
 > -B/build/ndbadm/gnu/sparc-sun-solaris2.9/bin/
> -B/build/ndbadm/gnu/sparc-sun-solaris2.9/lib/
 > -isystem /build/ndbadm/gnu/sparc-sun-solaris2.9/include
 > -isystem /build/ndbadm/gnu/sparc-sun-solaris2.9/sys-include
 > -m64 -o conftest -g -L/build/ndbadm/gnu/lib conftest.c >&5
> 
> Assembler messages:
> Error: invalid architecture -xarch=v9
> -------

Your GNU 'as' seems also being "old".  Your GCC then is "very old", over
10 years old! The gcc-2.95 was from 1999 so I would guess gcc-2.8.1
being from 1996...

An old "for 32-bit" 'as' maybe doesn't grok 64-bit ('sparcv9') at all :(

> I also try to compile the conftest.c manually without the "-m64" option
> and I get:
> 
> -------
>  /build/ndbadm/gnu/obj/gcc-4.3.2/./gcc/collect2 -V -Y
> P,/usr/ccs/lib:/usr/lib -Qy -o conftest crt1.o crti.o
> /usr/ccs/lib/values-Xa.o crtbegin.o -L/build/ndbadm/gnu/lib
> -L/usr/gnu/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1/
> -L/usr/gnu/lib/gcc-lib -L/usr/gnu/lib/gcc-lib/sparc-sun-solaris2.6/
> -L/build/ndbadm/gnu/obj/gcc-4.3.2/./gcc -L/usr/ccs/lib
> /var/tmp//ccrPxiwg.o -lgcc -lgcc_eh -lc -lgcc -lgcc_eh -lc crtend.o
> crtn.o
> ld: fatal: file crt1.o: open failed: No such file or directory
> collect2: ld returned 1 exit status
> -------

Furthermore your current GCC doesn't seem to be for Solaris2.9 but for
Solaris2.6 !

> I see that I have a "crt1.o" in a directory where my old gcc resides.
> But I have no clue how to point to it.

Your old GCC of course should find it automatically when compiling
"normally"... Here the just produced 'crt1.o' and 'crti.o', for
gcc-4.3.2, are tried to be used not the gcc-2.8.1 ones!

> I would GREATLY appreciate someone's time in helping me get gcc to
> compile.

In your case I would forget using the old gcc-2.8.1 for Solaris2.6
and behave as if there were no GCCs in the build system. When this
being the case, the normal steps then would be :

1. connect to the 'http://www.sunfreeware.com'

2. download the latest GNU binutils (2.17) and GCC (gcc-3.4.6) for
    Sparc/Solaris2.9

3. install them with the help of the provided instructions

4. test that the pre-made binutils/GCC toolchain works by compiling
    simple apps like "Hello World"

5. try the gcc-4.3.2 update again with the downloaded binutils/GCC

All this because it most probably being the most easy way and not
requiring much help from others... The alternative steps probably
being :

1. update the GNU binutils

2. update the gcc-2.8.1 to some gcc-3.x version

OR maybe the order should be vice versa, "too new" binutils maybe
not working any more with gcc-2.8.1 :(  One doesn't know before one
tries...

3. use the updated binutils/GCC to compile gcc-4.3.2

It is hard to say what could be the right steps for your "update once
in 13 years" idea. Usually tools will be updated more often...

In both cases you also should install the 64-bit 'sparcv9' libraries
from their SUNW-packages. OR decide to produce a 32-bit-only GCC via
using '--disable-multilib' in the GCC configure.



More information about the Gcc-help mailing list