Page 1 of 1

checking if Fortran "real" is C "float"... configure: error

Posted: Sun Aug 14, 2011 5:16 am
by annacegu
Hi,

I am on a MacBook Pro, with OS X 10.7 lion.

I am trying to compile abinit using gcc/g++/gfortran 4.5.3, installed from macports. I was not able to install gcc 4.6 due to a bug in the apple linker.

I am getting the following error while netCDF is configuring:

Code: Select all

checking if Fortran "real" is C "float"... configure: error: Could not compile conftest.c


Your help would be very much appreciated - if you need further details please let me know.

Regards,
Anna.

Re: checking if Fortran "real" is C "float"... configure: er

Posted: Sun Aug 14, 2011 8:46 pm
by jbeuken
Hello,
I am getting the following error while netCDF is configuring:
checking if Fortran "real" is C "float"... configure: error: Could not compile conftest.c

we need the 'plugins/netcdf/netcdf-4.1.1/config.log' file to understand the problem

another solution :

there is a port for netcdf 4.1.3 ( variant gcc 4.5 ) ( http://www.macports.org/ports.php?by=name&substr=netcdf )

and you can use these two options in the configure :

Code: Select all

with_netcdf_libs = -L/opt/local/netcdf/lib -lnetcdf
with_netcdf_incs = -I/opt/local/netcdf/include


( to verify the location of the installation of netcdf library )

regards
jmb

Re: checking if Fortran "real" is C "float"... configure: er

Posted: Mon Aug 15, 2011 12:18 pm
by annacegu
Hi jmb,

Thanks, that did the trick (when I put the directory /opt/local/include & /opt/local/lib). I am now. however, running into the following problem:

Code: Select all

/var/folders/bl/8wb0ry9x00g8k6v3l9z293r80000gp/T//ccutkXba.s:39:no such instruction: `vmovsd 8(%rdi), %xmm5'

This goes on for many lines. Would you know what is causing this particular issue?

Thanks,
Anna.

Re: checking if Fortran "real" is C "float"... configure: er

Posted: Mon Aug 15, 2011 8:54 pm
by jbeuken
Hello Anna,

some questions to clear the problem :

which version of abinit ?
which configure command are you using ?

can you send me the config.log ?
can you send me the results of these commands :

Code: Select all

env
gcc --version
gfortran --version


jmb

Re: checking if Fortran "real" is C "float"... configure: er

Posted: Tue Aug 16, 2011 1:31 am
by annacegu
Hi jmb,

To answer your questions:

1) abinit-6.6.1_invKS, a modified version from http://www.princeton.edu/mae/people/fac ... otentials/
2) ../abinit-6.6.1_invKS/configure --with-fallbacks-tardir=/Users/anna/Documents/anna/1projects/simulation/PROFESS/abinit-tarballs --with-dft-flavor=none --with-trio-flavor=none --with-netcdf-libs="-L/opt/local/lib -lnetcdf" --with-netcdf-inc="-I/opt/local/include" > out.txt 2>&1
3) config.log attached
4)

Code: Select all

MANPATH=/sw3/share/man:/opt/local/man::/sw3/lib/perl5/5.12.3/man:/usr/X11R6/man
TERM_PROGRAM=Apple_Terminal
TERM=xterm-256color
SHELL=/bin/bash
TMPDIR=/var/folders/bl/8wb0ry9x00g8k6v3l9z293r80000gp/T/
PERL5LIB=/sw3/lib/perl5:/sw3/lib/perl5/darwin
Apple_PubSub_Socket_Render=/tmp/launch-V9BHN4/Render
TERM_PROGRAM_VERSION=297
TERM_SESSION_ID=2975E5C0-B953-4DEB-9DDF-3C662A0A4E0D
USER=anna
COMMAND_MODE=unix2003
SSH_AUTH_SOCK=/tmp/launch-YMzrPu/Listeners
__CF_USER_TEXT_ENCODING=0x1F6:0:0
PATH=/sw3/bin:/sw3/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/X11R6/bin
PWD=/Users/anna/Documents/anna/1projects/simulation/PROFESS/abinit-6.6.1_invKS
LANG=en_AU.UTF-8
SHLVL=1
HOME=/Users/anna
LOGNAME=anna
INFOPATH=/sw3/share/info:/sw3/info:/usr/share/info
DISPLAY=/tmp/launch-D81DPe/org.x:0
GL_ENABLE_DEBUG_ATTACH=YES
SECURITYSESSIONID=186a5
_=/usr/bin/env
OLDPWD=/opt/local/var/macports/sources/rsync.macports.org/release/ports


