Static compilation of Mapserver?

Frank Warmerdam warmerdam at POBOX.COM
Tue Oct 25 09:41:01 EDT 2005


On 10/25/05, Daniele Margotti <margottid at comune.lugo.ra.it> wrote:
>
> Hi list,
>
> I want to use Mapserver on a remote Linux webserver, where I can upoload
> CGIs.
> Unfortunately, I have no shell access to this webserver, so I cannot compile
> Mapserver directly on the machine.
> But I have a Linux PC where I can compile/install all needed libraries
> (Zlib, GD, Gdal, Libtiff, Proj, and so on) and, after that, compile CGI
> Mapserver and PHP Mapscript.
>
> Can I compile it including in the executable all those libraries? Would then
> the Mapserver executable (or the Mapscript module) run even if different
> libraries are installed on the webserver?
> How can I do? (i.e.: which parameters should I add to "./configure" or
> "make", or in the "Makefile"?)

Daniele,

This is theoretically possible, but I think will prove somewhat
challenging. In particular, I think you will find you have to do some
hand editing of the makefile to force use of static versions of libraries.
You will also likely have to recompile some of the dependent libraries
yourself to get static versions.

For libraries like libpng and libz that almost certain to already be on
the server, you could likely leave it as a dependency on the external
shared library.  Everything else should be static.

Good luck,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list