[ale] g77 vs gfortran
Geoffrey
esoteric at 3times25.net
Thu Feb 23 08:05:50 EST 2006
Dow_Hurst wrote:
> Geoffrey,
> Here is the startup command and the resulting output with the error:
>
> dhurst at boo:/opt/simulaid_20060125> gfortran -v -ffixed-form -o ~/simulaid_20060125_suse10_gfortran_LSB32 ./simulaid_mod.f
> Driving: gfortran -v -ffixed-form -o /home/dhurst/simulaid_20060125_suse10_gfortran_LSB32 ./simulaid_mod.f -lgfortranbegin -lgfortran -lm -shared-libgcc
> Using built-in specs.
> Target: i586-suse-linux
> Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib --enable-languages=c,c++,objc,f95,java,ada --disable-checking --with-gxx-include-dir=/usr/include/c++/4.0.2 --enable-java-awt=gtk --disable-libjava-multilib --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit --without-system-libunwind --host=i586-suse-linux
> Thread model: posix
> gcc version 4.0.2 20050901 (prerelease) (SUSE Linux)
Well, the above would indicate you are using the gcc version of fortan..
> /usr/lib/gcc/i586-suse-linux/4.0.2/f951 ./simulaid_mod.f -ffixed-form -quiet -dumpbase simulaid_mod.f -mtune=pentium -auxbase simulaid_mod -version -ffixed-form -o /tmp/ccU1YeL6.s
> GNU F95 version 4.0.2 20050901 (prerelease) (SUSE Linux) (i586-suse-linux)
> compiled by GNU C version 4.0.2 20050901 (prerelease) (SUSE Linux).
> GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
> /usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/bin/as -V -Qy -o /tmp/ccnmPhGb.o /tmp/ccU1YeL6.s
> GNU assembler version 2.16.91.0.2 (i586-suse-linux) using BFD version 2.16.91.0.2 20050720 (SuSE Linux)
> /usr/lib/gcc/i586-suse-linux/4.0.2/collect2 --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o /home/dhurst/simulaid_20060125_suse10_gfortran_LSB32 /usr/lib/gcc/i586-suse-linux/4.0.2/../../../crt1.o /usr/lib/gcc/i586-suse-linux/4.0.2/../../../crti.o /usr/lib/gcc/i586-suse-linux/4.0.2/crtbegin.o -L/usr/lib/gcc/i586-suse-linux/4.0.2 -L/usr/lib/gcc/i586-suse-linux/4.0.2 -L/usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/lib -L/usr/lib/gcc/i586-suse-linux/4.0.2/../../.. /tmp/ccnmPhGb.o -lgfortranbegin -lgfortran -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/i586-suse-linux/4.0.2/crtend.o /usr/lib/gcc/i586-suse-linux/4.0.2/../../../crtn.o
> /tmp/ccnmPhGb.o: In function `datprt_':
> simulaid_mod.f:(.text+0x9a226): undefined reference to `fdate_'
> collect2: ld returned 1 exit status
Look in simulaid_mod.f for 'fdate_' Apparently, a library has changed
and fdate_ has either been removed, replaced, or renamed.
Also, make sure you're working from clean source. That is there aren't
any leftover object files hanging around from a previous compile.
Not much on google on this. :( There are references to using fdate_() or
fdate() depending on different compilers. As a shot in the dark, you
might try changing fdate_ in the source code to fdate and see if that
makes any difference. I doubt it will... :(
OR, try changing fdate_ to fdate__ Just found the following reference:
(*) C functions callable from Fortran. Most fortran compilers add
a trailing underscore to the routine name, use in this case
fdate_.c, etc. g77 needs two of them if the routine name already
contains an underscore.
In case of trouble, use the corresponding fortran dummy
routines and debug the C routines separately.
--
Until later, Geoffrey
War never solved anything, well, except slavery, fascism and communism
More information about the Ale
mailing list