gcc --version
gcc (GCC) 4.5.3
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


gfortran --version
GNU Fortran (GCC) 4.5.3
Copyright (C) 2010 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING



Thanks,
Anna

Re: checking if Fortran "real" is C "float"... configure: er

Posted: Tue Aug 16, 2011 8:57 pm
by jbeuken
Hello Anna,

little problem in your configure command : use "--with-netcdf-incs="-I/opt/local/include" ( with 's' in "incs" )
nothing stange in the env or in the config.log :roll:

Code: Select all

/var/folders/bl/8wb0ry9x00g8k6v3l9z293r80000gp/T//ccutkXba.s:39:no such instruction: `vmovsd 8(%rdi), %xmm5'

I suppose that this error appears during make ?
if yes , in which part ?
can you send me the "make.log" ( make > make.log 2>&1 )

jmb

Re: checking if Fortran "real" is C "float"... configure: er

Posted: Wed Aug 17, 2011 4:23 am
by annacegu
Hi jmb,

Thanks for the correction.

Yes this error happens during make. It occurs during the first file being compiled. Please find the make.log attached.

Regards,
Anna.

Re: checking if Fortran "real" is C "float"... configure: er

Posted: Thu Aug 18, 2011 2:34 pm
by jbeuken
Hello Anna,

I suspect a problem of architecture (32bit vs 64bit)

can you use this configure command with the 64bit enabled ( and a additionnal lib with netcdf option ( netcdff = netcdf for fortran ) ) :

Code: Select all

../abinit-6.6.1_invKS/configure  \
--with-fallbacks-tardir=/Users/anna/Documents/anna/1projects/simulation/PROFESS/abinit-tarballs \
--with-dft-flavor=none --with-trio-flavor=none \
--with-netcdf-libs=-L/opt/local/lib -lnetcdf -lnetcdff --with-netcdf-incs=-I/opt/local/include \
--enable-64bit-flags \
--enable-debug=no  --enable-optim=aggressive \
CC=/opt/local/bin/gcc  \
FC=/opt/local/bin/gfortran \
CXX=/opt/local/bin/g++ \
CPP=/opt/local/bin/cpp \
FPP=/opt/local/bin/cpp


regards

jmb

Re: checking if Fortran "real" is C "float"... configure: er

Posted: Fri Aug 19, 2011 4:30 am
by annacegu
Hi jmb,

I tried what you suggested, and I'm still getting the same errors...

What do you suggest I try next? Should I also try the gcc mailing list as well?

Thanks and regards,
Anna.

Re: checking if Fortran "real" is C "float"... configure: er

Posted: Fri Aug 19, 2011 6:07 am
by annacegu
Hi,

I also tried downloading 6.6.3, and compile against gcc4.4. configure completed successfully, but I am still getting the "no such instruction" error when using make.

Regards,
Anna.

Re: checking if Fortran "real" is C "float"... configure: er

Posted: Fri Sep 02, 2011 5:27 am
by annacegu
Hi,

After posting to the gcc mailing list, apparently this error is popping up because my assembler is out of date compared to the one required by gfortran44 or 45.

So I tried compiling on one of our clusters here, using ifort. I am now getting the following error during linking:

Code: Select all

../../src/95_drive/lib95_drive.a(driver.o): In function `driver_':
driver.F90:(.text+0x3040): undefined reference to `nonlinear_'
driver.F90:(.text+0x3141): undefined reference to `sigma_'
driver.F90:(.text+0x3227): undefined reference to `screening_'
driver.F90:(.text+0x3443): undefined reference to `respfn_'
../../src/95_drive/lib95_drive.a(gstateimg.o): In function `gstateimg_':
gstateimg.F90:(.text+0x2175): undefined reference to `gstate_'
../../src/95_drive/lib95_drive.a(gw_driver.o): In function `gw_driver_':
gw_driver.F90:(.text+0xb51): undefined reference to `sigma_'
gw_driver.F90:(.text+0x2313): undefined reference to `screening_'


Would anyone have ideas on what is causing this error?

Thanks and regards,
Anna.