[mapserver-users] how come drawMap works?

Steve Lime steve.lime at dnr.state.mn.us
Wed Apr 3 17:15:43 EST 2002


My point is that if you're going to install libmap.a in a system
directory and don't replace it
when appropriate then you're bound to run into problems at some point.
There is no
"make install" for libmap.a as part of the main makefile for just that
reason. Unless there's a
good reason to install libmap.a (you're building your own C/C++ code
using it) then there's
no reason to install it.

Dan's the keeper of the PHP code so he'll have to make those
changes...

Steve

Stephen Lime
Data & Applications Manager

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

>>> Stephen Woodbridge <woodbri at swoodbridge.com> 04/03/02 03:35PM >>>
But mapscript gets built as part of make with the wrong library. So
what
you are saying is ...

 1) make to build libmap.a
 2) make install to install the new lib
 3) make clean to remove the bad mapscript that was built the first
time
 4) make again to build everything with the correct libmap.a

OR

change the Makefile to explicitly load the libmap.a you just built and
expect to be loaded as part of the build process.

AND

if you don't know all about this in the first place you are basically
screwed!

I think the general expectation is that when I build mapserver and
mapscript that it gets built with the current libraries not some left
over thing that is just out there from the last time you installed
software some 3, 6, 9 , 12, 18 months ago.

I agree this is a good feature of ld, but I respectfully disagree that
our Makefile(s) should pick up the old version when it is a simple
change to force it to pick up the correct one.

Libs in the system directory are only loaded based on the -L path and
-lmap directives, if instead ../../libmap.a were explicitly loaded
like
a .o file this problem would go away. Here is the change I made to my
Makefile:

php_mapscript.so: $(PHPMS_OBJS) ../../libmap.a
        $(LD) -o $@ $(PHPMS_OBJS) $(MS_LIBS)

which I think you will find solves this problem.

-Steve W.

Steve Lime wrote:
> 
> I don't believe this can be classified as a build bug. One could call
it
> a feature of ld. If you
> "install" libmap.a in the system libraries then of course you need
to
> install the new one
> before building mapscript. The same goes for GD, Freetype, libtiff
> etc...
> 
> Changing the Makefile won't help. Libs in the system directories
always
> override local copies.
> 
> Steve
> 
> Stephen Lime
> Data & Applications Manager
> 
> Minnesota DNR
> 500 Lafayette Road
> St. Paul, MN 55155
> 651-297-2937
> 
> >>> Stephen Woodbridge <woodbri at swoodbridge.com> 04/02/02 04:37PM
>>>
> I think I have an idea about this. There is a serious bug in the
build
> environment - when you build mapscript it does NOT link with the
just
> built libmap.a!!!! It links with the installed version of libmap.a
if
> it
> exists! The Makefile(s) for mapscript need to explicitly load
> ../..libmap.a so insure that the correct one is loaded.
> 
> Puneet, see if you have a /usr/lib/libmap.a or
/usr/local/lib/libmap.a
> and delete it then make clean; make and you will probably get the
> error.
> 
> Could somebody chnage the Makefile(s). I will add this to bugzilla.
> 
> -Steve Woodbridge
> 
> Puneet Kishor wrote:
> >
> > dunno man... no error at all... it happily draws the map for me.
go
> figure.
> >
> > pk/
> >
> > > -----Original Message-----
> > > From: Daniel Morissette [mailto:morissette at dmsolutions.ca] 
> > > Sent: Tuesday, April 02, 2002 11:03 AM
> > > To: Puneet Kishor
> > > Cc: MapServer-list
> > > Subject: Re: [mapserver-users] how come drawMap works?
> > >
> > >
> > > Puneet Kishor wrote:
> > > >
> > > > I quite accidentally had been using drawMap() for rendering
> > > my map, until I
> > > > discovered that was not a part of PHP/Mapscript 3.5
> > > anymore. So, how the
> > > > heck does it still work? Did you folks leave it in there for
> > > > backward-compatibility?
> > > >
> > >
> > > drawMap() is not there at all in PHP/Mapscript 3.5 ... you
> > > should get an
> > > error about this in your HTML source (do a "View Source" in your
> > > browser).
> > >
> > > --
> > > ------------------------------------------------------------
> > >  Daniel Morissette               morissette at dmsolutions.ca 
> > >  DM Solutions Group              http://www.dmsolutions.ca/ 
> > > ------------------------------------------------------------
> > >   Don't put for tomorrow what you can do today, because if
> > >       you enjoy it today you can do it again tomorrow.
> > >



More information about the mapserver-users mailing list