<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><br>
    </p>
    <p>I thought I would report on my work on building geos-3.5.0 on
      Solaris 11 using  Oracle Developer Studio 12.5 (formally  Sun
      Studio12)</p>
    <p>I have now compiled it so I will report back with my findings and
      ask a couple of questions.</p>
    <p>- I used the following tickets for my starting points:</p>
    <p>    "Need to compile the libGeos using Sun Studio12 on Solaris10"
      <a class="moz-txt-link-freetext" href="https://trac.osgeo.org/geos/ticket/224#no1">https://trac.osgeo.org/geos/ticket/224#no1</a> <br>
    </p>
    <p>Updated the patches in the above to work with 3.5.0 a few
      modifications due to code alterations in original<br>
    </p>
    <p>    "GEOS build fails on linking on Solaris"
      <a class="moz-txt-link-freetext" href="https://trac.osgeo.org/geos/ticket/331">https://trac.osgeo.org/geos/ticket/331</a></p>
    <p>Add the LIBS="-lm " to configure from the above ticket<br>
    </p>
    <p>Then I also addeed:</p>
    <p>Add the LIBS="-lm -lCrun -lCstd" to configure</p>
    <p>Added "__C99FEATURES__" so C99 support is added to configure</p>
    <p>So configuration becomes <br>
    </p>
    <p># ./configure CC='cc' CXX='CC -D__C99FEATURES__' CPPFLAGS=-m64
      CXXFLAGS=-m64 LIBS='-lm -lCrun -lCstd' --disable-inline
      --enable-cassert<br>
    </p>
    <p>Altered LIBS in geos-3.5.0/tests/perf/Makefile.in "LIBS =
      $(top_builddir)/src/libgeos.la"</p>
    <p>With all the above I got nearly to compile, but I get <br>
    </p>
    <p><tt>DEPDIR=.deps depmode=none /bin/sh ../depcomp \<br>
        CC -D__C99FEATURES__ -DHAVE_CONFIG_H -I. -I../include
        -I../include/geos  -I../include -m64 -pedantic -Wall -ansi
        -Wno-long-long  -m64 -c -o example.o example.cpp<br>
        CC: Warning: Option -ansi passed to ld, if ld is invoked,
        ignored otherwise<br>
        /bin/sh ../libtool  --tag=CXX   --mode=link CC -D__C99FEATURES__
        -pedantic -Wall -ansi -Wno-long-long  -m64   -o example
        example.o ../src/libgeos.la ../src/libgeos.la<br>
        libtool: link: CC -D__C99FEATURES__ -pedantic -Wall -ansi
        -Wno-long-long -m64 -o .libs/example example.o 
        ../src/.libs/libgeos.so -lm -lCrun -lCstd
        -R/usr/local/postgres/geoss/lib<br>
        CC: Warning: Option -ansi passed to ld, if ld is invoked,
        ignored otherwise<br>
        ld: fatal: unrecognized option '-n'<br>
        ld: fatal: use the '-z help' option for usage information<br>
        gmake[2]: *** [example] Error 2<br>
        gmake[2]: Leaving directory `/tmp/geos-3.5.0/doc'<br>
        gmake[1]: *** [all-recursive] Error 1<br>
        gmake[1]: Leaving directory `/tmp/geos-3.5.0'<br>
        gmake: *** [all] Error 2<br>
        bash-4.1$ GEOS build fails on linking on Solaris<br>
      </tt></p>
    <p><tt>The reason is "</tt><tt>-ansi" is not a flag with CC, but I
        am not sure how to clearly remove it. I did a dirty version by
        removing it from configure!<br>
      </tt></p>
    <p><tt>if test yes = "$dummy_cv_ansi"; then<br>
            WARNFLAGS="$WARNFLAGS -ansi"<br>
        else<br>
            :<br>
        fi<br>
      </tt></p>
    <p><tt>Thanks,</tt></p>
    <p><tt>Andrew<br>
      </tt></p>
    <br>
    <pre class="moz-signature" cols="72">-- 
Andrew Watkins * Birkbeck, University of London * Computer Science *
* <a class="moz-txt-link-freetext" href="http://notallmicrosoft.blogspot.com">http://notallmicrosoft.blogspot.com</a> *
* UKOUG Systems SIG Chair * 
* UKOUG Tech committee * 
* tel: 020 7631 6720 *

 

</pre>
  </body>
</html>