Page:
OpenSolarisInstallation_32bit
Pages
A perfect testcase
API changes between v2.0 and v2.1
API changes between v3.0 and v3.1
AWS Lambda
About Mapnik
AlsoFilter
Api changes between v2.1 and v2.2
Api changes between v2.2 and v2.3
Api changes between v2.3 and v3.0
ArchInstallation
Aspect Fix Mode
Benchmark Notes
BoundsClipping
BrokenExceptions
BuildingSymbolizer
CSV Plugin
CairoVersions
CentOS_RHEL
ChangeLog
Code sprint
CodingStandards
Compiler Notes
Compositing
Contributing
DebianInstallation
DebugSymbolizer
DebuggingMapnik
DemoGallery
DeveloperTopics
DevelopingPlugins
Development
ElseFilter
ExampleCode
Expression
FasterCompiling
Fasterlabeling
Filter
FontSet
FreeBSDInstallation
GDAL
GEOS
GSOC Ideas
GSOC2010
GSOC2010_Application
GSOC2010_Ideas
GSOC2011
GSOC2011_Ideas
GeoJSON Plugin
GettingStarted
GettingStartedInPython
GettingStartedInXML
GlyphSymbolizer
GroupSymbolizer
Grouped rendering
Gsoc2012 application
Gsoc2012
HaitiStyles
Home
Ideas
Ideas_Compositing
Ideas_FutureMapnik
Image IO
InstallationTroubleshooting
InternationalText
IntroductionToGIS
Kismet
LabelingSupport
Layer
LearningMapnik
Legending
LinePatternSymbolizer
LineSymbolizer
LinuxInstallation
Logging
MacInstallation
MacInstallationSource
MacInstallation_Homebrew
MacPostGIS_Setup
MacPythonUpgradeIssues
ManagingLargeXmlFiles
MapDesign
Mapnik Development
Mapnik Installation
Mapnik with wxPython
Mapnik2
Mapnik2_Changes
MapnikCodeSprint
MapnikCodeSprint_MCS01
MapnikCodeSprint_MCS01_Location
MapnikCodeSprint_MCS01_Results
MapnikCodeSprint_MCS01_Schedule
MapnikCodeSprint_MCS02
MapnikCoreConcepts
MapnikDependencies
MapnikInstallationSvn
MapnikReferences
MapnikReleaseSteps
MapnikReleases
MapnikRenderers
MapnikTutorials
MapnikUtilities
MapnikViewer
Mapnikinstallation
MarkersSymbolizer
MaxScaleDenominator
MemoryDatasource
MetaWriter
MinScaleDenominator
ModServer
Nik2Img
Notes and caveats
OCCI
OGR
OpenSolarisInstallation
OpenSolarisInstallation_32bit
OpenSolarisInstallation_64bit
OpenSolarisInstallation_TroubleShooting
OpenSuse
OpenSuseInstallation
OptimizeRenderingWithPostGIS
OsmPlugin
OutputFormats
PackageBuilding
Paleoserver
Path Expression
PgRaster
PluginArchitecture
PointSymbolizer
PolygonPatternSymbolizer
PolygonSymbolizer
PostGIS
Postgis async
Python Plugin
Python3k
RFC: Raster color interpretation
Raster
RasterColorizer
RasterSymbolizer
Rasterlite
Related projects and utilities
Release0.6.0
Release0.6.1
Release0.7.0
Release0.7.1
Release0.7.2
Release2.0.0
Release2.0.1
Release2.0.2
Release2.1.0
Release2.2.0
Runtime Logging
SQLite
SVG support
Scale factor
ScaleAndPpi
ShapeFile
ShieldSymbolizer
ShieldSymbolizerTests
Style
StyleShare
Svg rendering gochas
SymbologySupport
Text Rendering Overview
TextSymbolizer
Trac to Github wiki migration notes
Troubleshooting
UbuntuInstallation
UbuntuInstallationOld
UsingCustomFonts
UsingScons
WindowsInstallation
World population tutorial
XMLConfigReference
XmlFormatDiscussion
iOS
mapnik.Datasource
mapnik.Layer
mapnik.Map
my choice
No results
2
OpenSolarisInstallation_32bit
ThomasG77 edited this page 2012-01-07 11:10:56 -08:00
Table of Contents
For the main install page see: https://github.com/mapnik/mapnik/wiki/OpenSolarisInstallation part InstallingCoreMapnikDependencies
6a: 32 bit - Postgres 8.4 from source
First we set up a few environment variables
TARGET="~/.bashrc"
echo 'export PATH=/opt/ts/gcc/4.4/bin/:/opt/ts/bin:/usr/local/bin/:/usr/local/pgsql/bin:$PATH' >> $TARGET
echo 'export PYTHONPATH=/usr/local/lib/python2.6/site-packages:$PYTHONPATH' >> $TARGET
echo 'export LD_LIBRARY_PATH=/usr/local/lib/:/usr/local/pgsql/lib/' >> $TARGET
echo 'export LANG="C"' >> $TARGET
echo 'export LC_ALL="C"' >> $TARGET
source $TARGET
Then set up a build area:
# set up a directory for source builds of familiar geo libs
mkdir src
export SRC=`pwd`/src
Then get on with the installs
# icu
cd $SRC
wget http://download.icu-project.org/files/icu4c/4.4.1/icu4c-4_4_1-src.tgz
tar xvf icu4c-4_4_1-src.tgz
cd icu/source
./runConfigureICU Solaris/GCC
make
pfexec make install
# boost
cd $SRC
wget wget http://voxel.dl.sourceforge.net/project/boost/boost/1.44.0/boost_1_44_0.tar.bz2
tar xjvf boost_1_44_0.tar.bz2
cd boost_1_44_0
# create jam file to configure
echo "using gcc : 4.4 : /opt/ts/gcc/4.4/bin/g++ ; " >> tools/build/v2/user-config.jam
./bootstrap.sh
./bjam \
-q \
-d2 \
--with-thread \
--with-filesystem \
--with-iostreams \
--with-python \
--with-program_options \
--with-system \
--with-regex -sHAVE_ICU=1 -sICU_PATH=/usr/local \
toolset=gcc \
link=shared \
release \
stage
pfexec ./bjam \
-q \
-d2 \
--with-thread \
--with-filesystem \
--with-iostreams \
--with-python \
--with-program_options \
--with-system \
--with-regex -sHAVE_ICU=1 -sICU_PATH=/usr/local \
toolset=gcc \
link=shared \
release \
install
# proj
cd $SRC
VER=4.7.0
wget http://download.osgeo.org/proj/proj-$VER.tar.gz
wget ftp://ftp.remotesensing.org/proj/proj-datumgrid-1.5.zip
tar xzf proj-$VER.tar.gz
cd proj-$VER
cd nad
unzip ../../proj-datumgrid-1.5.zip
cd ..
./configure
make
pfexec make install
# geos
cd $SRC
VER=3.2.0
wget http://download.osgeo.org/geos/geos-$VER.tar.bz2
tar xjf geos-$VER.tar.bz2
cd geos-$VER
./configure
make
pfexec make install
# postgresql
cd $SRC
VER=8.4.4
wget http://wwwmaster.postgresql.org/redir/198/h/source/v$VER/postgresql-$VER.tar.gz
tar xzvf postgresql-$VER.tar.gz
cd postgresql-$VER
./configure --enable-thread-safety
make
pfexec make install
pfexec mkdir /usr/local/pgsql/data
pfexec chown postgres.postgres /usr/local/pgsql/data
pfexec su - postgres
/usr/local/pgsql/bin/initdb /usr/local/pgsql/data/
# Run a postgres instance
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data/
# postgis
cd $SRC
VER=1.5.1
wget http://postgis.refractions.net/download/postgis-$VER.tar.gz
tar xvf postgis-$VER.tar.gz
cd postgis-$VER
./configure --with-projdir=/usr/local/
make
pfexec make install
# create symlinks so that libproj and libgeos can be found be postgis.so
# we need to do this as their appears to be no known way to pass -R/usr/local/lib
# to postgres or postgis at compile time
pfexec ln -s /usr/local/lib/libproj.so.0 /usr/local/pgsql/lib/libproj.so.0
pfexec ln -s /usr/local/lib/libgeos_c.so.1 /usr/local/pgsql/lib/libgeos_c.so.1
# create the template_postgis db
pfexec su - postgres
export PATH=/usr/local/bin:/usr/local/pgsql/bin/:$PATH
export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/pgsql/lib
POSTGIS_SQL_PATH=`pg_config --sharedir`/contrib/postgis-1.5
createdb -E UTF8 template_postgis
createlang -d template_postgis plpgsql
psql -q -d template_postgis -f $POSTGIS_SQL_PATH/postgis.sql
psql -q -d template_postgis -f $POSTGIS_SQL_PATH/spatial_ref_sys.sql
# now switch back to your normal user
exit
# gdal
cd $SRC
VER=1.7.2
wget http://download.osgeo.org/gdal/gdal-$VER.tar.gz
tar xzf gdal-$VER.tar.gz
cd gdal-$VER
./configure --with-proj --with-geos --with-postgres
make
pfexec make install
# osm2pgsql
cd $SRC
#svn co http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/
# grab a hard revision that we know works on solaris (based on wikipedia usage, although they compile with suncc)
svn co -r 19933 http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/
cd osm2pgsql
apply patch
Index: Makefile
===================================================================
--- Makefile (revision 19933)
+++ Makefile (working copy)
@@ -22,6 +22,7 @@
LDFLAGS += -g -lproj
LDFLAGS += -lstdc++
LDFLAGS += -lpthread
+LDFLAGS += -R/usr/local/pgsql/lib -R/opt/ts/lib -R/usr/local/lib
SRCS:=$(wildcard *.c) $(wildcard *.cpp)
OBJS:=$(SRCS:.c=.o)
finish install
make
pfexec cp osm2pgsql /usr/local/bin
pfexec chmod +x /usr/local/bin/osm2pgsql
pfexec mkdir /usr/share/osm2pgsql
# get latest style and install
svn up default.style
pfexec cp default.style /usr/share/osm2pgsql/