bug-autoconf
[Top][All Lists]
Advanced

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

Re: autoconf-2.57f: make check: 2 Errors related to fort77 (fink package


From: Sander Niemeijer
Subject: Re: autoconf-2.57f: make check: 2 Errors related to fort77 (fink package) on Mac OS X
Date: Thu, 2 Oct 2003 11:17:57 +0200

Ok. I did some digging and this is the case.

First of all let me clarify that fort77 (at least for the fink package on Mac OS X) is a script wrapping f2c and gcc. So the fact that autoconf thinks it is a gnu compiler is definitely correct :-)

The script fails on the fortran.at:65 test, because it is not using the preprocessor. If you use conftest.F (so with a capital F) or use the -cpp flag then it will compile correctly (the 255 error code is a result of the f2c compiler barfing on the # lines) without errors (i.e. __GNUC__ is defined because I am using the gcc compiler as a back end).

Furthermore the fort77 script indeed has an option to set freeform code. This is the same option as used for f2c and is '-f'.

I have attached the fort77 man page that is on my system, so you can see what options it takes.

The version of fort77 I am using is:
% fort77 -v
/sw/bin/fort77: fort77 Version 1.18
/sw/bin/fort77: No input files specified

Let me know if you need more information.

Attachment: fort77.1
Description: Binary data



Regards,
Sander

On donderdag, okt 2, 2003, at 09:32 Europe/Amsterdam, Akim Demaille wrote:


Thanks for the report.  More information below.

66. fortran.at:65: testing ...
fortran.at:65: autoconf -W obsolete
fortran.at:65: autoheader
fortran.at:65: top_srcdir=$abs_top_srcdir ./configure
--- /dev/null   Wed Oct  1 18:37:01 2003
+++ /Users/sander/Download/autoconf-2.57f/tests/testsuite.dir/at-stderr Wed Oct 1 18:37:02 2003
@@ -0,0 +1 @@
+configure: error: incorrectly recognized a GNU Fortran 77 compiler
stdout:
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... fort77
checking for Fortran 77 compiler default output file name... a.out
checking whether the Fortran 77 compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether fort77 accepts -g... yes
./../../fortran.at:65: config.log
fortran.at:65: exit code was 1, expected 0

How bizarre.



configure:1347: checking for Fortran 77 compiler version
configure:1350: fort77 --version </dev/null >&5
/sw/bin/fort77: No input files specified
configure:1353: $? = 255
configure:1355: fort77 -v </dev/null >&5
/sw/bin/fort77: fort77 Version 1.18
/sw/bin/fort77: No input files specified
configure:1358: $? = 255
configure:1360: fort77 -V </dev/null >&5
/sw/bin/fort77 : Missing argument to "-V"
configure:1363: $? = 255

Nice exit status.


configure:1552: checking whether we are using the GNU Fortran 77 compiler
configure:1566: fort77 -c  conftest.F >&5
MAIN main:
configure:1569: $? = 0
configure:1572: test -s conftest.o
configure:1575: $? = 0
configure:1588: result: yes

So this test believes you run GNU Fortran, which is not quite
--version above seems to believe.  And the test suite precisely wants
to check that both stimuli yield similar responses :(

So could you find out more information on your Fortran compiler?  And
try to compile the following:

  cat >conftest.f <<_ACEOF
      program main
#ifndef __GNUC__
       choke me
#endif

      end
_ACEOF

fort77 conftest.f
echo $?

Hm...  Actually, Steven, is this GNU Fortran check really correct?  I
mean, it should be .F to have the preprocessor run.




69. acfortran.at:14: testing ...
acfortran.at:14: autoconf -W obsolete
acfortran.at:14: autoheader
acfortran.at:14: top_srcdir=$abs_top_srcdir ./configure
--- /dev/null   Wed Oct  1 18:37:29 2003
+++ /Users/sander/Download/autoconf-2.57f/tests/testsuite.dir/at-stderr Wed Oct 1 18:37:31 2003
@@ -0,0 +1 @@
+configure: error: Fortran does not accept free-form source
stdout:
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for g95... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... fort77
checking for Fortran compiler default output file name... a.out
checking whether the Fortran compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU Fortran compiler... yes
checking whether fort77 accepts -g... yes
checking for Fortran flag needed to allow free-form source... unknown
./../../acfortran.at:14: config.log
acfortran.at:14: exit code was 1, expected 0

Arg.  Sander, could you dig into your fort77 documentation to find
whether there is an option to accept the freeform?

Steven, do you believe that it is possible that some compiler do not
support such an option?  In this case, at least for the sake of the
test suite, this AC_MSG_ERROR should exit 77, not exit 1.


This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.57f.  Invocation command line was

$ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = nemo.local.
uname -m = Power Macintosh
uname -r = 6.7
uname -s = Darwin
uname -v = Darwin Kernel Version 6.7: Wed Aug 13 20:21:32 PDT 2003; root:xnu/xnu-344.47.obj~1/RELEASE_PPC

/usr/bin/uname -p = powerpc
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
hostinfo               = Mach kernel version:
Darwin Kernel Version 6.7:
Wed Aug 13 20:21:32 PDT 2003; root:xnu/xnu-344.47.obj~1/RELEASE_PPC


Kernel configured for a single processor only.
1 processor is physically available.
Processor type: ppc7450 (PowerPC 7450)
Processor active: 0
Primary memory available: 512.00 megabytes.
Default processor set: 76 tasks, 169 threads, 1 processors
Load average: 2.06, Mach factor: 0.24
unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /Users/sander/Download/autoconf-2.57f/tests
PATH: /Users/sander/Public/gnutools/bin
PATH: /Users/sander/Public/doxygen/bin
PATH: /sw/bin
PATH: /sw/sbin
PATH: /bin
PATH: /sbin
PATH: /usr/bin
PATH: /usr/sbin
PATH: /usr/X11R6/bin
PATH: /Users/sander/beat/bin
PATH: /Applications/MATLAB6p5p1/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1291: checking for f95
configure:1320: result: no
configure:1291: checking for fort
configure:1320: result: no
configure:1291: checking for xlf95
configure:1320: result: no
configure:1291: checking for ifc
configure:1320: result: no
configure:1291: checking for efc
configure:1320: result: no
configure:1291: checking for pgf95
configure:1320: result: no
configure:1291: checking for lf95
configure:1320: result: no
configure:1291: checking for g95
configure:1320: result: no
configure:1291: checking for f90
configure:1320: result: no
configure:1291: checking for xlf90
configure:1320: result: no
configure:1291: checking for pgf90
configure:1320: result: no
configure:1291: checking for epcf90
configure:1320: result: no
configure:1291: checking for g77
configure:1320: result: no
configure:1291: checking for f77
configure:1320: result: no
configure:1291: checking for xlf
configure:1320: result: no
configure:1291: checking for frt
configure:1320: result: no
configure:1291: checking for pgf77
configure:1320: result: no
configure:1291: checking for fort77
configure:1307: found /sw/bin/fort77
configure:1317: result: fort77
configure:1332: checking for Fortran compiler version
configure:1335: fort77 --version </dev/null >&5
/sw/bin/fort77: No input files specified
configure:1338: $? = 255
configure:1340: fort77 -v </dev/null >&5
/sw/bin/fort77: fort77 Version 1.18
/sw/bin/fort77: No input files specified
configure:1343: $? = 255
configure:1345: fort77 -V </dev/null >&5
/sw/bin/fort77 : Missing argument to "-V"
configure:1348: $? = 255
configure:1362: checking for Fortran compiler default output file name
configure:1365: fort77    conftest.f  >&5
conftest.f:
MAIN main:
configure:1368: $? = 0
configure:1414: result: a.out
configure:1419: checking whether the Fortran compiler works
configure:1425: ./a.out
configure:1428: $? = 0
configure:1445: result: yes
configure:1452: checking whether we are cross compiling
configure:1454: result: no
configure:1457: checking for suffix of executables
configure:1459: fort77 -o conftest    conftest.f  >&5
conftest.f:
MAIN main:
configure:1462: $? = 0
configure:1487: result:
configure:1493: checking for suffix of object files
configure:1504: fort77 -c   conftest.f >&5
conftest.f:
MAIN main:
configure:1507: $? = 0
configure:1529: result: o
configure:1537: checking whether we are using the GNU Fortran compiler
configure:1551: fort77 -c   conftest.F >&5
MAIN main:
configure:1554: $? = 0
configure:1557: test -s conftest.o
configure:1560: $? = 0
configure:1573: result: yes
configure:1579: checking whether fort77 accepts -g
configure:1591: fort77 -c -g  conftest.f >&5
conftest.f:
MAIN main:
configure:1594: $? = 0
configure:1597: test -s conftest.o
configure:1600: $? = 0
configure:1612: result: yes
configure:1636: checking for Fortran flag needed to allow free-form source
configure:1659: fort77 -c -g  conftest.f >&5
conftest.f:
Error on line 2: illegal continuation card (starts "  prog")
MAIN:
Error on line 4: syntax error
Error on line 5: unclassifiable statement (starts "")
/sw/bin/fort77: aborting compilation
configure:1662: $? = 255
configure: failed program was:
|
|   program freeform
|        ! FIXME: how to best confuse non-freeform compilers?
|        print *, 'Hello ', &
|            'world.'
|        end
|
configure:1659: fort77 -c -g -free  conftest.f >&5
conftest.f:
Error on line 2: illegal continuation card (starts "  prog")
MAIN:
Error on line 4: syntax error
Error on line 5: unclassifiable statement (starts "")
/sw/bin/fort77: aborting compilation
configure:1662: $? = 255
configure: failed program was:
|
|   program freeform
|        ! FIXME: how to best confuse non-freeform compilers?
|        print *, 'Hello ', &
|            'world.'
|        end
|
configure:1659: fort77 -c -g -freeform  conftest.f >&5
conftest.f:
Error on line 2: illegal continuation card (starts "  prog")
MAIN:
Error on line 4: syntax error
Error on line 5: unclassifiable statement (starts "")
/sw/bin/fort77: aborting compilation
configure:1662: $? = 255
configure: failed program was:
|
|   program freeform
|        ! FIXME: how to best confuse non-freeform compilers?
|        print *, 'Hello ', &
|            'world.'
|        end
|
configure:1659: fort77 -c -g -ffree-form  conftest.f >&5
conftest.f:
Error on line 2: illegal continuation card (starts "  prog")
MAIN:
Error on line 4: syntax error
Error on line 5: unclassifiable statement (starts "")
/sw/bin/fort77: aborting compilation
configure:1662: $? = 255
configure: failed program was:
|
|   program freeform
|        ! FIXME: how to best confuse non-freeform compilers?
|        print *, 'Hello ', &
|            'world.'
|        end
|
configure:1659: fort77 -c -g -qfree  conftest.f >&5
conftest.f:
Error on line 2: illegal continuation card (starts "  prog")
MAIN:
Error on line 4: syntax error
Error on line 5: unclassifiable statement (starts "")
/sw/bin/fort77: aborting compilation
configure:1662: $? = 255
configure: failed program was:
|
|   program freeform
|        ! FIXME: how to best confuse non-freeform compilers?
|        print *, 'Hello ', &
|            'world.'
|        end
|
configure:1659: fort77 -c -g -Mfree  conftest.f >&5
conftest.f:
Error on line 2: illegal continuation card (starts "  prog")
MAIN:
Error on line 4: syntax error
Error on line 5: unclassifiable statement (starts "")
/sw/bin/fort77: aborting compilation
configure:1662: $? = 255
configure: failed program was:
|
|   program freeform
|        ! FIXME: how to best confuse non-freeform compilers?
|        print *, 'Hello ', &
|            'world.'
|        end
|
configure:1659: fort77 -c -g -Mfreeform  conftest.f >&5
conftest.f:
Error on line 2: illegal continuation card (starts "  prog")
MAIN:
Error on line 4: syntax error
Error on line 5: unclassifiable statement (starts "")
/sw/bin/fort77: aborting compilation
configure:1662: $? = 255
configure: failed program was:
|
|   program freeform
|        ! FIXME: how to best confuse non-freeform compilers?
|        print *, 'Hello ', &
|            'world.'
|        end
|
configure:1659: fort77 -c -g -FR  conftest.f >&5
conftest.f:
Error on line 2: illegal continuation card (starts "  prog")
MAIN:
Error on line 4: syntax error
Error on line 5: unclassifiable statement (starts "")
/sw/bin/fort77: aborting compilation
configure:1662: $? = 255
configure: failed program was:
|
|   program freeform
|        ! FIXME: how to best confuse non-freeform compilers?
|        print *, 'Hello ', &
|            'world.'
|        end
|
configure:1687: result: unknown
configure:1690: error: Fortran does not accept free-form source

[...]

69. acfortran.at:14: 69. AC_FC_FREEFORM (acfortran.at:14): FAILED (acfortran.at:14)


reply via email to

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