Monday, July 04, 2016

Compile PostgreGIS (GDAL) on Solaris 11 (11.3)

Before you install PostGIS you will need to install some of the requirements.

GDAL. is a translator library for raster and vector geospatial data format.

# pkg install developer/gcc-45 build/gnu-make
# pkg install libtool automake autoconf gnu-gettext library/libxml2 library/json-c # export PATH=/usr/gcc/4.5/bin:/usr/bin:/usr/sbin:/usr/sfw/bin:/usr/lib:/usr/gnu/bin:

# unzip -q gdal210.zip
# cd gdal-2.1.0
Fix for version 2.1.0: MRF: rename CS variable so as to avoid build failure on Solaris 11
# vi frmts/mrf/marfa_dataset.cpp
        if (!source.empty()) {
1072            CPLXMLNode *CS = CPLCreateXMLNode(config, CXT_Element, "CachedSource");
1072            CPLXMLNode *psCachedSource = CPLCreateXMLNode(config, CXT_Element, "CachedSource");
1073            // Should wrap the string in CDATA, in case it is XML
1074            CPLXMLNode *S = CPLCreateXMLElementAndValue(CS, "Source", source);
1074            CPLXMLNode *psSource = CPLCreateXMLElementAndValue(psCachedSource, "Source", source);
1075            if (clonedSource)
1076                CPLSetXMLValue(S, "#clone", "true");
1076                CPLSetXMLValue(psSource, "#clone", "true");
1077            }

# ./configure CC='gcc -m64' CXX='g++ -m64' \
    --prefix=/usr/local/postgres/gdal \
    --with-geos=/usr/local/postgres/geos/bin/geos-config \
    --with-pg=/usr/local/postgres/9.53-pgdg/bin/64/pg_config \
    -with-curl -with-jpeg -with-png

.....
GDAL is now configured for x86_64-pc-solaris2.11

  Installation directory:    /usr/local/postgres/gdal
  C compiler:                gcc -m64 -g -O2
  C++ compiler:              g++ -m64 -g -O2

  LIBTOOL support:           yes
  LIBZ support:              external
  LIBLZMA support:           no
  cryptopp support:          no
  GRASS support:             no
  CFITSIO support:           no
  PCRaster support:          internal
  LIBPNG support:            external
  DDS support:               no
  GTA support:               no
  LIBTIFF support:           internal (BigTIFF=yes)
  LIBGEOTIFF support:        internal
  LIBJPEG support:           external
  12 bit JPEG:               no
  12 bit JPEG-in-TIFF:       no
  LIBGIF support:            internal
  OGDI support:              no
  HDF4 support:              no
  HDF5 support:              no
  Kea support:               no
  NetCDF support:            no
  Kakadu support:            no
  JasPer support:            no
  OpenJPEG support:          no
  ECW support:               no
  MrSID support:             no
  MrSID/MG4 Lidar support:   no
  MSG support:               no
  GRIB support:              yes
  EPSILON support:           no
  WebP support:              no
  cURL support (wms/wcs/...):yes
  PostgreSQL support:        yes
  MRF support:               yes
  MySQL support:             no
  Ingres support:            no
  Xerces-C support:          no
  NAS support:               no
  Expat support:             yes
  libxml2 support:           yes
  Google libkml support:     no
  ODBC support:              no
  PGeo support:              no
  FGDB support:              no
  MDB support:               no
  PCIDSK support:            internal
  OCI support:               no
  GEORASTER support:         no
  SDE support:               no
  Rasdaman support:          no
  DODS support:              no
  SQLite support:            yes
  PCRE support:              no
  SpatiaLite support:        no
  DWGdirect support          no
  INFORMIX DataBlade support:no
  GEOS support:              yes
  QHull support:             internal
  Poppler support:           no
  Podofo support:            no
  PDFium support:            no
  OpenCL support:            no
  Armadillo support:         no
  FreeXL support:            no
  SOSI support:              no
  MongoDB support:           no
  SWIG Bindings:             python
  Statically link PROJ.4:    no
  enable GNM building:       no
  enable pthread support:    yes
  enable POSIX iconv support:yes
  hide internal symbols:     no


# gmake
# gmake install

No comments: