Are you by any chance using g95,
which is only capable of generating
32 bit binaries as far as I can tell.
We have build on snow leopard using gfortran,
however.
=Dennis Heimbigner
Ian Harris wrote:
Hi
Has anyone successfully built NetCDF 4 as 64-bit, on a Mac Pro with Snow
Leopard and the 64-bit kernel enabled?
I'm hitting problems with the F77 interface, i think. I've set all
compiler flags I can find to '-m64' (just using GNU/free compilers, no
Absoft etc).
Configure line:
ianharris% arch -arch x86_64 ./configure --with-hdf5=/usr/local
--with-zlib=/usr/local --with-szlib=/usr/local --prefix=/usr/local
--disable-f90 --enable-netcdf-4 --enable-64bit
(I have tried it with and without the 'arch' prefix, it doesn't seem to
help)
If I specify G77 as the compiler, it doesn't seem to like the -m64 option:
:
checking for C-equivalent to Fortran routine "SUB"... configure: error:
Could not compile conftest.f
:
If, on the other hand, I specify gfortran, it compiles the tests but
then fails thusly:
:
checking if Fortran "byte" is C "signed char"... configure: error: Could
not link conftestf.o and conftest.o
:
I modded configure so it didn't delete those two files.. this is the
real problem I think:
:
ianharris% file conftestf.o conftest.o
conftestf.o: Mach-O 64-bit object ppc64
conftest.o: Mach-O 64-bit object x86_64
:
In the config.log file, this is the relevant bit (I think):
:
configure:24126: checking for C-equivalent to Fortran routine "SUB"
configure:24133: /usr/local/bin/gfortran -c -m64 conftest.f
configure:24136: $? = 0
configure:24148: result: sub_
configure:24170: checking for Fortran "byte"
configure:24178: /usr/local/bin/gfortran -c -m64 conftest.f
configure:24181: $? = 0
configure:24183: result: yes
configure:24201: checking for Fortran "integer*2"
configure:24209: /usr/local/bin/gfortran -c -m64 conftest.f
configure:24212: $? = 0
configure:24214: result: yes
configure:24241: checking if Fortran "byte" is C "signed char"
configure:24251: cc -c -m64 -m64 conftest.c
conftest.c: In function 'sub_':
conftest.c:4: warning: incompatible implicit declaration of built-in
function 'exit'
configure:24254: $? = 0
configure:24257: /usr/local/bin/gfortran -m64 -c conftestf.f
configure:24260: $? = 0
configure:24263: /usr/local/bin/gfortran -o conftest -m64 conftestf.o
conftest.o
ld: warning: in /usr/lib/crt1.10.5.o, missing required architecture
ppc64 in file
ld: warning: in conftest.o, file is not of required architecture
ld: warning: in /usr/lib/libSystemStubs.a, missing required architecture
ppc64 in file
ld: warning: in /usr/lib/libSystem.dylib, missing required architecture
ppc64 in file
ld: in /usr/lib/libSystem.B.dylib, missing required architecture ppc64
in file
collect2: ld returned 1 exit status
configure:24266: $? = 1
configure:24289: error: Could not link conftestf.o and conftest.o
:
Now, this really isn't my area of expertise (um, as keen blogwatchers
will know ;) but it looks to me as though gfortran isn't working as a
64-bit compiler?
All compilers and supporting externals were built with the 64-bit kernel
installed and compiler env variables set '-m64'. As far as I know.
If anyone has any suggestions.. that would be just great!
Cheers
Harry
Ian "Harry" Harris
Climatic Research Unit
School of Environmental Sciences
University of East Anglia
Norwich NR4 7TJ
United Kingdom
IMPORTANT NOTICE - This email is intended for the named recipient only.
It may contain privileged and confidential information. If you are not
the intended recipient, notify the sender immediately and destroy this
email. You must not copy, distribute or take action in reliance upon it.
Whilst all efforts are made to safeguard emails, The School of
Environmental Sciences cannot guarantee that attachments are virus free
or compatible with your systems and does not accept liability in respect
of viruses or computer problems experienced.
_______________________________________________
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit:
http://www.unidata.ucar.edu/mailing_lists/