Bug 41304 - Build error with gcc 4.3.2
Summary: Build error with gcc 4.3.2
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.3.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-08 07:18 UTC by Vijay Jain
Modified: 2009-09-11 05:42 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Solaris 8 config.log where gcc4.3.2 compiles sucessfully (3.78 KB, application/octet-stream)
2009-09-09 13:38 UTC, Vijay Jain
Details
where gcc4.3.2 gnu compile is failing (3.00 KB, application/octet-stream)
2009-09-09 13:39 UTC, Vijay Jain
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vijay Jain 2009-09-08 07:18:57 UTC
Hi All,

Please note that we are migrating from solaris 8 to solaris 10 box. We were using precompiled version of gcc 4.3.2. However our building was faling. The precompiled version was using system ld instead of gcc ld. Hence building gcc 4.3.2 with the precompiled version of gcc 4.3.2.

I am building gcc 4.3.2 on solaris 10 box. I am getting the following build error.
 checking for sparc-sun-solaris2.10-gcc... /home/odyssey/f065093/gcc/gcc-4.3.2/host-sparc-sun-solaris2.10/gcc/xgcc -B/home/odyssey/f065093/gcc/gcc-4.3.2/host-sparc-sun-solaris2.10/gcc/ -B/home/odyssey/f065093/gcc/gcc-4.3.2/install/sparc-sun-solaris2.10/bin/ -B/home/odyssey/f065093/gcc/gcc-4.3.2/install/sparc-sun-solaris2.10/lib/ -isystem /home/odyssey/f065093/gcc/gcc-4.3.2/install/sparc-sun-solaris2.10/include -isystem /home/odyssey/f065093/gcc/gcc-4.3.2/install/sparc-sun-solaris2.10/sys-include
checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory `/home/odyssey/f065093/gcc/gcc-4.3.2'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/odyssey/f065093/gcc/gcc-4.3.2'
make: *** [all] Error 2

When I look at the the following file 
"./sparc-sun-solaris2.10/libgcc/config.log" following is the error

configure:2376: /home/odyssey/f065093/gcc/gcc-4.3.2/host-sparc-sun-solaris2.10/gcc/xgcc -B/home/odyssey/f065093/gcc/gcc-4.3.2
/host-sparc-sun-solaris2.10/gcc/ -B/home/odyssey/f065093/gcc/gcc-4.3.2/install/sparc-sun-solaris2.10/bin/ -B/home/odyssey/f06
5093/gcc/gcc-4.3.2/install/sparc-sun-solaris2.10/lib/ -isystem /home/odyssey/f065093/gcc/gcc-4.3.2/install/sparc-sun-solaris2
.10/include -isystem /home/odyssey/f065093/gcc/gcc-4.3.2/install/sparc-sun-solaris2.10/sys-include -V </dev/null >&5
xgcc: '-V' must come at the start of the command line
configure:2379: $? = 1
configure:2398: /home/odyssey/f065093/gcc/gcc-4.3.2/host-sparc-sun-solaris2.10/gcc/xgcc -B/home/odyssey/f065093/gcc/gcc-4.3.2
/host-sparc-sun-solaris2.10/gcc/ -B/home/odyssey/f065093/gcc/gcc-4.3.2/install/sparc-sun-solaris2.10/bin/ -B/home/odyssey/f06
5093/gcc/gcc-4.3.2/install/sparc-sun-solaris2.10/lib/ -isystem /home/odyssey/f065093/gcc/gcc-4.3.2/install/sparc-sun-solaris2
.10/include -isystem /home/odyssey/f065093/gcc/gcc-4.3.2/install/sparc-sun-solaris2.10/sys-include -o conftest -g -fkeep-inli
ne-functions   conftest.c  >&5
conftest.c:1: internal compiler error: Segmentation Fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
configure:2401: $? = 1
configure:2567: checking for suffix of object files

Additional INFO

Configure options as follows

./configure srcdir=/home/odyssey/f065093/gcc/gcc-4.3.2/ --prefix=/home/odyssey/f065093/gcc/gcc-4.3.2/install --with-as=/3rdparty/fsf/binutils/2.18/bin/as  --with-ld=/3rdparty/fsf/binutils/2.18/bin/ld  --with-gnu-as --with-gnu-ld --disable-nls --enable-languages=c,c++ --with-gmp=/home/odyssey/f065093/gmp/gmp-4.3.1/install --with-mpfr=/home/odyssey/f065093/mpfr/mpfr-2.4.1/install  LD=/3rdparty/fsf/binutils/2.18/bin/ld  AR=/3rdparty/fsf/binutils/2.18/bin/ar NM=/3rdparty/fsf/binutils/2.18/bin/nm  RANLIB=/3rdparty/fsf/binutils/2.18/bin/ranlib STRIP=/3rdparty/fsf/binutils/2.18/bin/strip OBJCOPY=/3rdparty/fsf/binutils/2.18/bin/objcopy OBJDUMP=/3rdparty/fsf/binutils/2.18/bin/objdump CC=gcc cc=gcc

Please let me know if you want more information on this 

Thanks,
Vijay
Comment 1 Eric Botcazou 2009-09-08 07:27:39 UTC
> I am building gcc 4.3.2 on solaris 10 box. I am getting the following build
> error.
>  checking for sparc-sun-solaris2.10-gcc...
> /home/odyssey/f065093/gcc/gcc-4.3.2/host-sparc-sun-solaris2.10/gcc/xgcc
> -B/home/odyssey/f065093/gcc/gcc-4.3.2/host-sparc-sun-solaris2.10/gcc/
> -B/home/odyssey/f065093/gcc/gcc-4.3.2/install/sparc-sun-solaris2.10/bin/
> -B/home/odyssey/f065093/gcc/gcc-4.3.2/install/sparc-sun-solaris2.10/lib/
> -isystem
> /home/odyssey/f065093/gcc/gcc-4.3.2/install/sparc-sun-solaris2.10/include
> -isystem
> /home/odyssey/f065093/gcc/gcc-4.3.2/install/sparc-sun-solaris2.10/sys-include
> checking for suffix of object files... configure: error: cannot compute suffix
> of object files: cannot compile
> See `config.log' for more details.
> make[2]: *** [configure-stage1-target-libgcc] Error 1
> make[2]: Leaving directory `/home/odyssey/f065093/gcc/gcc-4.3.2'
> make[1]: *** [stage1-bubble] Error 2
> make[1]: Leaving directory `/home/odyssey/f065093/gcc/gcc-4.3.2'
> make: *** [all] Error 2

