Bug 45277 - make bootstrap fails at:checking whether the GNU Fortran compiler is working... no
Summary: make bootstrap fails at:checking whether the GNU Fortran compiler is working....
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.5.1
: P3 normal
Target Milestone: ---
Assignee: Eric Botcazou
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-13 11:56 UTC by Philippe Scelers
Modified: 2010-09-14 10:30 UTC (History)
3 users (show)

See Also:
Host: sparc-sun-solaris2.10
Target: sparc-sun-solaris2.10
Build: sparc-sun-solaris2.10
Known to work:
Known to fail:
Last reconfirmed: 2010-09-14 08:04:53


Attachments
requeste by error message output (8.33 KB, text/plain)
2010-08-13 12:03 UTC, Philippe Scelers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Scelers 2010-08-13 11:56:01 UTC
Error message said to attach a log file, but don't find anything to attach a file on this form. Let me know how to attach if needed

uname -a: SunOS frg-sol10-05 5.10 Generic_120011-14 sun4v sparc SUNW,Sun-Fire-T200

using binutils-2.20 (build on the same host)

separate srcdir and objdir (build dir)

Source directory:
$HOME/tmp/GNU/src/sun4v/gcc-4.5.1

gmp, mpfr and mpc are linked into gcc-4.5.1 source tree:
ls -l gcc-4.5.1/gmp gcc-4.5.1/mpfr gcc-4.5.1/mpc
lrwxrwxrwx  1 philips frgit 13 Aug 12 14:44 gcc-4.5.1/gmp -> ../gmp-5.0.1//
lrwxrwxrwx  1 philips frgit 13 Aug 12 14:44 gcc-4.5.1/mpc -> ../mpc-0.8.2//
lrwxrwxrwx  1 philips frgit 14 Aug 12 14:44 gcc-4.5.1/mpfr -> ../mpfr-2.4.2//

Build directory:
$HOME/tmp/GNU/build/sun4v/gcc-4.5.1

configure command:
$HOME/tmp/GNU/src/sun4v/gcc-4.5.1/configure --prefix=$HOME/tmp/GNU/install/`uname -m`/gcc-4.5.1 --enable-languages=c,c++,fortran --with-gnu-as --with-as=$HOME/tmp/GNU/install/sun4v/binutils-2.20/bin/as --with-gnu-ld --with-ld=$HOME/tmp/GNU/install/sun4v/binutils-2.20/bin/ld

make command:
make bootstrap

Below the last lines of 'make bootstrap' output:
checking whether the GNU Fortran compiler is working... no
configure: error: GNU Fortran is not working; please report a bug in http://gcc.gnu.org/bugzilla, attaching /home/philips/tmp/GNU/build/sun4v/gcc-4.5.1/sparc-sun-solaris2.10/libgfortran/config.log
make[1]: *** [configure-target-libgfortran] Error 1
make[1]: Leaving directory `/nobackup/philips/tmp/GNU/build/sun4v/gcc-4.5.1'
make: *** [bootstrap] Error 2
Comment 1 Eric Botcazou 2010-08-13 12:01:46 UTC
Please run 'make check' for GMP and MPFR.  Recent versions are miscompiled by older versions of GCC on this platform.  I'd suggest sticking to the versions listed in http://gcc.gnu.org/install/prerequisites.html.
Comment 2 Philippe Scelers 2010-08-13 12:03:40 UTC
Created attachment 21474 [details]
requeste by error message output

This file is requested for debugging:

checking whether the GNU Fortran compiler is working... no
configure: error: GNU Fortran is not working; please report a bug in http://gcc.gnu.org/bugzilla, attaching /home/philips/tmp/GNU/build/sun4v/gcc-4.5.1/sparc-sun-solaris2.10/libgfortran/config.log
Comment 3 Philippe Scelers 2010-08-13 12:12:29 UTC
Subject: Re:  make bootstrap fails at:checking whether
 the GNU Fortran compiler is working... no

But I link GMP and MPFR into GCC source tree, how to make check on 
these? perhaps:
   cd objdir/gcc-4.5.1/gmp ; make check
   cd objdir/gcc-4.5.1/mpfr ; make check
Please advise


Comment 4 Eric Botcazou 2010-08-13 17:16:53 UTC
> But I link GMP and MPFR into GCC source tree, how to make check on 
> these? perhaps:
>    cd objdir/gcc-4.5.1/gmp ; make check
>    cd objdir/gcc-4.5.1/mpfr ; make check

Yes, run "make check" in the build dir of GMP and MPFR.
Comment 5 Philippe Scelers 2010-08-27 08:29:00 UTC
make check: OK for GMP but fails for MPFR

Solution: build GMP, MPFR and MPC separately and add --with-... to configure gcc.
Note: GMP must be build for 32 bits, i.e. set env var ABI=32
Comment 6 Eric Botcazou 2010-08-27 14:02:22 UTC
> make check: OK for GMP but fails for MPFR
> 
> Solution: build GMP, MPFR and MPC separately and add --with-... to configure
> gcc.
> Note: GMP must be build for 32 bits, i.e. set env var ABI=32

Yes, or else configure with --build=... as documented in
  http://gcc.gnu.org/install/specific.html#sparc-sun-solaris2

Could you quickly sum up what you've found, i.e. which versions of GMP/MPFR are miscompiled by which versions of GCC and which versions are correctly compiled by which versions of the compiler?  Thanks in advance.
Comment 7 Philippe Scelers 2010-09-09 14:10:08 UTC
Previous comments describe encountered issue, including gmp/mpfr/mpc version.

Below a summary of successfull build on Solaris 10
     standalone build/install for gmp/mpfr/mpc, ABI=32 is mandatory

gcc --version
gcc (GCC) 4.5.1
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/free/NEW_GNU_BUILD/devenv_g3_package/bundle_v1.0/sun4u/5.10/bin/../libexec/gcc/sparc-sun-solaris2.10/4.5.1/lto-wrapper
Target: sparc-sun-solaris2.10
Configured with: /free/NEW_GNU_BUILD/devenv_g3_package/src/gcc-4.5.1/configure --prefix=/free/NEW_GNU_BUILD/devenv_g3_package/install/sun4u/5.10/gcc-4.5.1 --disable-nls --with-local-prefix=/u/gnu --enable-languages=c,c++,fortran --with-gnu-as --with-as=/free/NEW_GNU_BUILD/devenv_g3_package/install/sun4u/5.10/binutils-2.20.1/bin/as --with-gnu-ld --with-ld=/free/NEW_GNU_BUILD/devenv_g3_package/install/sun4u/5.10/binutils-2.20.1/bin/ld --with-gmp=/free/NEW_GNU_BUILD/devenv_g3_package/install/sun4u/5.10/gmp-4.3.2 --with-mpfr=/free/NEW_GNU_BUILD/devenv_g3_package/install/sun4u/5.10/mpfr-2.4.2 --with-mpc=/free/NEW_GNU_BUILD/devenv_g3_package/install/sun4u/5.10/mpc-0.8.1
Thread model: posix
gcc version 4.5.1 (GCC) 

Comment 8 Eric Botcazou 2010-09-14 10:26:57 UTC
Subject: Bug 45277

Author: ebotcazou
Date: Tue Sep 14 10:26:40 2010
New Revision: 164277

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164277
Log:
	PR target/45277
	PR target/45363
	PR target/45407
	* doc/install.texi (sparc*-*-*): New section.
	(sparc-sun-solaris2*): Mention MPC alongside GMP and MPFR.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/doc/install.texi

Comment 9 Eric Botcazou 2010-09-14 10:30:01 UTC
Reasonable workaround.