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

[netCDF #CPW-270700]: compile error



Bin,

> I already put $CPPFLAGS and $LDFLAGS in the environment variable:
> address@hidden% echo $CPPFLAGS
> -I/home/btan/sc1/HDF5/include -I/home/btan/sc1/HDF4/include
> address@hidden% echo $LDFLAGS
> -L/home/btan/sc1/HDF5/lib -L/home/btan/sc1/HDF4/lib
> 
> 
> However, the program still compiled with old HDF5 libraries. Do you have any 
> idea what else I should revise?

If the old HDF5 libraries are installed in a location that is searched by 
default by the 
runtime linker ld.so, such as /usr/lib, then it may be necessary to set and 
export the
environment variable LD_LIBRARY_PATH to include the directory where the new HDF5
libraries are installed.

Occasionally, I have had to delete old installed shared libraries before I 
could get ld.so
to use a new library installed in a different place, though I'm not sure of the 
circumstances when that is necessary.  Check the ld.so man page documentation 
for
your Linux system to see if it has more about forcing the order in which 
installed
shared libraries are searched.

--Russ


> -----Original Message-----
> From: Tan, Bin (GSFC-619.0)[SIGMA SPACE CORPORATION]
> Sent: Wednesday, May 28, 2014 3:31 PM
> To: 'address@hidden'
> Subject: RE: [netCDF #CPW-270700]: compile error
> 
> Hi, Russ
> 
> Thanks for your reply. I installed latest version HDF5 and recompiled netcdf. 
> Now I got only two failed test:
> 
> FAIL: tst_h_scalar
> FAIL: tst_h_scalar.sh
> 
> 
> The test-suite.log reports the following info:
> 
> =========================================
> netCDF 4.3.2: ncdump/test-suite.log
> =========================================
> 
> # TOTAL: 39
> # PASS:  37
> # SKIP:  0
> # XFAIL: 0
> # FAIL:  2
> # XPASS: 0
> # ERROR: 0
> 
> .. contents:: :depth: 2
> 
> FAIL: tst_h_scalar
> ==================
> 
> HDF5-DIAG: Error detected in HDF5 (1.8.6) thread 0:
> #000: H5T.c line 1597 in H5Tcreate(): unable to create type
> major: Datatype
> minor: Unable to initialize object
> #001: H5T.c line 2985 in H5T_create(): type class is not appropriate - use 
> H5Tcopy()
> major: Datatype
> minor: Feature is unsupported
> 
> *** Create file with datasets & attributes that have scalar 
> dataspaces...Sorry! Unexpected result, tst_h_scalar.c, line: 123
> 
> FAIL: tst_h_scalar.sh
> =====================
> 
> 
> *** Running ncdump scalar test.
> 1a2,47
> > variables:
> >       string vstrvar1 ;
> >               string vstrvar1:vstratt1 = NIL ;
> >               string vstrvar1:vstratt2 = NIL ;
> >               string vstrvar1:vstratt3 = "" ;
> >               string vstrvar1:vstratt4 = "foo" ;
> >               vstrvar1:fstratt = "" ;
> >               vstrvar1:intatt = 0 ;
> >       string fstrvar ;
> >               string fstrvar:vstratt1 = NIL ;
> >               string fstrvar:vstratt2 = NIL ;
> >               string fstrvar:vstratt3 = "" ;
> >               string fstrvar:vstratt4 = "foo" ;
> >               fstrvar:fstratt = "" ;
> >               fstrvar:intatt = 0 ;
> >       int intvar ;
> >               string intvar:vstratt1 = NIL ;
> >               string intvar:vstratt2 = NIL ;
> >               string intvar:vstratt3 = "" ;
> >               string intvar:vstratt4 = "foo" ;
> >               intvar:fstratt = "" ;
> >               intvar:intatt = 0 ;
> >       string vstrvar2 ;
> >       string vstrvar3 ;
> >       string vstrvar4 ;
> >
> > // global attributes:
> >               string :vstratt1 = NIL ;
> >               string :vstratt2 = NIL ;
> >               string :vstratt3 = "" ;
> >               string :vstratt4 = "foo" ;
> >               :fstratt = "" ;
> >               :intatt = 0 ;
> > data:
> >
> >  vstrvar1 = NIL ;
> >
> >  fstrvar = _ ;
> >
> >  intvar = 0 ;
> >
> >  vstrvar2 = NIL ;
> >
> >  vstrvar3 = _ ;
> >
> >  vstrvar4 = "foo" ;
> 
> 
> 
> Do you have any idea what's going on? How can I get rid of these two fails?
> 
> Thanks!!
> 
> Bin
> -----Original Message-----
> From: Unidata netCDF Support [mailto:address@hidden]
> Sent: Wednesday, May 28, 2014 11:48 AM
> To: Tan, Bin (GSFC-619.0)[SIGMA SPACE CORPORATION]
> Cc: address@hidden
> Subject: [netCDF #CPW-270700]: compile error
> 
> Hi Bin,
> 
> > There are several hdf5 libraries installed in the Linux system . How could 
> > I let the NetCDF compiled with one set of hdf5 library?
> 
> If you are using configure to build the netCDF-C library from source, you 
> have to rebuild netCDF using the CPPFLAGS and LDFLAGS environment variables 
> (or configure flags) when you rerun configure.  For example
> 
> $ H5DIR=/your/path/to/hdf5
> $ CPPFLAGS="-I${H5DIR}/include"
> $ LDFLAGS="-L${H5DIR}/lib"
> $ ./configure --prefix= ...
> 
> Here's some documentation:
> 
> http://www.unidata.ucar.edu/netcdf/docs/getting_and_building_netcdf.html
> 
> --Russ
> 
> > > On May 27, 2014, at 16:43, "Unidata netCDF Support" <address@hidden> 
> > > wrote:
> > >
> > > Hi Bin,
> > >
> > >> I tried to build netcdf library with support of HDF 4 files.
> > >> Following the instruction on the webpage:
> > >> http://www.unidata.ucar.edu/software/netcdf/docs/getting_and_buildi
> > >> ng_netcdf.html#build_hdf4 I got the compiling error in make check
> > >> step. Here is the cotent of ncdump/test-suite.log:
> > >> =========================================
> > >> netCDF 4.3.2: ncdump/test-suite.log
> > >> =========================================
> > >>
> > >> # TOTAL: 39
> > >> # PASS:  36
> > >> # SKIP:  0
> > >> # XFAIL: 0
> > >> # FAIL:  3
> > >> # XPASS: 0
> > >> # ERROR: 0
> > >>
> > >> .. contents:: :depth: 2
> > >>
> > >> FAIL: tst_h_scalar
> > >> ==================
> > >>
> > >> HDF5-DIAG: Error detected in HDF5 (1.8.6) thread 0:
> > >> #000: H5T.c line 1597 in H5Tcreate(): unable to create type
> > >> major: Datatype
> > >> minor: Unable to initialize object
> > >> #001: H5T.c line 2985 in H5T_create(): type class is not
> > >> appropriate - use H5Tcopy()
> > >> major: Datatype
> > >> minor: Feature is unsupported
> > >>
> > >> *** Create file with datasets & attributes that have scalar
> > >> dataspaces...Sorry! Unexpected result, tst_h_scalar.c, line: 123
> > >>
> > >> FAIL: tst_h_scalar.sh
> > >> =====================
> > >
> > > You have to use a more recent version of HDF5, 1.8.8 or later, with
> > > netCDF
> > > 4.2 or later.
> > >
> > > There was a bug in HDF5-1.8.7 that we didn't test for in the
> > > corresponding netCDF version 4.1.3. Recent netCDF versions detect
> > > the HDF5 bug when built with HDF5-1.8.7 or earlier, but build fine with 
> > > HDF5 versions 1.8.8 and later.
> > > If you have to rebuild HDF5 from source anyway, I would recommend
> > > just using the latest version 1.8.13, as that's what we're testing with 
> > > now.
> > >
> > > We need to document more prominently that HDF5-1.8.7 and earlier
> > > don't work well with current versions of the netCDF C library.
> > >
> > > --Russ
> > >
> > > Russ Rew                                         UCAR Unidata Program
> > > address@hidden                      http://www.unidata.ucar.edu
> > >
> > >
> > >
> > > Ticket Details
> > > ===================
> > > Ticket ID: CPW-270700
> > > Department: Support netCDF
> > > Priority: Normal
> > > Status: Closed
> > >
> >
> >
> Russ Rew                                         UCAR Unidata Program
> address@hidden                      http://www.unidata.ucar.edu
> 
> 
> 
> Ticket Details
> ===================
> Ticket ID: CPW-270700
> Department: Support netCDF
> Priority: Normal
> Status: Closed
> 
> 

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



Ticket Details
===================
Ticket ID: CPW-270700
Department: Support netCDF
Priority: Normal
Status: Closed