Unexpected, the compiler is known to build flawlessly on this platform.

> ./configure srcdir=/home/odyssey/f065093/gcc/gcc-4.3.2/
> --prefix=/home/odyssey/f065093/gcc/gcc-4.3.2/install
> --with-as=/3rdparty/fsf/binutils/2.18/bin/as 
> --with-ld=/3rdparty/fsf/binutils/2.18/bin/ld  --with-gnu-as --with-gnu-ld
> --disable-nls --enable-languages=c,c++
> --with-gmp=/home/odyssey/f065093/gmp/gmp-4.3.1/install
> --with-mpfr=/home/odyssey/f065093/mpfr/mpfr-2.4.1/install 
> LD=/3rdparty/fsf/binutils/2.18/bin/ld  AR=/3rdparty/fsf/binutils/2.18/bin/ar
> NM=/3rdparty/fsf/binutils/2.18/bin/nm 
> RANLIB=/3rdparty/fsf/binutils/2.18/bin/ranlib
> STRIP=/3rdparty/fsf/binutils/2.18/bin/strip
> OBJCOPY=/3rdparty/fsf/binutils/2.18/bin/objcopy
> OBJDUMP=/3rdparty/fsf/binutils/2.18/bin/objdump CC=gcc cc=gcc

As indicated in the docs, building in the source directory is not supported.
Also remove the srcdir setting.

What does the base compiler return for 'gcc -v'?
Comment 2 Vijay Jain 2009-09-08 07:55:01 UTC
Following is the output of gcc -v 

Using built-in specs.
Target: sparc-sun-solaris2.10
Configured with: /net/clpt-v490-1/export/data1/bldmstr/20090604_ceres_gcc432/src/configure --prefix= --enable-shared --disable-static --with-system-zlib --enable-checking=release --enable-languages=c,c++ --with-cpu=v9 --with-ld=/usr/ccs/bin/ld --without-gnu-ld --disable-gnattools --enable-tls --with-as=/usr/ccs/bin/as --without-gnu-as
Thread model: posix
gcc version 4.3.2 (20090604) (gccfss) (GCC)


Do you mean I have to remove  srcdir=/home/odyssey/f065093/gcc/gcc-4.3.2/
 from configure options?

Also your statement building src directory is not supported. Does this mean I have to run the configure script from /home/odyssey/f065093/gcc/gcc-4.3.2/install and run gmake from the same directory?
Comment 3 Eric Botcazou 2009-09-08 08:02:29 UTC
> Do you mean I have to remove  srcdir=/home/odyssey/f065093/gcc/gcc-4.3.2/
> from configure options?

Yes.

> Also your statement building src directory is not supported. Does this mean I
> have to run the configure script from
> /home/odyssey/f065093/gcc/gcc-4.3.2/install and run gmake from the same
> directory?

