From owner-freebsd-current@FreeBSD.ORG Mon May 5 11:01:41 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D38319E3 for ; Mon, 5 May 2014 11:01:41 +0000 (UTC) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 676981C43 for ; Mon, 5 May 2014 11:01:41 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.82) for freebsd-current@freebsd.org with esmtp (envelope-from ) id <1WhGeR-002iw4-I8>; Mon, 05 May 2014 13:01:39 +0200 Received: from g226186111.adsl.alicedsl.de ([92.226.186.111] helo=thor.walstatt.dynvpn.de) by inpost2.zedat.fu-berlin.de (Exim 4.82) for freebsd-current@freebsd.org with esmtpsa (envelope-from ) id <1WhGeR-001XUZ-CX>; Mon, 05 May 2014 13:01:39 +0200 Date: Mon, 5 May 2014 13:01:33 +0200 From: "O. Hartmann" To: freebsd-current@freebsd.org Subject: Re: gfortran48: compiler issue with f77 code: configure: error: Fortran 77 compiler cannot create executables Message-ID: <20140505130133.14cbadc8.ohartman@zedat.fu-berlin.de> In-Reply-To: <20140505122621.13ba2085.ohartman@zedat.fu-berlin.de> References: <20140505122621.13ba2085.ohartman@zedat.fu-berlin.de> Organization: FU Berlin X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/7mklhp9zDCVUOA_whVEzcSM"; protocol="application/pgp-signature" X-Originating-IP: 92.226.186.111 X-ZEDAT-Hint: A X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2014 11:01:41 -0000 --Sig_/7mklhp9zDCVUOA_whVEzcSM Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Am Mon, 5 May 2014 12:26:21 +0200 "O. Hartmann" schrieb: Following some reports and recall myself an earlier issue with this, I reme= mber to have to provide "-Wl,-rpath=3D/usr/local/lib/gcc48" to the FFLAGS. This is also the= case for the gcc/gfortran in 11.0-CURRENT which defaults to gcc 4.7.=20 I'm used not to provide the -Wl,-rpath=3D option when using different C com= pilers along with FreeBSD, why is that so for Fortran? And why is the autotool suite in = FreeBSD not recognising the proper Fortran? Is there a way to make the "-Wl,-rpath" option a default in the configure.a= c? Since I use the autotools on several platforms (Linux and FreeBSD) I get really confuse= d this behaviour.=20 Maybe I'm missing something important here and I would appreciate if someon= e can shed some light onto it. Thanks in advance, Oliver >=20 > I have some F77 code that compiled fine using the GNU autotool environmen= t, having the > macro AC_PROG_F77 in configure.ac. >=20 > 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! >=20 > I miss something here and I do not know what. >=20 > I use Fortran not on a regular basis, so this problem caught me, again, o= n the wrong > foor. >=20 >=20 > Further details see below. >=20 >=20 > Regards, >=20 > Oliver >=20 >=20 > -------------------------------------------------------------------------= ----- >=20 > Before I start reporting the issue, this is what I have installed as the = base: >=20 > language ports: > gcc-4.7.3_1 > gcc48-4.8.3.s20140424 >=20 > autotools: >=20 > 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 >=20 >=20 > As shown below, the autotools are incapable of detecting installed compil= ers. As also > reported below, gfortran48 miscompiles (while the gfortran 4.8.2 on Ubunt= u 14.04 LTS > does not have a problem with the very same code!) and gfortran47 is missi= ng obviously > the correct path to its libraries.=20 >=20 > My configure.ac file of the project contains this lines: >=20 > #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 >=20 >=20 > The command sequence to prepare the source is: > aclocal ; autoheader ; autoconf ; libtoolize -c ; automake -ac >=20 >=20 > And ./configure then dies with this: >=20 > 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 >=20 > Well, this looks pretty nice! >=20 > If the usage of the compiler is selected to be gfortran48 via >=20 > AC_PROG_F77([gfortran48 gfortran47 gfortran46 gfortran f77]) >=20 > the I receive this crap: >=20 > 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 >=20 > Checking config.log as suggested I find this portion: >=20 > [...] > 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 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 > [...] >=20 > This is funny - the FreeBSD port can not compile simple F77 code? >=20 > With gfortran47 using, I get this: >=20 > [...] > 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/li= bgfortran.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_/7mklhp9zDCVUOA_whVEzcSM Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQEcBAEBAgAGBQJTZ2+SAAoJEOgBcD7A/5N86FIH/jp+EbfcZL9gqwujJnvC4PUd mL3Yy0DEfbmiSlhwJyTOB3zrspJ/z9CkpcvkjydSmfMGyoAOdXxX3KW4fV0BJX8T wndGye7TRxElw5oL6pEn1vv1uR0MtCeK9vYb5s7hdBE18zoyFZseVvutZ28cXRem Pls80zStvv/+Al0j3sXQ6qJbuqx8BXl0j8OFKlreD8HEJh0eqZIpsfT6TBAhBBYZ 8Xkme6MyctE/cn/jWsX4RPOxieId5OPamtMi9YYODX0FJPfRUfjUIthJqlljf7kD SJ5IiqhHlmpW/AkEXlii1Le7lIAIkiH8FOwezi3wWjMGD/G2rlR1V8xSU4D3DnU= =pwW0 -----END PGP SIGNATURE----- --Sig_/7mklhp9zDCVUOA_whVEzcSM--