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

[netCDF #OHP-962143]: Problems installing netcdf-4.1 libraries



Hi Rob,

> Hey guys just some background on this issue I'm just a sys admin here at the 
> Canadian Ice Service and our modeling lab uses your libaries for compiling 
> with fortran I believe .. And we're having some issues after a move from 
> another server I believe another person had copied over the /netcdf/4.1 
> directory from the previous server and they are getting this error:
> 
> /usr/bin/ld: skipping incompatible /home/software/netcdf/4.1/lib/libnetcdf.a 
> when searching for -lnetcdf
> /usr/bin/ld: cannot find -lnetcdf

Maybe the old library is for a 32-bit platform?  You could find out with
  $ file /home/software/netcdf/4.1/lib/libnetcdf.a
If it's just a 32-bit library, people could link to it with programs compiled
with -m32.

> So I'm trying now to recompile it from scratch..
> 
> It's a redhat 5.4 x86_64 bit linux machine, and trying to install into 
> /home/software/netcdf/4.1
> 
> I have pgi fortran installed into /home/software/pgi and they use the 64bit 
> compilers that's set in each users $path -- 
> /home/software/pgi/linux86-64/10.2/bin:

The Portland Group has some new tips for compiling netCDF-4 on various
platforms with various versions of their compilers:

  http://www.pgroup.com/resources/tips.htm#NETCDF

> Version file: 4.1

We released version 4.1 in February but withdrew it due to a bug in the netCDF-4
API that's fixed in the current release candidate version 4.1.1-rc2:

  ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.1.1-rc2.tar.gz

which may become a released version 4.1.1 soon.  You can

Since you're using --disable-netcdf-4, you may also be able to use the earlier
released version 4.0.1:

  ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf.tar.gz

if you don't want a release candidate.

> Command I'm running:
> 
> ./configure --prefix=/home/software/netcdf/4.1 --disable-netcdf-4 
> --disable-dap
> 
> 
> The problem seems to be when I m
> 
> 
> 
> So where it fails is make check install,
> 
> 
> address@hidden netcdf-4.1]# make check install
> Making check in f90
> make[1]: Entering directory 
> `/home/software/netcdf_install/netcdf/netcdf-4.1/f90'
> make  check-am
> make[2]: Entering directory 
> `/home/software/netcdf_install/netcdf/netcdf-4.1/f90'
> make[2]: Nothing to be done for `check-am'.
> make[2]: Leaving directory 
> `/home/software/netcdf_install/netcdf/netcdf-4.1/f90'
> make[1]: Leaving directory 
> `/home/software/netcdf_install/netcdf/netcdf-4.1/f90'
> Making check in fortran
> make[1]: Entering directory 
> `/home/software/netcdf_install/netcdf/netcdf-4.1/fortran'
> make  check-am
> make[2]: Entering directory 
> `/home/software/netcdf_install/netcdf/netcdf-4.1/fortran'
> depbase=`echo fort-attio.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
> /bin/sh ../libtool --tag=CC   --mode=compile cc -DHAVE_CONFIG_H -I. -I..      
>    -I../libsrc     -g -O2 -MT fort-attio.lo -MD -MP -MF $depbase.Tpo -c -o 
> fort-attio.lo fort-attio.c &&\
> mv -f $depbase.Tpo $depbase.Plo
> libtool: compile:  cc -DHAVE_CONFIG_H -I. -I.. -I../libsrc -g -O2 -MT 
> fort-attio.lo -MD -MP -MF .deps/fort-attio.Tpo -c fort-attio.c -o fort-attio.o
> In file included from fort-attio.c:7:
> ncfortran.h:26:42: error: NF_INT_IS_C_... not defined: No such file or 
> directory

Dis you set the environment variable CPPFLAGS  to "-DpgiFortran" before 
invoking 
the configure script?  I think that's necessary for pgfortran.

> fort-attio.c: In function ÃNF_INT_cfFÃ:
> fort-attio.c:13: error: expected declaration specifiers before ÃNF_INTEGERÃ
> fort-attio.c:20: error: expected Ã=Ã, Ã,Ã, Ã;Ã, Ãasmà or 
> Ã__attribute__Ã before ÃNF_INTEGERÃ
> fort-attio.c:121: error: expected Ã=Ã, Ã,Ã, Ã;Ã, Ãasmà or 
> Ã__attribute__Ã before ÃNF_INTEGERÃ
> fort-attio.c:133: error: expected Ã=Ã, Ã,Ã, Ã;Ã, Ãasmà or 
> Ã__attribute__Ã before ÃNF_INTEGERÃ
> fort-attio.c:141: error: expected Ã=Ã, Ã,Ã, Ã;Ã, Ãasmà or 
> Ã__attribute__Ã before ÃNF_INTEGERÃ
> fort-attio.c:148: error: expected Ã=Ã, Ã,Ã, Ã;Ã, Ãasmà or 
> Ã__attribute__Ã before ÃNF_INTEGERÃ
> fort-attio.c:148: error: expected Ã{Ã at end of input
> make[2]: *** [fort-attio.lo] Error 1
> make[2]: Leaving directory 
> `/home/software/netcdf_install/netcdf/netcdf-4.1/fortran'
> make[1]: *** [check] Error 2
> make[1]: Leaving directory 
> `/home/software/netcdf_install/netcdf/netcdf-4.1/fortran'
> make: *** [check-recursive] Error 1
> 
> 
> 
> Here is my configure :
> ================
> 
> configure: netCDF 4.1
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... x86_64-unknown-linux-gnu
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p... /bin/mkdir -p
> 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 if Fortran "byte" is C "signed char"... no
> checking if Fortran "byte" is C "short"... no
> checking if Fortran "byte" is C "int"... no
> checking if Fortran "byte" is C "long"... no
> checking if Fortran "integer*2" is C "short"... no
> checking if Fortran "integer*2" is C "int"... no
> checking if Fortran "integer*2" is C "long"... no
> checking if Fortran "integer" is C "int"... no
> checking if Fortran "integer" is C "long"... no
> checking if Fortran "real" is C "float"... no
> checking if Fortran "real" is C "double"... no
> checking if Fortran "doubleprecision" is C "double"... no
> checking if Fortran "doubleprecision" is C "float"... no

The fact that all those answers came out "no" means something is seriously 
wrong with
the Fortran compiler installation, and explains why the initial "make check" 
failed
in compiling the netCDF f90 interface.  If you look in config.log around where 
pgf95
was invoked to run those checks, it may provide the answer.

--Russ


Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: OHP-962143
Department: Support netCDF
Priority: Normal
Status: Closed


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.