No, you need 3 different directories: source, object and install, and configure as indicated in http://gcc.gnu.org/install/configure.html
Comment 4 Vijay Jain 2009-09-08 12:54:12 UTC
I am still getting the same error

Following is configure option from file "/home/odyssey/f065093/gccobjdir/sparc-sun-solaris2.10/libgcc/config.log"

/home/odyssey/f065093/gcc/gcc-4.3.2/libgcc/configure --cache-file=./config.cache --enable-multilib --prefix=/home/odyssey
/f065093/gccinstall --with-as=/3rdparty/fsf/binutils/2.18/bin/as --with-ld=/3rdparty/fsf/binutils/2.18/bin/ld --with-gnu-as -
-with-gnu-ld --disable-nls --with-gmp=/home/odyssey/f065093/gmp/gmp-4.3.1/install --with-mpfr=/home/odyssey/f065093/mpfr/mpfr
-2.4.1/install --enable-languages=c,c++ --program-transform-name=s,y,y, --with-target-subdir=sparc-sun-solaris2.10 --build=sp
arc-sun-solaris2.10 --host=sparc-sun-solaris2.10 --target=sparc-sun-solaris2.10 --srcdir=/home/odyssey/f065093/gcc/gcc-4.3.2/
libgcc --disable-intermodule --enable-checking=yes,types --disable-coverage --enable-languages=c

xgcc: '-V' must come at the start of the command line
configure:2379: $? = 1
configure:2398: /home/odyssey/f065093/gccobjdir/./gcc/xgcc -B/home/odyssey/f065093/gccobjdir/./gcc/ -B/home/odyssey/f065093/g
ccinstall/sparc-sun-solaris2.10/bin/ -B/home/odyssey/f065093/gccinstall/sparc-sun-solaris2.10/lib/ -isystem /home/odyssey/f06
5093/gccinstall/sparc-sun-solaris2.10/include -isystem /home/odyssey/f065093/gccinstall/sparc-sun-solaris2.10/sys-include -o
conftest -g -fkeep-inline-functions   conftest.c  >&5
conftest.c:1: internal compiler error: Segmentation Fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


Could you please help me resolve this?
Comment 5 Eric Botcazou 2009-09-08 13:15:54 UTC
> /home/odyssey/f065093/gcc/gcc-4.3.2/libgcc/configure
> --cache-file=./config.cache --enable-multilib --prefix=/home/odyssey
> /f065093/gccinstall --with-as=/3rdparty/fsf/binutils/2.18/bin/as
> --with-ld=/3rdparty/fsf/binutils/2.18/bin/ld --with-gnu-as -
> -with-gnu-ld --disable-nls
> --with-gmp=/home/odyssey/f065093/gmp/gmp-4.3.1/install
> --with-mpfr=/home/odyssey/f065093/mpfr/mpfr
> -2.4.1/install --enable-languages=c,c++ --program-transform-name=s,y,y,
> --with-target-subdir=sparc-sun-solaris2.10 --build=sp
> arc-sun-solaris2.10 --host=sparc-sun-solaris2.10 --target=sparc-sun-solaris2.10
> --srcdir=/home/odyssey/f065093/gcc/gcc-4.3.2/
> libgcc --disable-intermodule --enable-checking=yes,types --disable-coverage

What are you trying to do with these random configure options?  Please only use the minimal set of options you need (--with-gnu-as --with-gnu-ld --disable-nls was perfect).

> Could you please help me resolve this?

You'll need to find out why the compiler crashes.  sparc-sun-solaris2.10/libgcc/config.log contains all what you need to reproduce: the contents of conftest.c and the command line.
Comment 6 Vijay Jain 2009-09-08 14:24:59 UTC
My configure options were simple as required.

/home/odyssey/f065093/gcc/gcc-4.3.2/configure  --prefix=/home/odyssey/f065093/gccinstall --with-as=/3rdparty/fsf/binutils/2.18/bin/as  --with-ld=/3rdparty/fsf/binutils/2.18/bin/ld  --with-gnu-as --with-gnu-ld --disable-nls --enable-languages=c,c++ --with-gmp=/home/odyssey/f065093/gmp/gmp-4.3.1/install --with-mpfr=/home/odyssey/f065093/mpfr/mpfr-2.4.1/install  LD=/3rdparty/fsf/binutils/2.18/bin/ld  AR=/3rdparty/fsf/binutils/2.18/bin/ar NM=/3rdparty/fsf/binutils/2.18/bin/nm  RANLIB=/3rdparty/fsf/binutils/2.18/bin/ranlib STRIP=/3rdparty/fsf/binutils/2.18/bin/strip OBJCOPY=/3rdparty/fsf/binutils/2.18/bin/objcopy OBJDUMP=/3rdparty/fsf/binutils/2.18/bin/objdump CC=gcc cc=gcc

