Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Ramagounder_t_
Beginner
52 Views

Netcdf-4.3.0 Installation Compiler Error

#./configure --prefix=/app/netcdf-4.3.0 LDFLAGS="-L/app/hdf5-1.8.1/lib

While I was trying to install netcdf with hdf5 I am getting the following error message.

Stage 1 Error: c4var.c: In function 'nc_set_var_chunk_cache_ints':
nc4var.c:127: error: 'H5D_CHUNK_CACHE_NBYTES_DEFAULT' undeclared (first use inthis function)
nc4var.c:127: error: (Each undeclared identifier is reported only once
nc4var.c:127: error: for each function it appears in.)
nc4var.c:128: error: 'H5D_CHUNK_CACHE_NSLOTS_DEFAULT' undeclared (first use in this function)
nc4var.c:129: error: '' undeclared (first use in this function)
make[2]: *** [libnetcdf4_la-nc4var.lo] Error 1
make[2]: Leaving directory `/app/setups/netcdf-4.3.0/libsrc4'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/app/setups/netcdf-4.3.0'
make: *** [all] Error 2

Add the following line in c file(/app/setups/netcdf-4.3.0/libsrc4/nc4var.c). then the undeclared problem is resolved .
#define H5D_CHUNK_CACHE_NSLOTS_DEFAULT
#define H5D_CHUNK_CACHE_W0_DEFAULT
#define H5D_CHUNK_CACHE_W0_DEFAULT

 

Stage 2 Error : then, I am getting the following error message.

nc4var.c: In function 'nc_set_var_chunk_cache_ints':
nc4var.c:130: error: expected expression before ';' token
nc4var.c:131: error: expected expression before ';' token
nc4var.c:132: error: expected expression before ';' token
make[2]: *** [libnetcdf4_la-nc4var.lo] Error 1
make[2]: Leaving directory `/app/setups/netcdf-4.3.0/libsrc4'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/app/setups/netcdf-4.3.0'
make: *** [all] Error 2

After reading forum they suggest to remove ; from the define variable.

size_t real_size = H5D_CHUNK_CACHE_NBYTES_DEFAULT;
size_t real_nelems = H5D_CHUNK_CACHE_NSLOTS_DEFAULT;
float real_preemption = H5D_CHUNK_CACHE_W0_DEFAULT;

I removed. Then I am getting new error.

Stage 3 Error

nc4var.c: In function 'nc_set_var_chunk_cache_ints':
nc4var.c:131: error: expected expression before 'size_t'
nc4var.c:138: error: 'real_nelems' undeclared (first use in this function)
nc4var.c:138: error: (Each undeclared identifier is reported only once
nc4var.c:138: error: for each function it appears in.)
nc4var.c:141: error: 'real_preemption' undeclared (first use in this function)
make[2]: *** [libnetcdf4_la-nc4var.lo] Error 1
make[2]: Leaving directory `/app/setups/netcdf-4.3.0/libsrc4'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/app/setups/netcdf-4.3.0'
make: *** [all] Error 2

Could you help us to resolve the problem?

Thanks & Regards,
Vijay Kumar TP

 

0 Kudos
0 Replies
Reply