[gdal-dev] Segmentation fault using gdal 1.4.4 and 1.5.2 on netcdf data

Dylan Beaudette dylan.beaudette at gmail.com
Thu Aug 14 14:13:55 EDT 2008


On Thursday 14 August 2008, Vishal Mehta wrote:
> Hello all,
>
> I've been having problems getting gdal to work with netcdf files.
>
> Using Ubuntu 8.04 LTS (Hardy)
> 1. problems with libgdal 1.4.4
> First i tried the default gdal versions and libraries installed through
> Synaptic Package Manager. The packaged version was gdal 1.4.4 All programs
> that called gdal - Grass (using r.in.gdal), FWTools and gdalinfo,
> gdal_translate etc - gave me a 'segmentation fault'
>
> I then looked up online and this bug report seemed to say it was a fault
> with how gdal is packaged by Ubuntu -
> https://bugs.launchpad.net/ubuntu/+source/libgdal-grass/+bug/126916
>
> and the recommendation was to compile from source. So then on to part 2
>
> 2. I compiled from source gdal1.5.2 from
> http://trac.osgeo.org/gdal/wiki/DownloadSource
>
> using the following configure
>
> ./configure --with-netcdf=/usr/lib --with-libtiff=yes --with-geotiff=yes
> --with-jpeg=/usr/lib --with-gif=/usr/lib --with-png=/ur/lib
> --with-pg=/usr/bin/pg_config --with-libgrass=yes
>
> make
>
> sudo make install
>
> and made sure the libgdal link was referring to the new one.
>
> I tried
> gdalinfo file.nc
>
> and again got 'segmentation fault'
>
> it works for other data types; only netcdf does not work (just like before
> with gdal1.4.4)
>
> How can i fix this problem? I am not a linux expert by the way...perhaps
> that was obvious:)
>
> The .nc file is very large - It iss climate projection data from the
> California Climate Change Center. All i want to do is automate the
> extraction of climate data for a set of points - am trying to do the
> following:
>
> - import .nc data into Grass rasters or GeoTiff with bands = images on the
> netcdf file - run a small script to extract climate data for vector point
> data from each Grass raster/GTiff
>
> Please help,
> Vishal
>
> FYI:
> vishal at vishal-laptop:~/downloads/gdal-1.5.2$ gdalinfo --version
> GDAL 1.5.2, released 2008/05/29
>
>
>

Hi Vishal,

Are you positive that you are invoking the latest gdal tools and libraries? I 
would remove any that you have installed via package manager (aptitude, 
etc.), and then run"

gdal-config --version

after removing the packaged version, it might also be a good idea to run 
ldconfig (as root).


Cheers,

Dylan


-- 
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341


More information about the gdal-dev mailing list