I delibrately gave the mapping from config.log thinking that the actual configure would give some clues to the error.

When  I searched for file conftest.c, I could not locate the file in srcdir and well as objdir. So I touched the file conftest.c and ran the command the which was giving the error
/home/odyssey/f065093/gccobjdir/./gcc/xgcc -B/home/odyssey/f065093/gccobjdir/./gcc/ -B/home/odyssey/f065093/gccinstall/sparc-sun-solaris2.10/bin/ -B/home/odyssey/f065093/gccinstall/sparc-sun-solaris2.10/lib/ -isystem /home/odyssey/f065093/gccinstall/sparc-sun-solaris2.10/include -isystem /home/odyssey/f065093/gccinstall/sparc-sun-solaris2.10/sys-include -o conftest -g -fkeep-inline-functions   conftest.c  >&5

I could reproduce the problem
conftest.c:1: internal compiler error: Segmentation Fault
Please submit a full bug report,
with preprocessed source if appropriate.


Could you please find from you env where is the file conftest.c and how is that generated?

Comment 7 Jonathan Wakely 2009-09-08 16:00:14 UTC
(In reply to comment #6)
> Could you please find from you env where is the file conftest.c and how is that
> generated?

It's created by the configure script, config.log shows the content of the file, following text like "the program that failed was:" 

Look in config.log and copy the content of conftest.c as shown.
But it looks like the compiler you're using it totally broken if it segfaults when you try to compile an empty file.

Comment 8 Vijay Jain 2009-09-09 09:31:09 UTC
I see no code for conftest.c in the config.log.
Is there a way where I can check the prerequites for gcc compilation on my solaris 10 box?

Also I can see gcc 4.3.2 compiling sucessfully on soalris 8. Will this gcc 4.3.2 work on solaris 10?

Comment 9 Eric Botcazou 2009-09-09 09:49:23 UTC
> I see no code for conftest.c in the config.log.

Yet it is there.  You can attach the file if you want and I'll take a look.

> Is there a way where I can check the prerequites for gcc compilation on my
> solaris 10 box?

doc/gccinstall.info in the build dir has them.

> Also I can see gcc 4.3.2 compiling sucessfully on soalris 8. Will this gcc
> 4.3.2 work on solaris 10?

No, the binaries it generates can be run on Solaris 10, but the compiler itself cannot.
Comment 10 Vijay Jain 2009-09-09 11:35:00 UTC
I have got the file 
| /* confdefs.h.  */
|
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }


BUt still not able to resolve the problem

configure:2398: /home/odyssey/f065093/gccobjdir/./gcc/xgcc -B/home/odyssey/f065093/gccobjdir/./gcc/ -B/home/odyssey/f065093/g
ccinstall/sparc-sun-solaris2.10/bin/ -B/home/odyssey/f065093/gccinstall/sparc-sun-solaris2.10/lib/ -isystem /home/odyssey/f06
5093/gccinstall/sparc-sun-solaris2.10/include -isystem /home/odyssey/f065093/gccinstall/sparc-sun-solaris2.10/sys-include -o
conftest -g -fkeep-inline-functions   conftest.c  >&5


I ran the same command on command line and got the same error
conftest.c:1: internal compiler error: Segmentation Fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


Will it be possible for you to come on chat for a while. 
Please let me know your AIM id, if possible. I think we would be done in few minutes if we take this on chat!
Comment 11 Vijay Jain 2009-09-09 13:11:51 UTC
Following is the command on solaris 8 which compiles sucessfully

/home/odyssey/f065093/gcc8/gcc8objdir/./gcc/xgcc -v -B/home/odyssey/f065093/gcc8/gcc8objdir/./gcc/ -B/home/odyssey/f065093/gcc8/gccinstall/sparc-sun-solaris2.8/bin/ -B/home/odyssey/f065093/gcc8/gccinstall/sparc-sun-solaris2.8/lib/ -isystem /home/odyssey/f065093/gcc8/gccinstall/sparc-sun-solaris2.8/include -isystem /home/odyssey/f065093/gcc8/gccinstall/sparc-sun-solaris2.8/sys-include -o conftest -g -O2   conftest.c


