<div dir="ltr">Andrew, you might want to look at how pkgsrc builds it as well:<br><a href="https://github.com/joyent/pkgsrc/tree/trunk/databases/postgresql-postgis2">https://github.com/joyent/pkgsrc/tree/trunk/databases/postgresql-postgis2</a><div><br></div><div>I know Illumos is not Solaris, but it may provide you with some hints as to how to get it to build.</div><div><br></div><div>Hope that helps!</div><div>- Phillip</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 5, 2016 at 8:08 AM, Andrew Watkins <span dir="ltr"><<a href="mailto:andrew@dcs.bbk.ac.uk" target="_blank">andrew@dcs.bbk.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div><br>
      Paul,<br>
      <br>
      I did see that I tried it but still gave me problems. <br>
      May be I should revisit it to see if it can solve other problems.
      <br>
      <br>
      Thanks,<br>
      <br>
      Andrew<br>
      <br>
      <br>
      On 07/05/16 13:04, Paul Ramsey wrote:<br>
    </div>
    <blockquote type="cite">
      <pre>I should have sent this at the time, but it didn't answer your
proximate problem since you were building w/ the Sun compiler...

<a href="https://github.com/pramsey/suite-solaris-build/blob/master/pgsql-postgis-gdal-build.sh" target="_blank">https://github.com/pramsey/suite-solaris-build/blob/master/pgsql-postgis-gdal-build.sh</a>

P.

On Tue, Jul 5, 2016 at 4:29 AM, Andrew Watkins <a href="mailto:andrew@dcs.bbk.ac.uk" target="_blank"><andrew@dcs.bbk.ac.uk></a> wrote:
</pre>
      <blockquote type="cite">
        <pre>On 06/30/16 16:28, Andrew Watkins wrote:


Hello folks,


Beening battling my way through Postgis on Solaris and I am getting close
but still getting errors. Here is the relevant information and any pointers:

postgis-2.2.2# ./configure CC=/opt/studio12u1/bin/cc CFLAGS="-m64
-DNAN=\"(0.0/0.0)\"" CPPFLAGS=-m64 CXXFLAGS=-m64 LDFLAGS="-m64
-L/usr/local/postgres/pgdg/lib/64 -L/usr/local/postgres/geos/lib
-L/usr/local/postgres/proj4/lib" \
    --with-pgconfig=/usr/local/postgres/pgdg/bin/64/pg_config \
    --with-geosconfig=/usr/local/postgres/geos/bin/geos-config \
    --with-gdalconfig=/usr/local/postgres/gdal/bin/gdal-config \
    --with-projdir=/usr/local/postgres/proj4

...

  PostGIS is now configured for i386-pc-solaris2.11

 -------------- Compiler Info -------------
  C compiler:           /opt/studio12u1/bin/cc -m64 -DNAN="(0.0/0.0)"
  SQL preprocessor:     /usr/gcc/4.5/bin/cpp -traditional-cpp -w -P

 -------------- Dependencies --------------
  GEOS config:          /usr/local/postgres/geos/bin/geos-config
  GEOS version:         3.5.0
  GDAL config:          /usr/local/postgres/gdal/bin/gdal-config
  GDAL version:         2.1.0
  PostgreSQL config:    /usr/local/postgres/pgdg/bin/64/pg_config
  PostgreSQL version:   PostgreSQL 9.5.3
  PROJ4 version:        49
  Libxml2 config:       /usr/bin/xml2-config
  Libxml2 version:      2.9.2
  JSON-C support:       yes
  PCRE support:         no
  PostGIS debug level:  0
  Perl:                 /usr/bin/perl

 --------------- Extensions ---------------
  PostGIS Raster:       enabled
  PostGIS Topology:     enabled
  SFCGAL support:       disabled
  Address Standardizer support:       disabled

 -------- Documentation Generation --------
  xsltproc:             /usr/bin/xsltproc
  xsl style sheets:
  dblatex:
  convert:
  mathml2.dtd:          <a href="http://www.w3.org/Math/DTD/mathml2/mathml2.dtd" target="_blank">http://www.w3.org/Math/DTD/mathml2/mathml2.dtd</a>

# make

