ResponseMX with MapServer on Linux
It’s been over 6 months since we integrated MapServer with ResponseMX. In that time we’ve used the open source mapping engine for several custom ResponseMX applications, but until now we’ve only been able to offer ResponseMX with MapServer on a Windows operating system.
While the interfaces into MapServer (using MapScript Java) are consistent across both platforms the installations of MapServer are, as you would expect, radically different. All the binaries for MapServer on Windows come as a single package (MS4W). On Linux, however, MapServer is distributed as source code which must be compiled - along with all its dependent libraries.
Help is at hand, though. Frank Warmerdam provides an excellent set of libraries known as FWTools which bundles together most of the libraries required to compile MapServer. This package is a huge shortcut, saving several man-days of effort over configuring and compiling the libraries individually, from scratch.
While there are a number of pitfalls en route to successfully compiling MapServer, nearly all are well documented on the mapserver user forum. However, there was one issue we couldn’t find help for. The following error message occurred when the MapServer library loaded in the JVM:
java.lang.UnsatisfiedLinkError:<br />/usr/local/mapserver-4.8.4/src/mapscript/java/libmapscript.so: /usr/local/FWTools-1.3.1/lib/libtiff.so.3: undefined symbol: jpeg_resync_to_restart.
This error originates from the libtiff library, and occurs even if tiff support is turned off when compiling MapServer. It had us scratching our heads for some time. The problem is caused by a conflict between the jpeg library in FWTools and the jpeg library that comes with Java (read more). Fortunately this problem is specific to the latest versions of FWTools, v1.3.1 and v1.3.2. Installing and using an earlier version (v1.1.1) resolves the runtime error.
