[gdal-dev] netcdf option build error

William Kyngesburye woklist at kyngchaos.com
Tue Apr 29 16:39:14 EDT 2008


On Apr 29, 2008, at 2:36 PM, Jeshua Lacock wrote:

>
> On Apr 29, 2008, at 1:23 PM, William Kyngesburye wrote:
>
>> I looked thru my notes on HDF4 to see if there was anything else.   
>> Are you compiling on Intel OSX?  There is a small endian issue in  
>> HDF4 for Intel OSX where it will define the constants as bigendian,  
>> but only for 32bit OSX.  In hconv.h, line 66, none of the tested  
>> machine values match OSX Intel (__i386 or __i386__), so OSX Intel  
>> gets caught as bigendian.
>
> Yes; I am currently doing our Intel build.
>
You should probably add __i386__ to the define tests here.

>> I don't know if this is enough to affect the definition of  
>> MAX_VAR_DIMS or not.  I do see that MAX_VAR_DIMS is a backward- 
>> compatibility define for Netcdf v2 - netcdf.h lines 912+.  The  
>> modern version is NC_MAX_VAR_DIMS.  Did you use --disable-v2 when  
>> configuring netcdf?
>
> No I did not try disable-v2, do you think I should?
>
No - the GDAL HDF4 driver is expecting the v2 name.

> Thanks for your help - if you are interested, I would be happy to  
> pay you to SSH in and take a look...


It's a hobby for me.  And all I can offer is what I've found that  
works for me, I don't know if poking around in your setup will help.

Note: I've been *slowly* updating my build instructions on my site,  
but I haven't gotten to the GIS stuff yet.  Here's a quick-n-dirty  
summary of the relevant bits to your problem (assuming everything  
needed in /usr/local, otherwise a lot of --with options needed):

- netcdf

./configure --disable-f77 --disable-cxx --disable-examples --disable- 
dependency-tracking --disable-utilities

- HDF4 4.2r2

hconv.h: apply the endian patch

./configure --disable-fortran --disable-dependency-tracking --disable- 
netcdf

- GDAL (fill in other options you need):

./configure --with-threads --without-grass --with-netcdf=/usr/local -- 
with-hdf4=/usr/local


-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"Time is an illusion - lunchtime doubly so."

- Ford Prefect




More information about the gdal-dev mailing list