[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Support #STV-915256]: Problems building netcdf
- Subject: [Support #STV-915256]: Problems building netcdf
- Date: Tue, 13 Apr 2010 09:09:56 -0600
Hi Peer,
> I'm currently trying to build netcdf 3.6.3
> on our HPC cluster. We are running SLES10SP2 (x86_64).
> The build worked without any problems for the gcc and gfortran.
>
> But for the sun compiler (sun studio 12.1) the fortran interfaces
> seems to be missing.
> The build is working without any faults.
> Running the test (make check) shows
> test_get.o: In function `test_nf_get_var1_text_':
>
>
> test_get.F:(.text+0x35): undefined reference to `nf_open_'
>
>
> test_get.F:(.text+0x103): undefined reference to `nf_get_var1_text_'
>
> All the nf_ stuff is missing.
>
> I'll set the following env.:
> xport CPPFLAGS="-Df2cFortran -D__FUNCTION__=__func__ -DsunFortran"
> export CC=suncc
> export FC=sunf90
> export F90=sunf90
> export CXX=sunCC
> export CFLAGS=-fast
> export FFLAGS="-dalign -fast"
> export FCFLAGS="-dalign -fast"
> ./configure --enable-shared --enable-separate-fortran
> --prefix=/usr/local/apps/netcdf/3.6.3_sun
>
> The rest is working well - any idea ?
I suspect having both -Df2cFortran and -DsunFortran included in the
CPPFLAGS is a problem, as these indicate different, and possibly
conflicting, conventions for calling C functions from Fortran.
A report from a user of a build that works for Sun Studio 12 compilers
for netCDF-4.1 is here:
http://www.unidata.ucar.edu/netcdf/docs/other-builds.html#sunstud
Note that if you get the latest source version 4.1.1
ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.1.1.tar.gz
and build it on a platform that has no HDF5 library installed or by
explicitly specifying "--disable-netcdf-4", then it will build just
the netCDF-3 APIs, such as were provided in version 3.6.3. Several
bugs have been fixed since the release of 3.6.3, and there have also
been some portability fixes, so it may work better for you.
Please let us know if the above ideas don't solve the problem.
--Russ
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
Ticket Details
===================
Ticket ID: STV-915256
Department: Support netCDF
Priority: Normal
Status: Closed