Reading specs from /home/odyssey/f065093/gcc8/gcc8objdir/./gcc/specs
Target: sparc-sun-solaris2.8
Configured with: /home/odyssey/f065093/gcc8/gcc-4.3.2/configure --prefix=/home/odyssey/f065093/gcc8/gccinstall --with-as=/3rdparty/fsf/binutils/2.16/bin/as --with-ld=/3rdparty/fsf/binutils/2.16/bin/ld --with-gnu-as --with-gnu-ld --disable-nls --enable-languages=c,c++ --with-gmp=/home/odyssey/f065093/gmp/gmp-4.3.1/install --with-mpfr=/home/odyssey/f065093/mpfr/mpfr-2.4.1/install LD=/3rdparty/fsf/binutils/2.16/bin/ld AR=/3rdparty/fsf/binutils/2.16/bin/ar NM=/3rdparty/fsf/binutils/2.16/bin/nm RANLIB=/3rdparty/fsf/binutils/2.16/bin/ranlib STRIP=/3rdparty/fsf/binutils/2.16/bin/strip OBJCOPY=/3rdparty/fsf/binutils/2.16/bin/objcopy OBJDUMP=/3rdparty/fsf/binutils/2.16/bin/objdump CC=gcc cc=gcc
Thread model: posix
gcc version 4.3.2 (GCC)
COLLECT_GCC_OPTIONS='-v' '-B/home/odyssey/f065093/gcc8/gcc8objdir/./gcc/' '-B/home/odyssey/f065093/gcc8/gccinstall/sparc-sun-solaris2.8/bin/' '-B/home/odyssey/f065093/gcc8/gccinstall/sparc-sun-solaris2.8/lib/' '-isystem' '/home/odyssey/f065093/gcc8/gccinstall/sparc-sun-solaris2.8/include' '-isystem' '/home/odyssey/f065093/gcc8/gccinstall/sparc-sun-solaris2.8/sys-include' '-o' 'conftest' '-g' '-O2' '-mcpu=v9'
 /home/odyssey/f065093/gcc8/gcc8objdir/./gcc/cc1 -quiet -v -iprefix /home/odyssey/f065093/gcc8/gcc8objdir/gcc/../lib/gcc/sparc-sun-solaris2.8/4.3.2/ -isystem /home/odyssey/f065093/gcc8/gcc8objdir/./gcc/include -isystem /home/odyssey/f065093/gcc8/gcc8objdir/./gcc/include-fixed -D__sparcv8 -isystem /home/odyssey/f065093/gcc8/gccinstall/sparc-sun-solaris2.8/include -isystem /home/odyssey/f065093/gcc8/gccinstall/sparc-sun-solaris2.8/sys-include conftest.c -quiet -dumpbase conftest.c -mcpu=v9 -auxbase conftest -g -O2 -version -o /var/tmp//ccwUIjko.s
ignoring nonexistent directory "/home/odyssey/f065093/gcc8/gccinstall/sparc-sun-solaris2.8/include"
ignoring nonexistent directory "/home/odyssey/f065093/gcc8/gccinstall/sparc-sun-solaris2.8/sys-include"
ignoring nonexistent directory "/home/odyssey/f065093/gcc8/gcc8objdir/gcc/../lib/gcc/sparc-sun-solaris2.8/4.3.2/include"
ignoring nonexistent directory "/home/odyssey/f065093/gcc8/gcc8objdir/gcc/../lib/gcc/sparc-sun-solaris2.8/4.3.2/include-fixed"
ignoring nonexistent directory "/home/odyssey/f065093/gcc8/gcc8objdir/gcc/../lib/gcc/sparc-sun-solaris2.8/4.3.2/../../../../sparc-sun-solaris2.8/include"
ignoring nonexistent directory "/home/odyssey/f065093/gcc8/gcc8objdir/gcc/../lib/gcc/../../include"
ignoring nonexistent directory "/home/odyssey/f065093/gcc8/gcc8objdir/gcc/../lib/gcc/../../lib/gcc/sparc-sun-solaris2.8/4.3.2/include"
ignoring nonexistent directory "/home/odyssey/f065093/gcc8/gcc8objdir/gcc/../lib/gcc/../../lib/gcc/sparc-sun-solaris2.8/4.3.2/include-fixed"
ignoring nonexistent directory "/home/odyssey/f065093/gcc8/gcc8objdir/gcc/../lib/gcc/../../lib/gcc/sparc-sun-solaris2.8/4.3.2/../../../../sparc-sun-solaris2.8/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/odyssey/f065093/gcc8/gcc8objdir/./gcc/include
 /home/odyssey/f065093/gcc8/gcc8objdir/./gcc/include-fixed
 /usr/local/include
 /usr/include
End of search list.
GNU C (GCC) version 4.3.2 (sparc-sun-solaris2.8)
        compiled by GNU C version 4.3.2, GMP version 4.3.1, MPFR version 2.4.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 69d59eaebfb51cc98d206920f688f3d4
