[Octopus-users] Problems with fftw3 and pgf90
Miguel Marques
marques at teor.fis.uc.pt
Wed Apr 20 10:16:49 WEST 2005
Hi
> please find attached the config.log and congigure.output files.
> There are a series of errors documented in these files but I am
> unfortunately unable to make something out of these reports and
> solve the problem. I would highly appreciate any help.
> Thanks in advance for your efforts.
Your program is, as I expected, related to a bug in autoconf. Let me
explain it. When you configure fftw (or octopus), autoconf tries to find
out which libraries are included by default by your fortran compiler.
Unfortunately, this test sometimes gives problems. For example, in your
case it finds
FLIBS=-lm' -L/global/software/pgi-5.2-2/linux86/5.2/lib -L/usr/lib -
L/usr/lib/gcc-lib/i386-redhat-linux/3.2.2 -lm -lpgftnrtl -lnspgc -lpgc
You notice the "'" after the -lm? This is your problem! then autoconf
will try to figure out how to link fortran files from C, so he will try
to do something like
cc conftest.c -o conftest $(FLIBS)
which then complains that library -lm' does not exist (of course). The
way around it is to do (in bash)
./configure FLIBS='-lm -L/global/software/pgi-5.2-2/linux86/5.2/lib -
L/usr/lib -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.2 -lm -lpgftnrtl -
lnspgc -lpgc'
or maybe (I am not sure which is the correct way)
export FLIBS='-lm -L/global/software/pgi-5.2-2/linux86/5.2/lib -
L/usr/lib -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.2 -lm -lpgftnrtl -
lnspgc -lpgc'
./configure
in this way autoconf will trust us for the value of FLIBS and will not
try to sort it out by itself.
Note that this workaround is needed for a lot of versions of autoconf,
and for several different fortran compilers (like the ifc).
cheers,
miguel
More information about the Octopus-users
mailing list