[Gdal-dev] Error compiling gdal with MrSid support in ubuntu linux

Mikael Schröder miscx at spray.se
Thu Mar 30 14:49:54 EST 2006


Hi Frank (sorry for double posting, i missed the cc to the gdal-list)
Thank you for your tip regarding CXX. After some googling I found the
right packages to back it up. 
I installed the following packages (from warty):
cpp-3.2_3.2.3-9_i386.deb
g++-3.2_3.2.3-9_i386.deb
gcc-3.2-base_3.2.3-9_i386.deb
gcc-3.2_3.2.3-9_i386.deb
libstdc++5-dev_3.2.3-9_i386.deb

And after that used the following two commands to execute the right
version of the compiler:
$ export CXX=/usr/bin/g++-3.2 PATH=/usr/bin/gcc-3.2:$PATH
CC=/usr/bin/gcc-3.2 
$ CXX=/usr/bin/g++-3.2 PATH=/usr/bin/gcc-3.2:$PATH CC=/usr/bin/gcc-3.2
dpkg-buildpackage -us -uc -rfakeroot

This worked out fine but I found that I also needed to  compile
"libgeos" withe the same compiler, to get "libgdal" with ogr working.
Unfortunately I did not manage to compile gdal with both MrSid and ECW
with gcc 3.2. So I disabled ECW for now... (any tips on this?)
When everything was compiled and installed I run:
$ gdalinfo --formats     to se if my newly installed packages were
functioning. Unfortunately I got the same error message as before the
installation, as me and the wrong one as root (se below). So I suppose
that my previous cvs-source-compiled "gdal" that I manage to install but
never got functioning is now somehow disturbing my system.
It seems my system is not responding on the gdal-package installation,
so how do I disable / uninstall my previously cvs-source-compiled and
installed "gdal" ?
I found no: "make uninstall". Or how do I change the system settings so
it will use my now correct libgdal-package instead of the source
compiled one?
Below you find my current system's response to "gdalinfo --formats" both
as me and as root (with the new MrSid enabled libgdal-package installed
and "active"). 
Lots of questions.... 
/Best Regards, Mikael

-----------------alt 1 --me------------------------------
micke at ubuntu32:~$ gdalinfo --formats
*** glibc detected *** malloc(): memory corruption: 0x080621e8 ***
Interrupted (SIGABRT)

-------------------alt 2 --root --------------------------
root at ubuntu32:~# gdalinfo --formats
Supported Formats:
  VRT (rw+): Virtual Raster
  GTiff (rw+): GeoTIFF
  NITF (rw+): National Imagery Transmission Format
  HFA (rw+): Erdas Imagine Images (.img)
  SAR_CEOS (ro): CEOS SAR Image
  CEOS (ro): CEOS Image
  ELAS (rw+): ELAS
  AIG (ro): Arc/Info Binary Grid
  AAIGrid (rw): Arc/Info ASCII Grid
  SDTS (ro): SDTS Raster
  DTED (rw): DTED Elevation Raster
  PNG (rw): Portable Network Graphics
  JPEG (rw): JPEG JFIF
  MEM (rw+): In Memory Raster
  JDEM (ro): Japanese DEM (.mem)
  GIF (rw): Graphics Interchange Format (.gif)
  ESAT (ro): Envisat Image Format
  FITS (rw+): Flexible Image Transport System
  BSB (ro): Maptech BSB Nautical Charts
  XPM (rw): X11 PixMap Format
  BMP (rw+): MS Windows Device Independent Bitmap
  AirSAR (ro): AirSAR Polarimetric Image
  RS2 (ro): RadarSat 2 XML Product
  PCIDSK (rw+): PCIDSK Database File
  PCRaster (rw): PCRaster Raster File
  ILWIS (rw+): ILWIS Raster Map
  RIK (ro): Swedish Grid RIK (.rik)
  SGI (ro): SGI Image File Format 1.0
  Leveller (ro): Leveller heightfield
  GMT (rw): GMT NetCDF Grid Format
  netCDF (ro): network Common Data Format
  HDF4 (ro): Hierarchical Data Format Release 4
  HDF4Image (rw+): HDF4 Dataset
  PNM (rw+): Portable Pixmap Format (netpbm)
  DOQ1 (ro): USGS DOQ (Old Style)
  DOQ2 (ro): USGS DOQ (New Style)
  ENVI (rw+): ENVI .hdr Labelled
  EHdr (rw+): ESRI .hdr Labelled
  PAux (rw+): PCI .aux Labelled
  MFF (rw+): Vexcel MFF Raster
  MFF2 (rw+): Vexcel MFF2 (HKV) Raster
  FujiBAS (ro): Fuji BAS Scanner Image
  GSC (ro): GSC Geogrid
  FAST (ro): EOSAT FAST Format
  BT (rw+): VTP .bt (Binary Terrain) 1.3 Format
  LAN (ro): Erdas .LAN/.GIS
  CPG (ro): Convair PolGASP
  IDA (rw+): Image Data and Analysis
  NDF (ro): NLAPS Data Format
  DIPEx (ro): DIPEx
  JPEG2000 (rw): JPEG-2000 part 1 (ISO/IEC 15444-1)
  L1B (ro): NOAA Polar Orbiter Level 1b Data Set
  FIT (rw): FIT Image
  RMF (rw+): Raster Matrix Format
  USGSDEM (rw): USGS Optional ASCII DEM (and CDED)
  GXF (ro): GeoSoft Grid Exchange Format
  GRASS (ro): GRASS Database Rasters (5.7+)


