[mapserver-users] compilation question

Stephen Lime steve.lime at dnr.state.mn.us
Wed Dec 26 17:06:13 EST 2001


> All these various components that Mapserver depends on (gd, which in 
> turn depends on libpng and libjpeg and freetype; gdal; proj4, etc. 
> etc.)... what happens to these during compilation?

> Do they get statically embedded inside Mapserver, or do they have to 
> hang around the computer somewhere only to be dynamically called by 
> Mapserver as and when desired?

Depends on how the dependent libraries are built. If available as shared libraries then the linker defaults to those. If only available as static libraries then they are incorporated into the binary.

> If the latter (dynamically linked), how is possible to do the former 
> (statically linked)?

The problem is how the linker works and that varies from compiler to compiler and OS to OS. On linux the linker always defaults to using the shared version. I thought Dan did some work on forcing a static link but I don't know if he was successful. In practice all of the dependent packages can be compiled into static libs although the process varies for each (i.e. read the docs). 

I've typically just moved the shared stuff someplace temporarily and then compiled the MapServer against the static versions and finally moved the shared versions back. 

> Tia,

> pk/

Steve

Stephen Lime
Data & Applications Manager

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937




More information about the mapserver-users mailing list