making the server
Stephen Lime
steve.lime at dnr.state.mn.us
Fri May 12 09:24:45 PDT 2000
Configure will fix the compilation. Dealing with shared libraries is another problem
entirely. It's best handled in the web server configuration. Both netscape and apache
have directives directives to set environment variables for CGI scripts. I've used both
servers with mapserver and shared libraries with no problems. In apache for example
you simply add:
setenv LD_LIBRARY_PATH /usr/local/lib
to httpd.conf and restart.
Steve
Stephen Lime
Internet Applications Analyst
Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937
>>> Daniel Morissette <danmo at videotron.ca> 05/12/00 10:58AM >>>
Stephen Lime wrote:
>
> Sorry guys. This should get easier. Dan Morissette has contributed auto configure
> scripts for the next version. They are in the CVS and nightly builds now and seems
> to work great.
>
Unfortunately, I do not think that the current version of the configure
script will solve that problem though.
It seems to me like this is not a compilation problem, but a runtime
library path problem where libttf.so.2 is not found in the regular lib
search path. This type of problem is never fun... I ran into a similar
thing on a SUN system that I use and that has a specially odd
configuration. I tried setting LD_LIBRARY_PATH before starting Apache
but that did not work.
Since I did not have root access on that system to go change the system
lib path (/etc/ld.so.conf), the only way that I found to go around the
problem was to use ld command-line options to add the directory where my
libs are to the runtime library search path... something like...
Using gcc:
gcc -G -Wl,-R -Wl,.:/path/to/my/libs ......
or using ld directly:
ld -G -R.:/path/to/my/libs ....
These are options for the ld that I had on Solaris 2.6, I think that on
Linux the "-R" option would actually be called "-rpath".
BTW, I guess a simpler solution would be to link with a static libttf.a,
as someone suggested but unfortunately freetype does not build libttf.a
by default... so you're stuck with shared libs only.
Also, I think (but I didn't try it myself) that linking your shared lib
using an absolute path instead of using the "-L" linker option might
allow your executable to find the lib at runtime without having to
modify the runtime lib search path.
e.g. In the Makefile, try using:
TTF_LIB=-L./gdft -lgdft /opt/contrib/lib/libttf.so
Please let us know if any of that solves your problem and we'll try to
give the configure scripts the ability to handle those odd cases.
--
------------------------------------------------------------
Daniel Morissette danmo at videotron.ca
http://pages.infinit.net/danmo/
------------------------------------------------------------
Don't put for tomorrow what you can do today, because if
you enjoy it today you can do it again tomorrow.
>
> >>> John Hockaday <johnh at erin.gov.au> 05/11/00 08:21PM >>>
> Ma,
>
> I got the same error after I moved mapserv from one machine to another. I was
> able to solve the problem by editing the Makefile and putting the full path name
> to the libttf.a library file. Eg.
>
> TTF_LIB=-L./gdft -lgdft /opt/contrib/lib/libttf.a
>
> I hope this helps.
>
> Johnh
>
> > Date: Fri, 12 May 2000 00:25:58 +0100
> > From: Ma <marin at hi.is>
> > X-Accept-Language: en
> > MIME-Version: 1.0
> > To: "mapserver-users at lists.gis.umn.edu" <mapserver-users at lists.gis.umn.edu>
> > Subject: making the server
> > Content-Transfer-Encoding: 7bit
> >
> > Hi,
> >
> > I got the following error when I tried to initiated the script with
> > browser:
> >
> > ld.so.1: map.cgi: fatal: libttf.so.2: open failed: No such file or
> > directory
> > [Fri May 12 18:15:12 2000] [error] [client localhost] Premature end of
> > script headers: /usr/local/web/maps/mapserv.cgi
> >
> > I have also LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
> >
> > What is wrong and how to fix it?
> >
> > ---
> > Ma
> >
> >
More information about the MapServer-users
mailing list