[mapserver-dev] Re: libtool usage

thomas bonfort thomas.bonfort at gmail.com
Mon Dec 19 07:05:36 EST 2011


I'll assume that no response is a positive outcome, so I would like to
move forward with this, along with two other tickets that are related:

 - http://trac.osgeo.org/mapserver/ticket/3099
 - http://trac.osgeo.org/mapserver/ticket/2565

Those two tickets required a substantial refactoring of the code in
mapserv.c, in order to factor out the argument parsing code so it
could be used inside an apache module (ticket 2565 only supports ows
requests, my implementation supports the full mapserv cgi kvp
paramaters), and to prevent calls to exit() which are incompatible
with some fastcgi managers and an apache module usage.

The libtool refactoring of our build process is required to be able to
easily build a shared libmapserver library to be included in the httpd
runtime, the implications are:
 - removal of all the custom made shared library stuff in
configure/Makefile, letting libtool take care of platform specific
constraints of shared library building
 - a more standard way of running the "make install" target, libraries
and binaries will correctly installed to the chosen prefix. libtool
takes care of runtime path setting so there is no need of playing with
LD_* environment variables in case a non-standard location is chosen.
 - the binaries will be dynamically linked to libmapserver.so by
default instead of statically as is the case now. This can be
overriden at configure time with the --disable-shared flag for those
who need a statically linked mapserv binary. Having the cgi/fastcgi
mapserv dynamically linked to libmapserver will probably reduce the
memory usage of multiple processes running concurrently on a server.
 - the mapscript building code will have to be adapted
 - there might (will?) be some issues with the build process and/or
the mapserv cgi due to the refactoring, but I am rather confident that
they can be ironed out as they occur before we release 6.2

Unless there are any objections until then I will be calling for a
vote on this tomorrow (I don't think this task warrants an RFC).

best regards,

thomas

On Sun, Dec 18, 2011 at 15:26, thomas bonfort <thomas.bonfort at gmail.com> wrote:
> While trying to build mapserver as a shared library, it occured to me
> that our build-process is rather fragile. (For the curious this is
> ongoing work on making a mapserver apache module, which requires a
> clean+crossplatform way of loading the libmapserv shared library into
> the httpd server).
>
> Is there a reason we are not using libtool for managing the
> compilation tasks for us?
> I know gdal can be configured to build with or without libtool, is
> there a reason to maintain both build scripts?
>
> regards,
>
> thomas


More information about the mapserver-dev mailing list