COLLECT_GCC_OPTIONS='-v' '-B/home/odyssey/f065093/gcc8/gcc8objdir/./gcc/' '-B/home/odyssey/f065093/gcc8/gccinstall/sparc-sun-solaris2.8/bin/' '-B/home/odyssey/f065093/gcc8/gccinstall/sparc-sun-solaris2.8/lib/' '-isystem' '/home/odyssey/f065093/gcc8/gccinstall/sparc-sun-solaris2.8/include' '-isystem' '/home/odyssey/f065093/gcc8/gccinstall/sparc-sun-solaris2.8/sys-include' '-o' 'conftest' '-g' '-O2' '-mcpu=v9'
 /3rdparty/fsf/binutils/2.16/bin/as -v -V -Qy -s -xarch=v8plus -o /var/tmp//cceu6MOJ.o /var/tmp//ccwUIjko.s
GNU assembler version 2.16 (sparc-sun-solaris2.8) using BFD version 2.16
COMPILER_PATH=/home/odyssey/f065093/gcc8/gcc8objdir/./gcc/:/usr/ccs/bin/
LIBRARY_PATH=/home/odyssey/f065093/gcc8/gcc8objdir/./gcc/:/usr/ccs/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-B/home/odyssey/f065093/gcc8/gcc8objdir/./gcc/' '-B/home/odyssey/f065093/gcc8/gccinstall/sparc-sun-solaris2.8/bin/' '-B/home/odyssey/f065093/gcc8/gccinstall/sparc-sun-solaris2.8/lib/' '-isystem' '/home/odyssey/f065093/gcc8/gccinstall/sparc-sun-solaris2.8/include' '-isystem' '/home/odyssey/f065093/gcc8/gccinstall/sparc-sun-solaris2.8/sys-include' '-o' 'conftest' '-g' '-O2' '-mcpu=v9'
 /home/odyssey/f065093/gcc8/gcc8objdir/./gcc/collect2 -V -Y P,/usr/ccs/lib:/usr/lib -rpath-link /usr/lib -Qy -o conftest /home/odyssey/f065093/gcc8/gcc8objdir/./gcc/crt1.o /home/odyssey/f065093/gcc8/gcc8objdir/./gcc/crti.o /usr/ccs/lib/values-Xa.o /home/odyssey/f065093/gcc8/gcc8objdir/./gcc/crtbegin.o -L/home/odyssey/f065093/gcc8/gcc8objdir/./gcc -L/usr/ccs/lib /var/tmp//cceu6MOJ.o -lgcc -lgcc_eh -lc -lgcc -lgcc_eh -lc /home/odyssey/f065093/gcc8/gcc8objdir/./gcc/crtend.o /home/odyssey/f065093/gcc8/gcc8objdir/./gcc/crtn.o
GNU ld version 2.16
  Supported emulations:
   elf32_sparc
   elf64_sparc


While on solaris 10 the command is as follows
Reading specs from /home/odyssey/f065093/gccobjdir/./gcc/specs
Target: sparc-sun-solaris2.10
Configured with: /home/odyssey/f065093/gcc/gcc-4.3.2/configure --prefix=/home/odyssey/f065093/gccinstall --with-as=/3rdparty/fsf/binutils/2.18/bin/as --with-ld=/3rdparty/fsf/binutils/2.18/bin/ld --with-gnu-as --with-gnu-ld --disable-nls --enable-languages=c,c++ --with-gmp=/home/odyssey/f065093/gmp/gmp-4.3.1/install --with-mpfr=/home/odyssey/f065093/mpfr/mpfr-2.4.1/install LD=/3rdparty/fsf/binutils/2.18/bin/ld AR=/3rdparty/fsf/binutils/2.18/bin/ar NM=/3rdparty/fsf/binutils/2.18/bin/nm RANLIB=/3rdparty/fsf/binutils/2.18/bin/ranlib STRIP=/3rdparty/fsf/binutils/2.18/bin/strip OBJCOPY=/3rdparty/fsf/binutils/2.18/bin/objcopy OBJDUMP=/3rdparty/fsf/binutils/2.18/bin/objdump CC=gcc cc=gcc
Thread model: posix
gcc version 4.3.2 (GCC)
COLLECT_GCC_OPTIONS='-v' '-B/home/odyssey/f065093/gccobjdir/./gcc/' '-B/home/odyssey/f065093/gccinstall/sparc-sun-solaris2.10/bin/' '-B/home/odyssey/f065093/gccinstall/sparc-sun-solaris2.10/lib/' '-isystem' '/home/odyssey/f065093/gccinstall/sparc-sun-solaris2.10/include' '-isystem' '/home/odyssey/f065093/gccinstall/sparc-sun-solaris2.10/sys-include' '-c' '-g' '-fkeep-inline-functions' '-o' 'conftest' '-g' '-O2' '-mcpu=v9'
 /home/odyssey/f065093/gccobjdir/./gcc/cc1 -quiet -v -iprefix /home/odyssey/f065093/gccobjdir/gcc/../lib/gcc/sparc-sun-solaris2.10/4.3.2/ -isystem /home/odyssey/f065093/gccobjdir/./gcc/include -isystem /home/odyssey/f065093/gccobjdir/./gcc/include-fixed -D__sparcv8 -isystem /home/odyssey/f065093/gccinstall/sparc-sun-solaris2.10/include -isystem /home/odyssey/f065093/gccinstall/sparc-sun-solaris2.10/sys-include conftest.c -quiet -dumpbase conftest.c -mcpu=v9 -auxbase-strip conftest -g -g -O2 -version -fkeep-inline-functions -o /var/tmp//cctwC3TW.s
