|
From: | Thomas Treichl |
Subject: | Re: f2c obsolete? |
Date: | Wed, 24 Oct 2007 21:16:52 +0200 |
User-agent: | Thunderbird 2.0.0.6 (Macintosh/20070728) |
John W. Eaton schrieb:
On 24-Oct-2007, Michael Goffioul wrote: | On 10/24/07, John W. Eaton <address@hidden> wrote: | > On 24-Oct-2007, Michael Goffioul wrote: | > | > | This is something that can also be handled in fort77 itself. In the end, | > | the libf2c I'm using needs that -MD flag, so it make sense to add it | > | directly in fort77 script. For me it's the same, as long as it works... | > | > How does it need it? In what command?| | The -MD flag tells the MS compiler about the C runtime library to use| (in this case, the DLL version). When you compile different modules and | try to link them together, you should always use the same runtime lib | for compiling all modules to avoid weird problems (it's even needed if you | want to share FILE* streams between modules).| | I always use the -MD flag to compile everything (octave and all deps),| including libf2c. Because the code generated by fort77 is intended to | be linked with libf2c, fort77 should also use by default the -MD flag. So is -MD supposed to be passed to the C compiler or the linker? Either way, it looks like you should be able to use -Wc,-MD or -Wl,-MD to send the options through fort77 without having to modify the fort77 script itself. If that works, then the only modification that I see that should be necessary is the one I posted earlier to make -v print actual verbose output from the compilers so that fort77 will play nice with the AC_F77_LIBRARY_LDFLAGS autoconf macro. jwe
Hi,I'm late (as always) in replying to this thread. A first setup of the fort77 program did work for me (with modifications - see below) and it also worked to rebuild a new version of Octave.app (that is compiled like Michael's MSVC version with f2c). What I needed to do is to comment out the "BLAS library calling convention compatibility" test result in the configure.in script because the test fails for me. See yourself what happens (the -framework vecLib is found and needed, this is okay - but the '-framework vecLib' seems to not be passed through correctly through the configure test).
I changed the script the following way to get some more output: line 886: if $have_fortran_compiler; then LIBS="$BLAS_LIBS $FLIBS $LIBS" AC_LANG_PUSH(Fortran 77) echo "--->" echo "-1-> $ac_compile" echo "-2-> $F77" echo "-3-> $FFLAGS" echo "-4-> $ac_ext" echo "--->" echo "-5-> $ac_link" echo "-6-> $ac_exeext" echo "-7-> $FFLAGS" echo "-8-> $LDFLAGS" echo "-9-> $ac_ext" echo "-0-> $LIBS" eval "$ac_compile" eval "$ac_link" AC_LANG_POP(Fortran 77) elif $have_f2c; then And the output then is: ---> -1-> $F77 -c $FFLAGS conftest.$ac_ext >&5 -2-> fort77 -3-> -O3 -ftree-vectorize -I/Applications/Octave.app/Contents/Resources/include -mieee-fp -mieee-fp -4-> f ---> -5-> $F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5 -6-> -7-> -O3 -ftree-vectorize -I/Applications/Octave.app/Contents/Resources/include -mieee-fp -mieee-fp -8-> -L/Applications/Octave.app/Contents/Resources/lib -L/Applications/Octave.app/Contents/Resources/lib/pkgconfig -9-> f -0-> -framework vecLib -L/Applications/Octave.app/Contents/Resources/lib -lf2c -lhdf5 -lz -lm MAIN foo: MAIN foo: /usr/bin/ld: can't locate framework for: -framework -c collect2: ld returned 1 exit status /Applications/Octave.app/Contents/Resources/bin/fort77: aborting compilation ./configure: line 1: ./conftest: No such file or directory no configure: WARNING: Your BLAS library was apparently compiled with a Fortran configure: WARNING: compiler that uses a different calling convention from configure: WARNING: the one used by the selected compiler, fort77. Any ideas what I can do now? Thomas
[Prev in Thread] | Current Thread | [Next in Thread] |