/usr/bin/perl ../utils/<a href="http://postgis_proc_set_search_path.pl" target="_blank">postgis_proc_set_search_path.pl</a> postgis.sql UNUSED >
postgis_proc_set_search_path.sql
/usr/gcc/4.5/bin/cpp -traditional-cpp -w -P -I../libpgcommon <a href="http://legacy.sql.in" target="_blank">legacy.sql.in</a> |
grep -v '^#' | \
/usr/bin/perl -lpe "s'MODULE_PATHNAME'\$libdir/postgis-2.2'g" > legacy.sql
/usr/bin/perl ../utils/<a href="http://create_undef.pl" target="_blank">create_undef.pl</a> legacy.sql 95 > uninstall_legacy.sql
/usr/gcc/4.5/bin/cpp -traditional-cpp -w -P -I../libpgcommon
<a href="http://legacy_minimal.sql.in" target="_blank">legacy_minimal.sql.in</a> | grep -v '^#' | \
/usr/bin/perl -lpe "s'MODULE_PATHNAME'\$libdir/postgis-2.2'g" >
legacy_minimal.sql
/usr/gcc/4.5/bin/cpp -traditional-cpp -w -P -I../libpgcommon
<a href="http://legacy_gist.sql.in" target="_blank">legacy_gist.sql.in</a> | grep -v '^#' | \
/usr/bin/perl -lpe "s'MODULE_PATHNAME'\$libdir/postgis-2.2'g" >
legacy_gist.sql
make[1]: Leaving directory `/tmp/postgis-2.2.2/postgis'
---- Making all in regress
make[1]: Entering directory `/tmp/postgis-2.2.2/regress'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/postgis-2.2.2/regress'
---- Making all in raster
make[1]: Entering directory `/tmp/postgis-2.2.2/raster'
make -C rt_core
make[2]: Entering directory `/tmp/postgis-2.2.2/raster/rt_core'
/opt/studio12u1/bin/cc -m64 -DNAN="(0.0/0.0)"  -KPIC -DPIC
-I../../liblwgeom -I/usr/local/postgres/gdal/include
-I/usr/local/postgres/proj4/include -I/usr/local/postgres/geos/include   -c
-o rt_util.o rt_util.c
"/usr/local/postgres/gdal/include/ogr_core.h", line 415: warning: enumerator
value overflows INT_MAX (2147483647)
"/usr/local/postgres/gdal/include/ogr_core.h", line 416: warning: enumerator
value overflows INT_MAX (2147483647)
"/usr/local/postgres/gdal/include/ogr_core.h", line 417: warning: enumerator
value overflows INT_MAX (2147483647)
"/usr/local/postgres/gdal/include/ogr_core.h", line 418: warning: enumerator
value overflows INT_MAX (2147483647)
"/usr/local/postgres/gdal/include/ogr_core.h", line 419: warning: enumerator
value overflows INT_MAX (2147483647)
"/usr/local/postgres/gdal/include/ogr_core.h", line 420: warning: enumerator
value overflows INT_MAX (2147483647)
"/usr/local/postgres/gdal/include/ogr_core.h", line 421: warning: enumerator
value overflows INT_MAX (2147483647)
"librtcore.h", line 151: warning: macro redefined: __attribute__
"librtcore.h", line 245: syntax error before or at: (
"librtcore.h", line 244: function cannot return function or array
"librtcore.h", line 245: warning: function prototype parameters must have
types
"librtcore.h", line 244: function cannot return function or array
"librtcore.h", line 245: warning: syntax error:  empty declaration
"/usr/include/assert.h", line 23: syntax error before or at: (
"/usr/include/assert.h", line 23: function cannot return function or array
"/usr/include/assert.h", line 23: function cannot return function or array
"rt_util.c", line 142: warning: statement not reached
"rt_util.c", line 173: warning: statement not reached
cc: acomp failed for rt_util.c
make[2]: *** [rt_util.o] Error 2
make[2]: Leaving directory `/tmp/postgis-2.2.2/raster/rt_core'
make[1]: *** [corelib] Error 2
make[1]: Leaving directory `/tmp/postgis-2.2.2/raster'
make: *** [all] Error 1

I have tried it with gcc but I get the same error.


Well, it looks like people don't use Solaris for PostGIS or they don't share
there findings.

I do like sharing here are is my blog entries for compiling PostGIS on
Solaris 11
<a href="http://notallmicrosoft.blogspot.co.uk/2016/07/install-postgis-on-solaris-11-113.html" target="_blank">http://notallmicrosoft.blogspot.co.uk/2016/07/install-postgis-on-solaris-11-113.html</a>

Only bad news is that I have not managed to get all modules working, but it
is a start.

Anyway, hope it helps others.

--
Andrew Watkins * Birkbeck, University of London * Computer Science *
* <a href="http://notallmicrosoft.blogspot.com" target="_blank">http://notallmicrosoft.blogspot.com</a> *
* UKOUG Systems SIG Chair *
* UKOUG Tech committee *
* tel: 020 7631 6720 *




_______________________________________________
postgis-devel mailing list
<a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a>
<a href="http://lists.osgeo.org/mailman/listinfo/postgis-devel" target="_blank">http://lists.osgeo.org/mailman/listinfo/postgis-devel</a>
</pre>
      </blockquote>
      <pre>_______________________________________________
postgis-devel mailing list
<a href="mailto:postgis-devel@lists.osgeo.org" target="_blank">postgis-devel@lists.osgeo.org</a>
<a href="http://lists.osgeo.org/mailman/listinfo/postgis-devel" target="_blank">http://lists.osgeo.org/mailman/listinfo/postgis-devel</a><span class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
    </font></span></blockquote><span class="HOEnZb"><font color="#888888">
    <br>
    <p><br>
    </p>
    <pre cols="72">-- 
Andrew Watkins * Birkbeck, University of London * Computer Science *
* <a href="http://notallmicrosoft.blogspot.com" target="_blank">http://notallmicrosoft.blogspot.com</a> *
* UKOUG Systems SIG Chair * 
* UKOUG Tech committee * 
* tel: 020 7631 6720 *

 

</pre>
  </font></span></div>

<br>_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org">postgis-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/postgis-devel</a><br></blockquote></div><br></div>