wiki:Solaris8Build

Solaris8Build

MapServer v3.6.4

Libraries I installed to get this, PHP and MapLab working:

  • gcc (3.2) (Sun linker used)
  • bison (1.875)
  • flex (2.5.4a)
  • zlib (1.1.4)
  • libpng (1.2.5)
  • FreeType (2.1.3)
  • libTIFF (3.5.7)
  • libWWW (had libtool issues, link to system libtool rather than relying on built version)
  • gd (2.0.11)
  • proj4 (4.5)
  • gdal (1.1.8 - issues, see below)
  • PHP (4.3.1)

There’s a problem linking to static C++ libs for some reason. The work-around is to add "-lstdc++" to the end of the line that sets "STATIC_LIB" in "Makefile.in".

There’s a problem getting the resultant Mapscript shared object to find other shared objects when run from PHP. You must do "setenv LDFLAGS -R/usr/local/lib:/usr/local/pgsql/lib" to set the environment variable and then add it’s use in two Makefile.in files.

Makefile.in in the root Mapserver directory, add "@LDFLAGS@" to the beginning of the list of things set for the Makefile LDFLAGS variable: "LDFLAGS = @LDFLAGS@ <existing values>"

For ./mapscript/php3/Makefile?.in add "LDFLAGS = @LDFLAGS@" after CFLAGS and then add "$(LDFLAGS)" right after "$(LD)" in the first two make directives.

Assuming you're using Apaceh, add to the httpd.conf file the directive (you can leave off the pgsql directory if you're not using PostgreSQL): SetEnv LD_LIBRARY_PATH /usr/local/lib:/usr/local/pgsql/lib

NOTE: To avoid all the LD-related shenanigans above, I found that the "--enable-runpath" option might avoid having to do all that (and possibly the SetEnv addition to the Apache configuration). Using that option was not fully tested.

Run configure with your options, these were mine (the "--enable-interal-ld-detect" is important on Solaris):

./configure --with-postgis --with-gd --enable-force-freetype1 
            --with-php=/spool/build/php-4.3.1 --with-proj --with-wmsclient 
            --with-gdal --enable-internal-ld-detect
make
make install
cp mapscript/php3/php_mapscript.so /usr/local/lib/php/extensions/
cp mapserv /usr/local/apache2/cgi-bin

Also run these if Apache runs as "www":

chown www:www /usr/local/lib/php/extensions/*
chown www:www /usr/local/apache2/cgi-bin/*
Last modified 13 years ago Last modified on Jan 26, 2009, 12:39:24 PM