Geospatial – News

Making a MapServer + AGG build that doesn’t suck

27 April 2009
from the oh-why-wasnt-this-done-ages-ago-dept.

Until now, MapServer has relied on an external link to the AGG library, rather than including the AGG source tree as is common in the other cartographic servers (namely mapnik and maguide). While this was rather painless on Debian based systems if all you needed was the CGI mapserv binary, things could get tricky if you waded outside of this rather constrained scenario:

  • Distros packaged the AGG library in different manners, with support for different features (namely the freetype backend). This meant you often had to rebuild AGG from source more often than less.
  • Some distros actually packaged a broken version of AGG, although some blame has to be taken by the AGG package itself for making multiple releases under the same version number.
  • If you needed python mapscript support, you were in for a round of Makefile patching: adding -fPIC to the compiler flags and manually creating a shared library. A long bugreport has lived on in the mapserver trac for instructions on how to do this on different platforms.

I am pleased to announce that this will hopefully be over soon, as we will now be forking the AGG library into the mapserver codebase. This was rather painless, aside from the fact that the code was patched to be in a mapserver:: namespace instead of the default agg:: one, in order to avoid eventual namespace clashing in the case of mapscript (this might have happened in python, when loading mathplotlib alongside mapscript).

Building an AGG-enabled MapServer should now be much less of a pain, a simple ./configure should be enough. (add the –with-agg=no option if you don’t want AGG included)

The current code currently lives in a sandbox on the MapServer SVN, and will be merged into the trunk some time soon if we see nothing fishy going on. If you feel brave, please test it out and report any issues:

svn co

Hinterlassen Sie einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.