Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 May 2014 12:26:21 +0200
From:      "O. Hartmann" <ohartman@zedat.fu-berlin.de>
To:        FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   gfortran48: compiler issue with f77 code: configure: error: Fortran 77 compiler cannot create executables
Message-ID:  <20140505122621.13ba2085.ohartman@zedat.fu-berlin.de>

next in thread | raw e-mail | index | archive | help
--Sig_/cRp/gzsGlOQYNMr5NH7lcvk
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable


I have some F77 code that compiled fine using the GNU autotool environment,=
 having the
macro AC_PROG_F77 in configure.ac.

The project compiles fine on Linux Ubuntu 14.04 LTS (gfortran version 4.8).=
 But since a
while it doesn't on FreeBSD 9.2/10/11 anymore!

I miss something here and I do not know what.

I use Fortran not on a regular basis, so this problem caught me, again, on =
the wrong foor.


Further details see below.


Regards,

Oliver


---------------------------------------------------------------------------=
---

Before I start reporting the issue, this is what I have installed as the ba=
se:

language ports:
gcc-4.7.3_1
gcc48-4.8.3.s20140424

autotools:

autoconf-2.69
autoconf-wrapper-20131203
autoconf213-2.13.000227_6
autogen-5.12_2
automake-1.14
automake-wrapper-20131203
automake14-1.4.6_6
automoc4-0.9.88_3
autotools-20130627


As shown below, the autotools are incapable of detecting installed compiler=
s. As also
reported below, gfortran48 miscompiles (while the gfortran 4.8.2 on Ubuntu =
14.04 LTS does
not have a problem with the very same code!) and gfortran47 is missing obvi=
ously the
correct path to its libraries.=20

My configure.ac file of the project contains this lines:

#AC_PROG_F77([gfortran48 gfortran47 gfortran46 gfortran f77])
AC_PROG_F77
# Checks for header files.
#AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h string.h])
#
LT_INIT([disable-shared])
#
AM_INIT_AUTOMAKE
#
AC_CONFIG_FILES([Makefile
                src/Makefile
                doc/Makefile
])
#
AC_OUTPUT


The command sequence to prepare the source is:
aclocal ; autoheader ; autoconf ; libtoolize -c ; automake -ac


And ./configure then dies with this:

checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgfortran... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking for nagfor... no
checking whether the Fortran 77 compiler works... no
configure: error: in `/home/ohartmann/Projects/oepik':
configure: error: Fortran 77 compiler cannot create executables
See `config.log' for more details

Well, this looks pretty nice!

If the usage of the compiler is selected  to be gfortran48 via

AC_PROG_F77([gfortran48 gfortran47 gfortran46 gfortran f77])

the I receive this crap:

checking for gfortran48... gfortran48
checking whether the Fortran 77 compiler works... no
configure: error: in `/home/ohartmann/Projects/oepik':
configure: error: Fortran 77 compiler cannot create executables
See `config.log' for more details

Checking config.log as suggested I find this portion:

[...]
configure:2426: $? =3D 1
configure:2415: gfortran48 -qversion >&5
gfortran48: error: unrecognized command line option '-qversion'
gfortran48: fatal error: no input files
compilation terminated.
configure:2426: $? =3D 1
configure:2441: checking whether the Fortran 77 compiler works
configure:2463: gfortran48   conftest.f  >&5
f951: internal compiler error: Illegal instruction
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html>; for instructions.
configure:2467: $? =3D 1
configure:2505: result: no
configure: failed program was:
|       program main
|=20
|       end
configure:2510: error: in `/home/ohartmann/Projects/oepik':
configure:2513: error: Fortran 77 compiler cannot create executables
See `config.log' for more details
[...]

This is funny - the FreeBSD port can not compile simple F77 code?

With gfortran47 using, I get this:

[...]
configure:2527: checking for suffix of executables
configure:2534: gfortran47 -o conftest   conftest.f  >&5
configure:2538: $? =3D 0
configure:2560: result:=20
configure:2576: checking whether we are cross compiling
configure:2584: gfortran47 -o conftest   conftest.f  >&5
configure:2588: $? =3D 0
configure:2595: ./conftest
/lib/libgcc_s.so.1: version GCC_4.6.0 required by /usr/local/lib/gcc47/libg=
fortran.so.3
not found configure:2599: $? =3D 1
configure:2606: error: in `/home/ohartmann/Projects/oepik':
configure:2610: error: cannot run Fortran 77 compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
[...]

--Sig_/cRp/gzsGlOQYNMr5NH7lcvk
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (FreeBSD)

iQEcBAEBAgAGBQJTZ2dSAAoJEOgBcD7A/5N8RSMIAMHi35ZwE9F4mQNA2zOinqBd
eUDkGyb54aIjEuWfEPyFdJuvqROTV5+gM7RTlO+Zn0k67FX3Xx/uQMP0HZMALt7F
eNmr6Uvid0ZoyCqF95vqkFviYnzY9K3dXl/i3dtTKCbnwMLaUFmyinaS0eflRHym
a82hqfPz5pCDikIbU57vbLoczPmNqVyXboSU2G8STf/TcFGstBFvmqPYpGVvJ+Wh
raIxobmu19WOoPB84WJ6b/ZvNEJSwVHJaKxWdxznjEdAPkVIPF5u3Y9dbiOHsFxk
+zYCCa9C6fONuBH0Afqare4oHuQQDJp/1iUchZDneFXYK2NHkPR8uoLI+xkhsy0=
=ybN3
-----END PGP SIGNATURE-----

--Sig_/cRp/gzsGlOQYNMr5NH7lcvk--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140505122621.13ba2085.ohartman>