<div dir="ltr">OK, so I changed my mind and went ahead and installed libhdf4-alt-dev on the new box, to match the old, and rebuilt GDAL the same way.<div><br></div><div>Now everything matches.</div><div><br></div><div>The GDAL build is therefore silently behaving differently based on the presence or absence of HDF4.<br><div><br></div><div>Please advise of the actual dependencies and correct options here, as I will need to get this working in our production dependencies bundle build too.</div><div><br></div><div>Thanks!</div><div><br></div><div>Simon</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 9, 2021 at 11:32 AM Simon Eves <<a href="mailto:simon.eves@omnisci.com">simon.eves@omnisci.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I am trying to build GDAL 3.4.0 with "full" netCDF support, but getting different results on my two machines, both Ubuntu 20.04 with supposedly-the-same dev environment.<div><br></div><div>Both have the libnetcdf-dev (4.7.3) apt package installed, and both have working nc-config, which reports the same thing on both.</div><div><br></div><div>I am configuring GDAL as follows:</div><div><br></div><div>./configure --prefix=$PREFIX --without-geos --with-libkml=$PREFIX --with-proj=$PREFIX --with-libtiff=internal --with-geotiff=internal --with-netcdf=yes<br></div><div><br></div><div>Both configure logs attached.</div><div>____________________________________________________________________</div><div><br></div><div>OLD (works)</div><div><br></div><div>$ apt list --installed | egrep -i "hdf|cdf"<br>hdf5-helpers/focal,now 1.10.4+repack-11ubuntu1 amd64 [installed,automatic]<br>libhdf4-0-alt/focal,now 4.2.14-1ubuntu1 amd64 [installed,automatic]<br>libhdf4-alt-dev/focal,now 4.2.14-1ubuntu1 amd64 [installed,automatic]<br>libhdf5-103/focal,now 1.10.4+repack-11ubuntu1 amd64 [installed,automatic]<br>libhdf5-cpp-103/focal,now 1.10.4+repack-11ubuntu1 amd64 [installed,automatic]<br>libhdf5-dev/focal,now 1.10.4+repack-11ubuntu1 amd64 [installed,automatic]<br>libnetcdf-dev/focal,now 1:4.7.3-1 amd64 [installed,automatic]<br>libnetcdf15/focal,now 1:4.7.3-1 amd64 [installed,automatic]<br><div><br></div><div>$ gdalinfo --formats | egrep -i "hdf|cdf"<br>GMT -raster- (rw): GMT NetCDF Grid Format<br>netCDF -raster,multidimensional raster,vector- (rw+vs): Network Common Data Format<br>HDF4 -raster,multidimensional raster- (ros): Hierarchical Data Format Release 4<br>HDF4Image -raster- (rw+): HDF4 Dataset<br>HDF5 -raster,multidimensional raster- (rovs): Hierarchical Data Format Release 5<br>HDF5Image -raster- (rov): HDF5 Dataset<br></div><div><div><br></div><div>$ gdalinfo <a href="http://file.nc" target="_blank">file.nc</a> | head -1<br>Driver: netCDF/Network Common Data Format<br></div><div><br></div><div>File imports fine</div><div><div>____________________________________________________________________</div><div><br></div></div><div>NEW (problematic)</div><div><br></div><div>$ apt list --installed | egrep -i "hdf|cdf"<br>hdf5-helpers/focal,now 1.10.4+repack-11ubuntu1 amd64 [installed,automatic]<br>libhdf5-103/focal,now 1.10.4+repack-11ubuntu1 amd64 [installed,automatic]<br>libhdf5-cpp-103/focal,now 1.10.4+repack-11ubuntu1 amd64 [installed,automatic]<br>libhdf5-dev/focal,now 1.10.4+repack-11ubuntu1 amd64 [installed,automatic]<br>libnetcdf-dev/focal,now 1:4.7.3-1 amd64 [installed]<br>libnetcdf15/focal,now 1:4.7.3-1 amd64 [installed,automatic]<br></div><div><br></div><div>$ gdalinfo --formats | egrep -i "hdf|cdf"<br>GMT -raster- (rw): GMT NetCDF Grid Format<br>netCDF -raster,vector- (rw+s): Network Common Data Format<br>HDF5 -raster,multidimensional raster- (rovs): Hierarchical Data Format Release 5<br>HDF5Image -raster- (rov): HDF5 Dataset<br></div><div><br></div><div>$ gdalinfo <a href="http://file.nc" target="_blank">file.nc</a> | head -1<br>Driver: HDF5/Hierarchical Data Format Release 5<br></div><div><br></div><div>Some sub-datasets will not open</div><div><div>____________________________________________________________________</div><div><br></div></div><div>Note that the old machine already had HDR4 libs (and consequentially GDAL built with support for that too, even though I did not explicitly reqiuest HDF4 or HDF5 support in the configure), which may be the issue, although I am loath to just install HDF4 on the new (freshly built two weeks ago) machine if I don't need to.</div><div><br></div><div>On the old machine, gdalinfo reports the file as netCDF just fine, and the netCDF driver claims to have multi-dimensional support. The driver on the new one does not, and the file reports as plain HDF5, and some sub-datasets will not open (presumably multi-dimensional ones!)</div><div><br></div><div>I am failing to find anything in the docs about the dependency chain here, or anything about having to explicitly enable multi-dimensional support in the build.</div><div><br></div><div>I don't know if the netCDF file in question is public-domain, so I would rather not send it to you at this time. I can find out, if that would help, although I doubt the file itself is the issue.</div><div><br></div><div>Please advise. Thanks! :)</div><div><br></div><div>Simon</div><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div style="margin:0px;padding:0px 0px 20px;width:2544px;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:medium"><div><div style="font-size:12.8px;margin:8px 0px 0px;padding:0px"><div><div dir="ltr"><span><font color="#888888"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><table cellpadding="0" cellspacing="0" border="0" style="font-family:Times;width:2544px"><tbody><tr><td align="left" style="vertical-align:top;font-size:0px"><table cellpadding="0" cellspacing="0" border="0"><tbody><tr><td align="left" style="padding:0px 15px 0px 0px;vertical-align:middle"><font face="arial, helvetica, sans-serif" size="2"><a href="http://www.omnisci.com/" target="_blank"><img src="http://www2.omnisci.com/l/298412/2018-09-18/3sqpg/298412/61753/OmniSci_Email_Header2.png"></a><br></font></td><td align="left" style="padding:0px 0px 0px 15px;vertical-align:top"><table cellpadding="0" cellspacing="0" border="0" style="width:215px"><tbody><tr><td align="left" style="vertical-align:top"><span style="white-space:nowrap;color:rgb(0,0,1)"><span style="color:rgb(14,76,144);font-weight:700"><font face="arial, helvetica, sans-serif" size="2">Simon Eves</font></span></span></td></tr><tr><td align="left" style="vertical-align:top"><table cellpadding="0" cellspacing="0" border="0"><tbody><tr><td align="left" style="vertical-align:top"><span style="white-space:nowrap;color:rgb(0,0,1)"><font face="arial, helvetica, sans-serif" size="2">Senior Graphics Engineer, Rendering Group<br>100 Montgomery St (5th Floor), San Francisco, CA 94104, USA<br></font></span></td></tr></tbody></table></td></tr><tr><td align="left" style="vertical-align:top"><table cellpadding="0" cellspacing="0" border="0"><tbody><tr><td align="left" style="padding:0px;vertical-align:top"><br></td><td align="left" style="padding:0px;vertical-align:top"><br></td></tr><tr><td align="left" style="padding:0px;vertical-align:top"><span style="white-space:nowrap;color:rgb(0,0,1)"><font face="arial, helvetica, sans-serif" size="2">Email: <a href="mailto:simon.eves@omnisci.com" target="_blank">simon.eves@omnisci.com</a> | Cell: </font></span></td><td align="left" style="padding:0px;vertical-align:top"><span style="white-space:nowrap;color:rgb(0,0,1)"><font face="arial, helvetica, sans-serif" size="2">+1 (415) 902-1996</font></span></td></tr></tbody></table><br></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table><br></div></div></div></div></div></div></div></div></div></div></font></span></div><div></div></div></div><div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div style="margin:0px;padding:0px 0px 20px;width:2544px;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:medium"><div><div style="font-size:12.8px;margin:8px 0px 0px;padding:0px"><div><div dir="ltr"><span><font color="#888888"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><table cellpadding="0" cellspacing="0" border="0" style="font-family:Times;width:2544px"><tbody><tr><td align="left" style="vertical-align:top;font-size:0px"><table cellpadding="0" cellspacing="0" border="0"><tbody><tr><td align="left" style="padding:0px 15px 0px 0px;vertical-align:middle"><font face="arial, helvetica, sans-serif" size="2"><a href="http://www.omnisci.com/" target="_blank"><img src="http://www2.omnisci.com/l/298412/2018-09-18/3sqpg/298412/61753/OmniSci_Email_Header2.png"></a><br></font></td><td align="left" style="padding:0px 0px 0px 15px;vertical-align:top"><table cellpadding="0" cellspacing="0" border="0" style="width:215px"><tbody><tr><td align="left" style="vertical-align:top"><span style="white-space:nowrap;color:rgb(0,0,1)"><span style="color:rgb(14,76,144);font-weight:700"><font face="arial, helvetica, sans-serif" size="2">Simon Eves</font></span></span></td></tr><tr><td align="left" style="vertical-align:top"><table cellpadding="0" cellspacing="0" border="0"><tbody><tr><td align="left" style="vertical-align:top"><span style="white-space:nowrap;color:rgb(0,0,1)"><font face="arial, helvetica, sans-serif" size="2">Senior Graphics Engineer, Rendering Group<br>100 Montgomery St (5th Floor), San Francisco, CA 94104, USA<br></font></span></td></tr></tbody></table></td></tr><tr><td align="left" style="vertical-align:top"><table cellpadding="0" cellspacing="0" border="0"><tbody><tr><td align="left" style="padding:0px;vertical-align:top"><br></td><td align="left" style="padding:0px;vertical-align:top"><br></td></tr><tr><td align="left" style="padding:0px;vertical-align:top"><span style="white-space:nowrap;color:rgb(0,0,1)"><font face="arial, helvetica, sans-serif" size="2">Email: <a href="mailto:simon.eves@omnisci.com" target="_blank">simon.eves@omnisci.com</a> | Cell: </font></span></td><td align="left" style="padding:0px;vertical-align:top"><span style="white-space:nowrap;color:rgb(0,0,1)"><font face="arial, helvetica, sans-serif" size="2">+1 (415) 902-1996</font></span></td></tr></tbody></table><br></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table><br></div></div></div></div></div></div></div></div></div></div></font></span></div><div></div></div></div><div></div></div></div></div></div></div></div></div></div></div></div>