Am Mon, 5 May 2014 12:26:21 +0200 "O. Hartmann" <ohartman_at_zedat.fu-berlin.de> schrieb: Following some reports and recall myself an earlier issue with this, I remember to have to provide "-Wl,-rpath=/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. I'm used not to provide the -Wl,-rpath= option when using different C compilers 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.ac? Since I use the autotools on several platforms (Linux and FreeBSD) I get really confused this behaviour. Maybe I'm missing something important here and I would appreciate if someone can shed some light onto it. Thanks in advance, Oliver > > 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 base: > > 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 compilers. 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 obviously > the correct path to its libraries. > > 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: $? = 1 > configure:2415: gfortran48 -qversion >&5 > gfortran48: error: unrecognized command line option '-qversion' > gfortran48: fatal error: no input files > compilation terminated. > configure:2426: $? = 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: $? = 1 > configure:2505: result: no > configure: failed program was: > | program main > | > | 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: $? = 0 > configure:2560: result: > configure:2576: checking whether we are cross compiling > configure:2584: gfortran47 -o conftest conftest.f >&5 > configure:2588: $? = 0 > configure:2595: ./conftest > /lib/libgcc_s.so.1: version GCC_4.6.0 required by /usr/local/lib/gcc47/libgfortran.so.3 > not found configure:2599: $? = 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 > [...]
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:48 UTC