bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11387: automake 1.12 test failures


From: Bruno Haible
Subject: bug#11387: automake 1.12 test failures
Date: Tue, 01 May 2012 11:56:54 +0200
User-agent: KMail/4.7.4 (Linux/3.1.10-1.9-desktop; KDE/4.7.4; x86_64; ; )

Hi,

On a bi-arch Linux/glibc system (x86, x86_64) I'm getting 3 test failures
when building for 32-bit mode:

$ ./configure --host=i686-pc-linux-gnu --prefix=/arch/x86-linux/gnu \
              CC="gcc -m32 -march=i586" \
              CXX="g++ -m32 -march=i586" \
              F77="gfortran -m32 -march=i586" \
              FC="gfortran -m32 -march=i586" \
              LDFLAGS="-m32" \
              CPPFLAGS=-Wall
$ make
$ make check

FAIL: t/fort4
FAIL: t/fort5
FAIL: t/silent-many-gcc

Let's analyze the t/fort4 failure. The two other failures look similar.


FAIL: t/fort4
=============

Running from installcheck: no
Using TAP: no
PATH = 
/home/bruno/data/build/automake-1.12/t/ax:/home/bruno/data/build/automake-1.12/t/wrap:/home/bruno/bin:/arch/x86_64-linux/gnu/bin:/arch/x86-linux/gnu/bin:/home/bruno/bin:/arch/x86_64-linux/gnu/bin:/arch/x86-linux/gnu/bin:/usr/lib64/mpi/gcc/openmpi/bin:/home/bruno/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin
++ pwd
/home/bruno/data/build/automake-1.12/t/fort4.dir
+ mkdir sub
+ cat
+ cat
+ cat
+ sed s,foo,bar, foo.f90
+ sed s,foo,baz, foo.f90
+ cat
+ cat
+ aclocal-1.12 -Werror
+ automake-1.12 --foreign -Werror -Wall -a
configure.ac:8: installing './config.guess'
configure.ac:8: installing './config.sub'
+ grep '.\$(FCLINK)' Makefile.in
+ autoconf
+ ./configure
configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /arch/x86-linux/gnu/bin/install -c
checking whether build environment is sane... yes
checking for i686-pc-linux-gnu-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /arch/x86-linux/gnu/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for i686-pc-linux-gnu-g77... gfortran -m32 -march=i586
checking whether the Fortran 77 compiler works... yes
checking for Fortran 77 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 Fortran 77 compiler... yes
checking whether gfortran -m32 -march=i586 accepts -g... yes
checking for i686-pc-linux-gnu-gfortran... gfortran
checking whether we are using the GNU Fortran compiler... yes
checking whether gfortran accepts -g... yes
checking for Fortran flag to compile .f90 files... none
checking build system type... x86_64-unknown-linux-gnu
checking host system type... i686-pc-linux-gnu
checking how to get verbose linking output from gfortran... -v
checking for Fortran libraries of gfortran...  
-L/usr/lib64/gcc/x86_64-suse-linux/4.6 
-L/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../lib64 -L/lib/../lib64 
-L/usr/lib/../lib64 
-L/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/lib 
-L/usr/lib64/gcc/x86_64-suse-linux/4.6/../../.. -lgfortran -lm -lquadmath
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
+ make
gfortran -m32 -march=i586  -g -O2 -c -o hello.o hello.f
gfortran   -c -o foo.o  foo.f90
gfortran   -c -o bar.o  `test -f 'sub/bar.f90' || echo './'`sub/bar.f90
gfortran -m32 -march=i586  -g -O2   -o hello hello.o foo.o bar.o 
-L/usr/lib64/gcc/x86_64-suse-linux/4.6 
-L/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../lib64 -L/lib/../lib64 
-L/usr/lib/../lib64 
-L/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/lib 
-L/usr/lib64/gcc/x86_64-suse-linux/4.6/../../.. -lgfortran -lm -lquadmath 
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.6/libgfortran.so when 
searching for -lgfortran
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.6/libgfortran.a when 
searching for -lgfortran
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible 
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../lib64/libm.so when searching 
for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible 
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../lib64/libm.a when searching 
for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib/../lib64/libm.so when searching for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib/../lib64/libm.a when searching for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.6/../../../libm.so 
when searching for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.6/../../../libm.a when 
searching for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.6/libquadmath.so when 
searching for -lquadmath
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.6/libquadmath.a when 
searching for -lquadmath
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.6/libgfortran.so when 
searching for -lgfortran
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.6/libgfortran.a when 
searching for -lgfortran
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible 
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../lib64/libm.so when searching 
for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible 
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../lib64/libm.a when searching 
for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib/../lib64/libm.so when searching for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib/../lib64/libm.a when searching for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.6/../../../libm.so 
when searching for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.6/../../../libm.a when 
searching for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.6/libgcc_s.so when 
searching for -lgcc_s
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.6/libgcc.a when 
searching for -lgcc
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.6/libquadmath.so when 
searching for -lquadmath
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.6/libquadmath.a when 
searching for -lquadmath
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible 
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../lib64/libm.so when searching 
for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible 
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../lib64/libm.a when searching 
for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib/../lib64/libm.so when searching for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib/../lib64/libm.a when searching for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.6/../../../libm.so 
when searching for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.6/../../../libm.a when 
searching for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.6/libgcc_s.so when 
searching for -lgcc_s
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.6/libgcc.a when 
searching for -lgcc
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible 
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../lib64/libc.so when searching 
for -lc
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible 
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../lib64/libc.a when searching 
for -lc
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib/../lib64/libc.so when searching for -lc
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib/../lib64/libc.a when searching for -lc
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.6/../../../libc.so 
when searching for -lc
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.6/../../../libc.a when 
searching for -lc
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.6/libgcc_s.so when 
searching for -lgcc_s
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.6/libgcc.a when 
searching for -lgcc
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
i386:x86-64 architecture of input file `foo.o' is incompatible with i386 output
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: 
i386:x86-64 architecture of input file `bar.o' is incompatible with i386 output
collect2: ld returned 1 exit status
make: *** [hello] Error 1
+ exit_status=2
+ set +e
+ cd /home/bruno/data/build/automake-1.12
+ test no = yes
+ case $am_explicit_skips in
+ test 2 -eq 0
+ keep_testdirs=yes
+ am_keeping_testdirs
+ case $keep_testdirs in
+ return 0
+ set +x
fort4: exit 2


