[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #KKJ-168057]: Intel macbook pro with Snow Leopard



> forgot to override g95.  Here is the same error with fortran set to
> gfortran:
> 
> -Roy
> 
> [homework:/netcdf4Static/netcdf-4.1-snapshot2009110300] rmendels%
> setenv F77 /sw/bin/gfortran
> [homework:/netcdf4Static/netcdf-4.1-snapshot2009110300] rmendels%
> setenv FC /sw/bin/gfortran
> [homework:/netcdf4Static/netcdf-4.1-snapshot2009110300] rmendels%
> setenv F90 /sw/bin/gfortran
> [homework:/netcdf4Static/netcdf-4.1-snapshot2009110300] rmendels% ./
> configure --prefix=/netcdf4Static/local --with-szlib=/netcdf4Static/
> local --with-zlib=/netcdf4Static/local --with-hdf5=/netcdf4Static/
> local    --enable-dap  --enable-dap-remote-tests --enable-netcdf-4  --
> enable-ncgen4 --with-libcf  --enable-udunits
> configure: netCDF 4.1-snapshot2009110300
> checking build system type... i386-apple-darwin10.0.0
> checking host system type... i386-apple-darwin10.0.0
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p... ./install-sh -c -d
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> configure: checking user options
> checking whether CXX is set to ''... no
> checking whether FC is set to ''... no
> checking whether F90 is set to ''... no
> checking whether a NCIO_MINBLOCKSIZE was specified... 256
> checking whether udunits is to be built... no
> checking if experimental fsync support is enabled... no
> checking whether extra valgrind tests should be run... no
> checking whether libcf is to be built... yes
> checking whether reading of HDF4 SD files is to be enabled... no
> checking whether to fetch some sample HDF4 files from Unidata ftp site
> to test HDF4 reading (requires wget)... no
> checking whether parallel I/O for classic and 64-bit offset files
> using parallel-netcdf is to be enabled... no
> checking whether a location for the parallel-netcdf library was
> specified... no
> checking whether new netCDF-4 C++ API is to be built... no
> checking whether HDF5 should do data conversions... no
> checking whether extra example tests should be run... no
> checking whether parallel IO tests should be run... no
> checking whether a location for the HDF5 library was specified... /
> netcdf4Static/local
> checking whether a location for the ZLIB library was specified... /
> netcdf4Static/local
> checking whether a location for the SZLIB library was specified... /
> netcdf4Static/local
> checking whether a location for the HDF4 library was specified...
> checking whether a default cache size for HDF5 was specified... 32000000
> checking whether a default cache maximum number of elements for HDF5
> was specified... 1000
> checking whether a default cache preemption for HDF5 was specified...
> 0.75
> checking whether netCDF-4 logging is enabled... no
> checking whether a path for curl-config was specified... no
> checking whether a location for curl installation was specified... no
> configure: checking whether a location for curl-config is in PATH... yes
> checking whether DAP client is to be built... yes
> checking whether dap remote testing should be enabled (default on)...
<snip>
> checking for /usr/bin/nm... /usr/bin/nm
> checking nm flags...
> checking for C-equivalent to Fortran routine "SUB"... sub_
> checking for Fortran "byte"... yes
> checking for Fortran "integer*2"... yes
> checking if Fortran "byte" is C "signed char"... configure: error:
> Could not link conftestf.o and conftest.o
> 
>

Howdy Roy!

Are you still having this problem?

Usually this is caused by the fortran and C compilers building in different 
modes, 32 vs. 64. GNU compilers, for example, default to 64 where possible, 
commercial fortran and g95 prefer 32 bit always.

But in all cases there is a command line option to change things. For gcc, for 
example, you can set CFLAGS='-m32' to get a 32-bit build.

So look in your config.log and find the error message "Could not link 
conftestf.o and conftest.o". There you will see the compiler error that occured 
when the configure script tried to link object files, one produced by the C 
compiler, and one by the fortran compiler.

Then set the appropriate flags before rerunning configure, either CFLAGS to 
change the C compiler behaviour, or else FCFLAGS to change the fortran compiler 
behaviour. (And you may need to set CXXFLAGS to whatever you set CFLAGS to, to 
get the C++ API to work, or else build with --disable-cxx.)

Let me know if this doesn't help!

Ed

Ticket Details
===================
Ticket ID: KKJ-168057
Department: Support netCDF
Priority: Critical
Status: Closed