ignoring nonexistent directory "/home/odyssey/f065093/gccinstall/sparc-sun-solaris2.10/include"
ignoring nonexistent directory "/home/odyssey/f065093/gccinstall/sparc-sun-solaris2.10/sys-include"
ignoring nonexistent directory "/home/odyssey/f065093/gccobjdir/gcc/../lib/gcc/sparc-sun-solaris2.10/4.3.2/include"
ignoring nonexistent directory "/home/odyssey/f065093/gccobjdir/gcc/../lib/gcc/sparc-sun-solaris2.10/4.3.2/include-fixed"
ignoring nonexistent directory "/home/odyssey/f065093/gccobjdir/gcc/../lib/gcc/sparc-sun-solaris2.10/4.3.2/../../../../sparc-sun-solaris2.10/include"
ignoring nonexistent directory "/home/odyssey/f065093/gccobjdir/gcc/../lib/gcc/../../include"
ignoring nonexistent directory "/home/odyssey/f065093/gccobjdir/gcc/../lib/gcc/../../lib/gcc/sparc-sun-solaris2.10/4.3.2/include"
ignoring nonexistent directory "/home/odyssey/f065093/gccobjdir/gcc/../lib/gcc/../../lib/gcc/sparc-sun-solaris2.10/4.3.2/include-fixed"
ignoring nonexistent directory "/home/odyssey/f065093/gccobjdir/gcc/../lib/gcc/../../lib/gcc/sparc-sun-solaris2.10/4.3.2/../../../../sparc-sun-solaris2.10/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/odyssey/f065093/gccobjdir/./gcc/include
 /home/odyssey/f065093/gccobjdir/./gcc/include-fixed
 /usr/local/include
 /usr/include
End of search list.
GNU C (GCC) version 4.3.2 (sparc-sun-solaris2.10)
        compiled by GNU C version 4.3.2 (20090604) (gccfss), GMP version 4.3.1, MPFR version 2.4.1.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
conftest.c:1: internal compiler error: Segmentation Fault
Please submit a full bug report,
with preprocessed source if appropriate.


Please note I have put -v option which is detailing out the process.

THe difference I see is as follows
 --param ggc-min-expand=30 --param ggc-min-heapsize=4096 **this is on solaris 10 ********


While on Solaris 8 is aas follows

 --param ggc-min-expand=100 --param ggc-min-heapsize=131072


Is the the cause?
HOw can these be changed?
Does this verbose compilation provide any clues?


Comment 12 Vijay Jain 2009-09-09 13:38:38 UTC
Created attachment 18552 [details]
Solaris 8 config.log where gcc4.3.2 compiles sucessfully
Comment 13 Vijay Jain 2009-09-09 13:39:22 UTC
Created attachment 18553 [details]
where gcc4.3.2 gnu compile is failing
Comment 14 Eric Botcazou 2009-09-09 14:08:41 UTC
> I ran the same command on command line and got the same error
> conftest.c:1: internal compiler error: Segmentation Fault
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html> for instructions.

OK, then you need to run the command from within the debugger, i.e. run the debugger on the gcc/cc1 executable present in the object dir and launch the compilation of conftest.c from there.

I'm more and more suspecting that your base compiler miscompiles GCC.  Note that it's not an official version of GCC, gccfss is a chimera released by Sun, a combination of GCC with the Sun Studio compiler that they shamelessly still call GCC.
Comment 15 Vijay Jain 2009-09-10 06:02:05 UTC
Please find attached stack trace of the segmentation fault 

GNU C (GCC) version 4.3.2 (sparc-sun-solaris2.10)
        compiled by GNU C version 4.3.2 (20090604) (gccfss), GMP version 4.3.1, MPFR version 2.4.1.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096

Program received signal SIGSEGV, Segmentation fault.
0x016d355c in chainon (op1=0xfef1cf40, op2=0xfef1c6e0) at /home/odyssey/f065093/gcc/gcc-4.3.2/gcc/tree.c:1716
1716      for (t1 = op1; TREE_CHAIN (t1); t1 = TREE_CHAIN (t1))
(gdb) bt
#0  0x016d355c in chainon (op1=0xfef1cf40, op2=0xfef1c6e0) at /home/odyssey/f065093/gcc/gcc-4.3.2/gcc/tree.c:1716
#1  0x0016ac38 in def_fn_type (def=BT_FN_VOID_PTR_INT, ret=BT_VOID, var=0 '\0', n=2)
    at /home/odyssey/f065093/gcc/gcc-4.3.2/gcc/c-common.c:3529
