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

[netCDF #QKE-142574]: Problem Building Netcdf to support HDF4



Hi Melissa,

My apologies for the delayed response; I am at a workshop this week.    

From the test-suite.log file you sent, I see the following unusual thing:

````
FAIL: run_tests.sh
==================
*** Testing ncgen and ncdump using some test CDL files.
*** creating tst_small.nc from ref_tst_small.cdl...
*** creating tst_small.cdl from tst_small.nc...
./run_tests.sh: line 17: tst_small.cdl: Permission denied
FAIL run_tests.sh (exit status: 1)
````

This is not hdf4 specific, but it suggests that you are running make check 
inside a directory that you do not have permission to write to, for one reason 
or another.  This often happens if somebody runs 'sudo make' or otherwise had 
used 'sudo' to gain elevated permissions during a previous 
configure/build/compile step.  For this reason, we suggest that people only use 
`sudo` when running `make install`, and only then if it is required for access 
to the target installation directory.  Whatever the cause of this issue, it 
suggests that there is a larger issue we need to solve before addressing hdf4 
specifically. With any luck, however, fixing this will fix the hdf4 issue.

I would suggest starting with a completely fresh version of the netcdf source 
directory, and work without using `sudo`.  Once you have done this, run 
`configure` as you previously had.  When this is done, can you please send me 
the `config.log` file that is generated?  Also, if you can then run `make` and 
`make check` (as separate commands, don't just run 'make check') and then send 
the test-suite.log file found in the nc_test4/ directory?  This will be the 
easiest way to look at what happens when the hdf4 tests are run.  If they are 
not run, then there is indeed an issue with netcdf trying to incorporate hdf4 
support; it won't have even tried if it hasn't run the tests.  If it has run 
the tests and they've clearly failed, that is a clear error.  Otherwise, it 
suggests there may be a problem getting the NCO tools to link against the 
proper version of the netCDF library.

Thanks! Sorry again for the delayed response,

-Ward



> Hello,
> 
> I wanted to update my previous e-mail for when you get a chance to reply.
> I've been able to get make and make check to run smoothly, but when I run
> make install, netcdf still doesn't end up supporting HDF4 even though it
> says it will do so after the ./configure stage. The only warning I get
> during install that seems potentially significant is this:
> 
> */Users/melissalopalo/anaconda/lib/python2.7/site-packages/hdf-4.2.12/include/hdf.h:106:9:
> **warning: *
> 
> *      'STREQ' macro redefined [-Wmacro-redefined]*
> 
> #define STREQ(s, t) (HDstrcmp((s), (t)) == 0)
> 
> 
> Thanks!
> 
> Melissa
> 
> address@hidden> wrote:
> 
> > Good morning,
> >
> > I'd like to use Netcdf (ultimately, the nco utilities) to read HDF4 files
> > with MODIS satellite data (https://ladsweb.modaps.eosdis.nasa.gov/search/),
> > but I'm having trouble getting NCO to read the HDF files.
> >
> > I followed these instructions for building NetCDF (version 4.4.1.1) with
> > HDF4 support: http://www.unidata.ucar.edu/software/netcdf/docs/
> > getting_and_building_netcdf.html
> >
> > When I ran the configure commands, it seemed to work, although make check
> > produced some errors with ncdump (see attached log file). I'm not sure if
> > this problem is related or not; ultimately I want to convert my HDF file to
> > NetCDF using "ncks --hdf4 file.hdf file.nc". Currently this command
> > produces the error "NetCDF: Unknown file format"
> >
> > I'd appreciate any help with converting these files!
> >
> > Thanks,
> > Melissa LoPalo
> > Ph.D Student
> > Department of Economics
> > The University of Texas at Austin
> >
> 
> 


Ticket Details
===================
Ticket ID: QKE-142574
Department: Support netCDF
Priority: High
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.