ons 2006-03-29 klockan 09:37 -0500 skrev Frank Warmerdam:


> Mikael,
> 
> I don't know what dpkg does, but I would guess it is somehow not honouring
> your environment.  lt_platforms.h checks for gcc 2 and 3, so I would assume
> things are still picking up gcc 4 for some reason.
> 
> You might trying setting CXX instead of (or in addition to) CC since this
> is a c++ project.
> 
> I trust any package you build would only be for internal use, right?  There
> are non-trivial requirements to redistribute Lizardtech libraries (even if
> you are putting it in non-free).
> 
> Best regards,



ons 2006-03-29 klockan 09:37 -0500 skrev Frank Warmerdam:

> Mikael Schröder wrote:
> > Hello
> > I have been trying to add support for MrSid (but also ecw) to the 
> > libgdal1c2(a) package in ubuntu breezy (I have also tried to compile 
> > directly from source).
> > But I get the following error message:
> > 
> > In file included from 
> > /usr/local/MrSid_GeoExpressSDK/include/support/lt_types.h:28,
> >                  from mrsiddataset.cpp:117:
> > /usr/local/MrSid_GeoExpressSDK/include/support/lt_platform.h:61:8: 
> > error: #error PLATFORM ERROR: Unsupported version of GCC
> > make[3]: *** [../o/mrsiddataset.o] Error 1
> > make[3]: Leaving directory 
> > `/home/micke/source/gdal_dpkg_t4/gdal-1.2.6/frmts/mrsid'
> > make[2]: *** [mrsid-install-obj] Error 2
> > make[2]: Leaving directory 
> > `/home/micke/source/gdal_dpkg_t4/gdal-1.2.6/frmts'
> > make[1]: *** [frmts-target] Error 2
> > make[1]: Leaving directory `/home/micke/source/gdal_dpkg_t4/gdal-1.2.6'
> > make: *** [build-stamp] Error 2
> > 
> > I have installed gcc 3.2.3 from Warty and downloaded the corresponding 
> > dsdk from Lizardtech's developer-site.
> > Before i run dpkg I execute (as root):
> > $ export PATH=/usr/bin/gcc-3.2:$PATH CC=/usr/bin/gcc-3.2          
> > $ PATH=/usr/bin/gcc-3.2:$PATH CC=/usr/bin/gcc-3.2 dpkg-buildpackage -us 
> > -uc -rfakeroot
> > 
> > I have also linked gcc to gcc-3.2 in /usr/bin
> > What am i doing wrong?
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20060330/cf64f982/attachment.html


More information about the Gdal-dev mailing list