Subject: bug#15258: Fortran tests in configure script seem questionable

From: Stefano Lattarini <[email-masked]>
Date: Thu, 26 Dec 2013 21:14:46 +0100

tags 15258 + moreinfo
severity 15258 minro
thanks

Hi Dennis, sorry for the delay.

On 09/03/2013 04:36 PM, Dennis Clarke wrote:
>  
> I am going to try to build automake-13.4 on Solaris with the Oracle Solaris 12.3
> dev tools and within configure I see that Fortran tests fail : 
> 
> 
> node002$ ./configure 
> checking whether /usr/local/bin/gmake supports nested variables... yes
> checking build system type... sparc-sun-solaris2.10
> checking host system type... sparc-sun-solaris2.10
> checking for a BSD-compatible install... lib/install-sh -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p... lib/install-sh -c -d
> checking for gawk... gawk
> checking whether /usr/local/bin/gmake sets $(MAKE)... yes
> checking whether ln -s works... yes
> checking for perl... /usr/local/bin/perl
> checking whether /usr/local/bin/perl supports ithreads... no
> checking for tex... tex
> checking for yacc... yacc
> checking for lex... lex
> checking whether autoconf is installed... yes
> checking whether autoconf works... yes
> checking whether autoconf is recent enough... yes
> checking whether ln works... yes
> checking for grep that handles long lines and -e... /usr/xpg4/bin/grep
> checking for egrep... /usr/xpg4/bin/grep -E
> checking for fgrep... /usr/xpg4/bin/grep -F
> configure: will now look for a sturdy POSIX shell, for our testsuite
> checking for sh... /usr/xpg4/bin/sh
> checking for sh5... no
> checking for dash... no
> checking for ash... no
> checking for bash... /usr/local/bin/bash
> checking for zsh... /usr/bin/zsh
> checking for ksh... /usr/bin/ksh
> checking for pdksh... no
> checking whether /usr/local/bin/bash supports $(cmd)... yes
> checking whether /usr/local/bin/bash supports $((expr))... yes
> checking whether /usr/local/bin/bash supports ${#var}... yes
> checking whether /usr/local/bin/bash supports ${var#glob} and ${var%glob}... yes
> checking whether /usr/local/bin/bash preserves exit traps with "set -e"... yes
> checking whether /usr/local/bin/bash can define exit traps in a shell function... yes
> checking whether /usr/local/bin/bash corrupts stderr with "set -x"... no
> checking whether /usr/local/bin/bash can return early from "dot-sourced" files... yes
> checking whether /usr/local/bin/bash supports alias named like shell builtins... yes
> checking whether /usr/local/bin/bash supports "test -e"... yes
> configure: shell /usr/local/bin/bash is good enough, stop looking
> configure: will use /usr/local/bin/bash as the testsuite shell
> configure: will now look for generic compilers
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables... 
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... no
> checking whether /opt/solarisstudio12.3/bin/cc accepts -g... yes
> checking for /opt/solarisstudio12.3/bin/cc option to accept ISO C89... none needed
> checking whether the C++ compiler works... yes
> checking for C++ compiler default output file name... a.out
> checking for suffix of executables... 
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C++ compiler... no
> checking whether /opt/solarisstudio12.3/bin/CC accepts -g... yes
> checking for xlf95... no
> checking for f95... f95
> checking whether the Fortran compiler works... no
> configure: WARNING: Fortran compiler cannot create executables
> configure: tests requiring the Fortran compiler will be skipped
> checking for xlf... no
> checking for f77... f77
> checking whether the Fortran 77 compiler works... no
> configure: WARNING: Fortran 77 compiler cannot create executables
> configure: tests requiring the Fortran 77 compiler will be skipped
> configure: will now look for GNU compilers
> checking for gcc... no
> checking for g++... no
> checking for gpp... no
> checking for gfortran... no
> checking for g77... no
> checking for gfortran... no
> checking for gcj... no
> checking that generated files are newer than configure... done
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating t/wrap/aclocal-1.13
> config.status: creating t/wrap/automake-1.13
> node002$ 
> 
> This is highly suspect given that I have a full Fortran 77, 90 and 95
> compiler in the Oracle software : 
>
> [SNIP]
>
To actually try to understand where the problem might be, I'd need the
content of the generated config.log file.  Could you please send it over?

> So perhaps the configure script is looking for GNU Fortran only? 
>
No, on the contrary, the script is tweaked to prefer non-GNU compilers
where available, to enhance testsuite coverage.

> The Fortran compilers provided, as well as everything else, are installed 
> in the bizarre location /opt/solarisstudio12.3/bin. For many many years
> the "defacto" standard location for the vendor compilers in Solaris was
> at /opt/SUNWspro and then someone at Sun or Oracle made the brilliant
> move to change the path and thus break twenty years of scripts. Perhaps
> that is the issue here.
>

Thanks,
  Stefano