[mapserver-dev] Revisit installing multiple mapserver versions

Stephen Woodbridge woodbri at swoodbridge.com
Mon Jul 16 12:11:36 PDT 2012

On 7/16/2012 12:45 PM, thomas bonfort wrote:
> I believe we have 2 options here:
> - without any change to our build, you can configure with
> --prefix=/usr/local/mapserver-6.2, then
> /usr/local/mapserver-6.2/bin/mapserv will link to
> /usr/local/mapserver-6.2/lib/libmapserver.so, and your multiple
> mapserv binaries can be copied around and will link to their original
> libmapserver.so location

While this seems straight forward, I really don't like the proliferation 
of directories and the potential impact on PATH, LD_LIBRARY_PATH, 
INCLUDE to manage these. As an occasional hacker, I can certainly manage 
this on my personal systems, but my concern is the need to manage this 
in production environments.

I also think that this requires setting LD_LIBRARY_PATH appropriately 
for the the executable in question to find its appropriate library.

> - we can update our build process to add libtool version-info
> information, which is supposed to work in this case. This will need to
> be manually tweaked at release time as the libtool version-info isn't
> related to our own versioning scheme (c.f.
> http://www.freesoftwaremagazine.com/articles/building_shared_libraries_once_using_autotools,
> scroll down to "The Libtool library versioning scheme")

OK, this is an extra step (and something that needs to be added to the 
release check list) from a development point of view to make sure we 
version things correctly it clearly seems to be the right way to go. 
 From the end users point of view and the system admin managing 
deployment this should be straight forward and intuitive and should 
minimize support questions and issues. I strongly recommend that 
mapserver adopt this as part of our release practice.

Would you like me to open a ticket requesting this?

BTW, thanks for the libtool article, that was very informative.

   -Steve W

> thomas
> On Mon, Jul 16, 2012 at 5:50 PM, Stephen Woodbridge
> <woodbri at swoodbridge.com> wrote:
>> Thomas,
>> I am have a problem with multiple mapserver versions installed. This is a
>> common scenario in many environments. Looking at my system, I have:
>>> woodbri at mappy:$ ls /usr/local/lib/libmaps* -l
>>> -rwxr-xr-x 1 root root 5942968 2012-07-02 09:36
>>> /usr/local/lib/libmapserver-6.1-dev.so
>>> -rwxr-xr-x 1 root root 5934502 2012-07-14 17:10
>>> /usr/local/lib/libmapserver-6.2.0-beta1.so
>>> -rwxr-xr-x 1 root root 5935167 2012-07-14 23:24
>>> /usr/local/lib/libmapserver-6.3-dev.so
>>> -rwxr-xr-x 1 root root    2066 2012-07-14 23:24
>>> /usr/local/lib/libmapserver.la
>>> lrwxrwxrwx 1 root root      23 2012-07-14 23:24
>>> /usr/local/lib/libmapserver.so -> libmapserver-6.3-dev.so
>>> woodbri at mappy:$ ls /usr/local/lib/libmapserver.so -l
>>> lrwxrwxrwx 1 root root 23 2012-07-14 23:24 /usr/local/lib/libmapserver.so
>>> -> libmapserver-6.3-dev.so
>>> woodbri at mappy:$ ls /usr/local/bin/mapserv
>>> /usr/local/bin/mapserv
>>> woodbri at mappy:$ mapserv -v
>> This one works fine since it was last installed. But my typical pattern is
>> to install mapserver then:
>>    cp /usr/local/bin/mapserv /path/to/cgi-bin/mapserv-<version>
>> So I have these on my system:
>> /usr/lib/cgi-bin/mapserv
>> /usr/lib/cgi-bin/mapserv-6.1-dev
>> /usr/lib/cgi-bin/mapserv-6.2-beta1
>> /usr/lib/cgi-bin/mapserv-60
>> /usr/lib/cgi-bin/mapserv-tc
>> I think the problem is the symlink:
>> /usr/local/lib/libmapserver.so -> libmapserver-6.3-dev.so
>> Ideally the executable should try to load the explicit library that it was
>> built against and not some generic libmapserver.so that is a symlink and
>> then I think everything would work just fine.
>> Is this something that can be done?
>> Thanks,
>>    -Steve
>> _______________________________________________
>> mapserver-dev mailing list
>> mapserver-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev

More information about the mapserver-dev mailing list