#2  0x0016ba6c in c_define_builtins (va_list_ref_type_node=0x1f6e800, va_list_arg_type_node=0x1f6e800)
    at builtin-types.def:223
#3  0x00185ab8 in c_common_nodes_and_builtins () at /home/odyssey/f065093/gcc/gcc-4.3.2/gcc/c-common.c:3904
#4  0x0009c594 in c_init_decl_processing () at /home/odyssey/f065093/gcc/gcc-4.3.2/gcc/c-decl.c:2773
#5  0x001d3e58 in c_objc_common_init () at /home/odyssey/f065093/gcc/gcc-4.3.2/gcc/c-objc-common.c:70
#6  0x00c80250 in lang_dependent_init (name=0xffbff00f "conftest.c")
    at /home/odyssey/f065093/gcc/gcc-4.3.2/gcc/toplev.c:2123
#7  0x00c80714 in do_compile () at /home/odyssey/f065093/gcc/gcc-4.3.2/gcc/toplev.c:2239
#8  0x00c807ec in toplev_main (argc=0, argv=0xffbfecb4) at /home/odyssey/f065093/gcc/gcc-4.3.2/gcc/toplev.c:2272
#9  0x0025f8f4 in main (argc=26, argv=0xffbfecb4) at /home/odyssey/f065093/gcc/gcc-4.3.2/gcc/main.c:35

As mentioned by you the precompiled version of GCC on solaris 10 that we are using is not the official compiler. So how do i fullfill this prerequisite 

ISO C90 compiler
     Necessary to bootstrap GCC, although versions of GCC prior to 3.4
     also allow bootstrapping with a traditional (K&R) C compiler.

     To build all languages in a cross-compiler or other configuration
     where 3-stage bootstrap is not performed, you need to start with
     an existing GCC binary (version 2.95 or later) because source code
     for language frontends other than C might use GCC extensions.

Kindly suggest. We hope your kind co-operation on this to take this to resolution. 

Comment 16 Eric Botcazou 2009-09-10 06:52:30 UTC
> As mentioned by you the precompiled version of GCC on solaris 10 that we are
> using is not the official compiler. So how do i fullfill this prerequisite 

Try with Sun Studio or with the genuine GCC: http://www.sunfreeware.com
Comment 17 Vijay Jain 2009-09-10 07:16:05 UTC
When you say GCC from http://www.sunfreeware.com
do you mean by install  gcc-3.4.6-sol10-sparc-local.gz on solaris 10 box with necessary dependencies?
Comment 18 Eric Botcazou 2009-09-10 07:19:30 UTC
> When you say GCC from http://www.sunfreeware.com
> do you mean by install  gcc-3.4.6-sol10-sparc-local.gz on solaris 10 box with
> necessary dependencies?

Yes, try with this one for example.  What are the dependencies exactly?
Comment 19 Vijay Jain 2009-09-10 07:25:33 UTC
gcc-3.4.6-sol10-sparc-local.gz These gcc packages require the installation of libiconv
libiconv-1.11-sol10-sparc-local.gz Dependencies: libgcc_s.so.1 from libgcc-3.4.6 or gcc-3.4.6 or higher. 


libgcc-3.4.6-sol10-sparc-local.gz This package includes the files and links


libgcc_s.so
libgcc_s.so.1
libstdc++.so
libstdc++.so.6
libstdc++.so.6.0.3

Comment 20 Vijay Jain 2009-09-10 07:33:37 UTC
Do we have precompiled GCC for solaris 10 which uses GNU ld, as etc. We are looking for ld (binutils ) version 2.18. This is because the link error that we are gettting on solaris 10 has relevance to ld version.
We are looking for GCC version 4.3.2
Comment 21 Eric Botcazou 2009-09-10 07:40:52 UTC
> Do we have precompiled GCC for solaris 10 which uses GNU ld, as etc. We are
> looking for ld (binutils ) version 2.18. This is because the link error that we
> are gettting on solaris 10 has relevance to ld version.

The GCC project doesn't provide precompiled binaries.  Maybe you can ask on gcc-help@gcc.gnu.org but I'd still suggest building it yourself once you've found a working compiler to start with.
Comment 22 Vijay Jain 2009-09-10 14:03:03 UTC
GCC 4.3.2 has built sucessfully on my solaris 10 box. Thank You very much for all your help!