Changes between Version 3 and Version 4 of SolarisStaticBuild

Show
Ignore:
Timestamp:
01/26/09 12:50:50 (4 years ago)
Author:
jmckenna
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SolarisStaticBuild

    v3 v4  
    3131You will first need to create an independent development environment. We used /usr/local/static as the root directory for all library and binary installs. This will show up in the configure option --prefix=/usr/local/static 
    3232 
    33 Development Software 1. libiconv GNU libiconv is a conversion library. This package is needed in static form for gcc and mapserv 
    34  
     33=== Development Software ===  
     34 
     351. libiconv GNU libiconv is a conversion library. This package is needed in static form for gcc and mapserv 
     36{{{ 
    3537 $ tar zxvf libiconv-1.9.1.tar.gz 
    3638 $ cd libiconv-1.9.1 
    3739 $ configure --prefix=/usr/local/static  --enable-static=yes 
    3840 $ make; make install 
    39  
     41}}} 
    40422. gcc Yes you need a separate gcc with only static libraries. 
    41  
     43{{{ 
    4244 $ tar zxvf gcc-3.4.0.tar.gz 
    4345 $ cd gcc-3.4.0 
     
    4951 $ make bootstrap 
    5052 $ make install 
    51  
     53}}} 
    5254Supporting programs and libraries Prior to compiling the remaining software you'll need to adjust the enviroment variables PATH and LD_LIBRARY_PATH. 
    5355 
    5456In csh or tcsh: 
    55  
     57{{{ 
    5658 % setenv PATH "/usr/local/static/bin:/bin:/usr/bin:/usr/ccs/bin:/usr/local/bin" 
    5759 % setenv LD_LIBRARY_PATH "/usr/local/static/lib:/lib:/usr/lib:$ORACLE_HOME/lib" 
    58  
     60}}} 
    5961In ksh or bash: 
    60  
     62{{{ 
    6163 $ export PATH="/usr/local/static/bin:/bin:/usr/bin:/usr/ccs/bin" 
    6264 $ export LD_LIBRARY_PATH="/usr/local/static/lib:/lib:/usr/lib:$ORACLE_HOME/lib" 
    63  
     65}}} 
    6466freetype 
    65  
     67{{{ 
    6668 $ tar zxvf freetype-2.1.4.tar.gz 
    6769 $ cd freetype-2.1.4 
     
    6971 $ make 
    7072 $ make install 
    71  
    72 jpeg If 'make test' doesn't complain, you're okay. 
    73  
     73}}} 
     74jpeg  
     75 
     76If 'make test' doesn't complain, you're okay. 
     77{{{ 
    7478 $ tar zxvf jpegsrc.v6b.tar.gz 
    7579 $ cd jpeg-6b 
     
    7983 $ make install 
    8084 $ make install-lib 
    81  
    82 zlib The test should tell you it went smoothly by printing '*** zlib test OK ***'. 
    83  
     85}}} 
     86zlib  
     87 
     88The test should tell you it went smoothly by printing '*** zlib test OK ***'. 
     89{{{ 
    8490 $ tar zxvf zlib-1.1.4.tar.gz 
    8591 $ cd zlib-1.1.4 
     
    8894 $ make test 
    8995 $ make install 
    90  
    91 png For this one you have to copy the appropriate Makefile for your system from the scripts directory. There's a generic one for solaris that works. When you run 'make test', you should see 'PASS (9782 zero samples)' in the output and 'libpng passes test' at the very end if all went smoothly. As you can see we need to use sed to make some changes to three internal variables so the install and make will go where we want. 
    92  
     96}}} 
     97png  
     98 
     99For this one you have to copy the appropriate Makefile for your system from the scripts directory. There's a generic one for solaris that works. When you run 'make test', you should see 'PASS (9782 zero samples)' in the output and 'libpng passes test' at the very end if all went smoothly. As you can see we need to use sed to make some changes to three internal variables so the install and make will go where we want. 
     100{{{ 
    93101 $ tar zxvf libpng-1.2.5.tar.gz 
    94102 $ cd libpng-1.2.5 
     
    102110 $ make install-headers 
    103111 $ make install-static 
    104  
    105 tiff This configure script is interactive, but you can turn that off with the --noninteractive flag. Since the prefix doesn't work for the man page install, I've included a sed command that fixes the problem. 
    106  
     112}}} 
     113tiff  
     114 
     115This configure script is interactive, but you can turn that off with the --noninteractive flag. Since the prefix doesn't work for the man page install, I've included a sed command that fixes the problem. 
     116{{{ 
    107117 $ tar zxvf tiff-v3.6.0.tar.gz 
    108118 $ cd tiff-v3.6.0 
     
    112122 $ make -f Makefile.1 install 
    113123 $ rm /usr/local/static/lib/libtiff.so 
    114  
    115 gd Everything works fine here. gd needs the libiconv shared library to compile. 
    116  
     124}}} 
     125gd  
     126 
     127Everything works fine here. gd needs the libiconv shared library to compile. 
     128{{{ 
    117129 $ tar zxvf gd-2.0.21gif.tar.gz 
    118130 $ cd gd-2.0.21gif 
     
    120132 $ make 
    121133 $ make install 
    122  
    123 proj The usual with a little file moving. Proj has two parts, the main projection engine (proj-4.4.7.tar.gz) and datum support files (proj-nad27-1.1.tar). The datum files must be untarred into the nad subdirectory of proj, as follows: 
    124  
     134}}} 
     135proj  
     136 
     137The usual with a little file moving. Proj has two parts, the main projection engine (proj-4.4.7.tar.gz) and datum support files (proj-nad27-1.1.tar). The datum files must be untarred into the nad subdirectory of proj, as follows: 
     138{{{ 
    125139 $ tar zxvf proj-4.4.7.tar.gz 
    126140 $ cd proj-4.4.7/nad 
     
    130144 $ make 
    131145 $ make install 
    132  
    133 pdf Nothing special here. 
    134  
     146}}} 
     147pdf  
     148 
     149Nothing special here. 
     150{{{ 
    135151 $ tar zxvf pdflib-4.0.3.tar.gz 
    136152 $ cd pdflib-4.0.3 
     
    139155 $ make test 
    140156 $ make install 
    141  
    142 curl This package in particular is used by mapserver 4.x.x instead of libwww which was used in previous mapserver versions. 
    143  
     157}}} 
     158curl  
     159 
     160This package in particular is used by mapserver 4.x.x instead of libwww which was used in previous mapserver versions. 
     161{{{ 
    144162 $ tar zxvf curl-7.10.8.tar.gz 
    145163 $ cd curl-7.10.8 
     
    147165 $ make 
    148166 $ make install 
    149  
    150 gdal Almost done with supporting packages... 
    151  
     167}}} 
     168gdal  
     169 
     170Almost done with supporting packages... 
     171{{{ 
    152172 $ tar zxvf gdal-1.2.0.tar.gz 
    153173 $ cd gdal-1.2.0 
     
    155175 $ make 
    156176 $ make install 
    157  
    158 ORACLE For Oracle connections, MapServer needs Oracle client version 8.1.7 or later, earlier versions will not work. 
    159  
    160 Installing MapServer The install process below assumes you would like to build MapServer with ORACLE support. Set the proper versions and locations for your installations of ORACLE and gd. Before you build, make sure ORACLE_HOME is correct and that $ORACLE_HOME/lib is in your LD_LIBRARY_PATH. In the examples below, Apache's web documents directory is /opt/html and its cgi-bin is /opt/cgi-bin. Set them to the appropriate directories on your system. 
    161  
     177}}} 
     178ORACLE  
     179 
     180For Oracle connections, MapServer needs Oracle client version 8.1.7 or later, earlier versions will not work. 
     181 
     182Installing !MapServer  
     183 
     184The install process below assumes you would like to build MapServer with ORACLE support. Set the proper versions and locations for your installations of ORACLE and gd. Before you build, make sure ORACLE_HOME is correct and that $ORACLE_HOME/lib is in your LD_LIBRARY_PATH. In the examples below, Apache's web documents directory is /opt/html and its cgi-bin is /opt/cgi-bin. Set them to the appropriate directories on your system. 
     185 
     186{{{ 
    162187 $ tar zxvf mapserver-4.2.1.tar.gz 
    163188 $ cd mapserver-4.2.1 
    164189 $ ./configure  --without-jpeg                  --with-gd=../gd-2.0.21gif               --with-freetype=/usr/local/static               --enable-force-freetype1                --with-zlib             --with-png              --with-pdf              --without-tiff                  --without-eppl                  --with-proj             --with-ogr              --with-gdal=../gdal-1.2.0/apps/gdal-config              --with-wmsclient --with-wfsclient               --with-oraclespatial=$ORACLE_HOME               --with-sde=/opt2/sde/sdeexe83 --with-sde-version=83 \ <-- if using SDE input 
    165190                --with-wfs --enable-debug --without-httpd 
    166  
    167 Edit the Makefile Find the line that begins with: GDAL_LIB= Change the last part of the line to look like: gdal-1.2.0/.libs/libgdal.a -lNCSEcw -lNCSUtil The -lNCSEcw -lNCSUtil is needed if you are including ECW support $ make mapserv The resulting executable should have 755 permissions. If it doesn't, set it that way and then trying running it: $ chmod 755 mapserv $ ./mapserv You should get this message: This script can only be used to decode form results and should be initiated as a CGI process via a httpd server. Next, copy the executable into your cgi-bin directory and make it owned by the user id under which apache runs (normally apache or nobody). $ cp mapserv <webserver-root>/cgi-bin $ chown nobody:nobody <webserver-root>/cgi-bin/mapserv Now try accessing MapServer from a web page by going to this URL on your host: http://myhost/cgi-bin/mapserv This should produce the message: 
     191}}} 
     192Edit the Makefile  
     193 
     194Find the line that begins with: GDAL_LIB= Change the last part of the line to look like: gdal-1.2.0/.libs/libgdal.a -lNCSEcw -lNCSUtil The -lNCSEcw -lNCSUtil is needed if you are including ECW support $ make mapserv The resulting executable should have 755 permissions. If it doesn't, set it that way and then trying running it: $ chmod 755 mapserv $ ./mapserv You should get this message: This script can only be used to decode form results and should be initiated as a CGI process via a httpd server. Next, copy the executable into your cgi-bin directory and make it owned by the user id under which apache runs (normally apache or nobody). $ cp mapserv <webserver-root>/cgi-bin $ chown nobody:nobody <webserver-root>/cgi-bin/mapserv Now try accessing MapServer from a web page by going to this URL on your host: http://myhost/cgi-bin/mapserv This should produce the message: 
    168195 
    169196No query information to decode. QUERY_STRING is set, but empty. Next, install the MapScript perl module. MapScript for PHP is also available, but instructions for installing it are not included here. For this part, you will need to have Perl installed on your machine. $ cd mapscript/perl $ perl Makefile.PL $ make $ make install 
     
    171198Done! 
    172199 
    173 Common Problems One common problem is getting Apache's environment variables right. In order to run MapServer, it needs to have the correct LD_LIBRARY_PATH. Set this by adding a line like the following to the beginning of Apache's httpd.conf file. setenv LD_LIBRARY_PATH /lib:/usr/lib:/usr/local/lib:/oracle/9.2/lib:/opt2/sde/sdeexe83/lib If you can run MapServer at the command line without any problems, but get 'Internal Server Error' when accessing it via the web, most likely your environment does not match Apache's. If Apache cannot run MapServer due to LD_LIBRARY_PATH problems, it will complain about a missing library. The resulting error in Apache's error log will probably look something like this: ld.so.1: mapserv: fatal: libclntsh.so.8.0: open failed: No such file or directory In this case, it was looking for an oracle library that it could not find. For such problems, make sure Apache also has ORACLE_HOME set in httpd.conf as well, like so: setenv ORACLE_HOME /oracle/9.2 A common problem with installing MapScript/perl is that it will not compile with some older versions of Perl. In testing, the MapScript Perl module compiled successfully using Perl v5.8.3.  
     200== Common Problems ==  
     201 
     202One common problem is getting Apache's environment variables right. In order to run MapServer, it needs to have the correct LD_LIBRARY_PATH. Set this by adding a line like the following to the beginning of Apache's httpd.conf file. setenv LD_LIBRARY_PATH /lib:/usr/lib:/usr/local/lib:/oracle/9.2/lib:/opt2/sde/sdeexe83/lib If you can run MapServer at the command line without any problems, but get 'Internal Server Error' when accessing it via the web, most likely your environment does not match Apache's. If Apache cannot run MapServer due to LD_LIBRARY_PATH problems, it will complain about a missing library. The resulting error in Apache's error log will probably look something like this: ld.so.1: mapserv: fatal: libclntsh.so.8.0: open failed: No such file or directory In this case, it was looking for an oracle library that it could not find. For such problems, make sure Apache also has ORACLE_HOME set in httpd.conf as well, like so: setenv ORACLE_HOME /oracle/9.2 A common problem with installing MapScript/perl is that it will not compile with some older versions of Perl. In testing, the MapScript Perl module compiled successfully using Perl v5.8.3.