You can see that hello.o is a 32-bit mode object file, whereas foo.o and
bar.o are 64-bit ones.

$ cat t/fort4.dir/configure.ac
AC_INIT([fort4], [1.0])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
AC_PROG_F77
AC_PROG_FC
AC_FC_SRCEXT([f90], [],
  [AC_MSG_FAILURE([$FC compiler cannot create executables], 77)])
AC_FC_LIBRARY_LDFLAGS
AC_OUTPUT

$ t/fort4.dir/config.status --version
fort4 config.status 1.0
configured by ./configure, generated by GNU Autoconf 2.69,
  with options "'build_alias=' 'host_alias=i686-pc-linux-gnu' 'F77=gfortran 
-m32 -march=i586' 'FFLAGS=-g -O2' 'FC=gfortran' 'FCFLAGS='"

$ grep gfortran t/fort4.dir/Makefile
F77 = gfortran -m32 -march=i586
FC = gfortran
FCLIBS =  -L/usr/lib64/gcc/x86_64-suse-linux/4.6 
-L/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../lib64 -L/lib/../lib64 
-L/usr/lib/../lib64 
-L/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/lib 
-L/usr/lib64/gcc/x86_64-suse-linux/4.6/../../.. -lgfortran -lm -lquadmath

So, apparently,
  - hello.o is created through the .f.o rule, which uses $(F77COMPILE),
    which uses $(F77), which was determined by AC_PROG_F77 and is a 32-bit
    compiler. Good. (But how was the value passed from automake's top
    config.status to t/fort4.dir/configure? Through the 'defs' script?)
  - foo.o and bar.o are created through the .f90.o rule, which uses
    $(FCCOMPILE), which uses $(FC), which was determined by AC_PROG_FC and
    is a 64-bit compiler. Bad.

When I add a 'set -x' statement to 'defs', I see these assignments:

+++ CC='gcc -m32 -march=i586'
+++ CXX='g++ -m32 -march=i586'
+++ F77='gfortran -m32 -march=i586'
+++ FC='gfortran -m32 -march=i586'
+++ CFLAGS='-g -O2'
+++ CXXFLAGS='-g -O2'
+++ FCFLAGS='-g -O2'
+++ FFLAGS='-g -O2'
+++ CPPFLAGS=-Wall
+++ GNU_CC='gcc -m32 -march=i586'
+++ GNU_CXX='g++ -m32 -march=i586'
+++ GNU_F77='gfortran -m32 -march=i586'
+++ GNU_FC=gfortran
+++ GNU_FFLAGS='-g -O2'
+++ GNU_FCFLAGS=
+++ GNU_CXXFLAGS='-g -O2'
+++ GNU_CFLAGS='-g -O2'
+++ GNU_GCJ=gcj
+++ GNU_GCJFLAGS=

Obviously, the value of GNU_FC is wrong. It comes from the AC_SUBSTed
variable GNU_FC. Here's the difference:

$ grep GNU_F77 config.status
S["ac_ct_GNU_F77"]=""
S["GNU_F77"]="gfortran -m32 -march=i586"
$ grep GNU_FC config.status
S["ac_ct_GNU_FC"]="gfortran"
S["GNU_FCFLAGS"]=""
S["GNU_FC"]="gfortran"

Apparently this piece of code from configure.ac took the wrong path in 'if':

# GNU Fortran compiler.
AC_ARG_VAR([GNU_FC],      [GNU Fortran compiler])
AC_ARG_VAR([GNU_FCFLAGS], [GNU Fortran compiler flags])
if test $am_FC_is_GNU = yes; then
  AC_MSG_NOTICE([$FC is already a GNU Fortran compiler])
  GNU_FC=$FC
  GNU_FCFLAGS=${GNU_FCFLAGS-$FCFLAGS}
else
  AC_CHECK_TOOLS([GNU_FC], [gfortran], [false])
fi
AS_IF([AM_RUN_LOG([$GNU_FC --version && $GNU_FC -v])], [],
      [AC_MSG_WARN([botched installation for GNU Fortran compiler])
       _AM_SKIP_COMP_TESTS([GNU Fortran])])

because in the output of the configure command I see

configure: will now look for GNU compilers
configure: gcc -m32 -march=i586 is already a GNU C compiler
configure: g++ -m32 -march=i586 is already a GNU C++ compiler
checking for i686-pc-linux-gnu-gfortran... no
checking for gfortran... gfortran
configure: gfortran -m32 -march=i586 is already a GNU Fortran 77 compiler

but there is no line "gfortran -m32 -march=i586 is already a GNU Fortran 
compiler"

$ gfortran --version
GNU Fortran (SUSE Linux) 4.6.2

In the configure.ac there is also a comment

# FIXME this won't work as expected until we can assume autoconf 2.69 :-(
AS_IF([test x"$GFC" = x"yes"], [am_FC_is_GNU=yes], [am_FC_is_GNU=no])

Would it be sufficient to rebuild automake's configure script with
autoconf 2.69 instead of 2.68?

Bruno






reply via email to

[Prev in Thread] Current Thread [Next in Thread]