<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Courier New, Courier, monospace"><font size="-1">Hi Josh,<br>
<br>
thanks a lot for the advice.<br>
I recompiled mapserver with LD_OPTIONS set in my environment. Calling
it via browser now works perfectly.<br>
<br>
Thanks once again,<br>
Chris<br>
</font></font><br>
Joshua Buysse schrieb:
<blockquote cite="mid430B3077.4090505@socsci.umn.edu" type="cite">Christian
Schaffer wrote: <br>
<br>
<blockquote type="cite">Hi all, <br>
<br>
I´m working on establishing a mapserver environment for our intranet.
Since I´m pretty new to UMN mapserver, I´d like to apologize in advance
for any stupid questions I might ask. <br>
<br>
Here´s my problem: <br>
I´m on an AMD Opteron based server, Solaris 10 installed with perl
5.8.7, freetype 2.1.10, gd 2.0.33, proj4 4.4.8, curl 7.14.0 and a
couple more packages (gcc, bison, binutils, apache, apache2, several
libs...) installed from blastwave.org. <br>
</blockquote>
<br>
[munch] <br>
<br>
<blockquote type="cite">Seems to be alright up to here, but as soon
as I try to call the mapserv binary via http, it won´t work. <br>
The message in my apache´s error_log reads: <br>
[Tue Aug 23 13:29:10 2005] [error] [client 10.3.3.233] ld.so.1:
/data/www/faithless/cgi-bin/mapserv: fatal: libgdal.so.1: open failed:
No such file or directory <br>
[Tue Aug 23 13:29:10 2005] [error] [client 10.3.3.233] Premature end of
script headers: mapserv <br>
<br>
The libgdal.so.1 can be found in /usr/local/lib: <br>
# ll /usr/local/lib/libgdal.so.1 <br>
lrwxrwxrwx 1 root root 16 Aug 23 11:32
/usr/local/lib/libgdal.so.1 -> libgdal.so.1.8.0 <br>
My apache gets the following LD_LIBRARY_PATH as environment variable: <br>
/opt/csw/apache2/lib:/opt/csw/lib:/opt/csw/gcc3/lib:/opt/csw/include:/opt/csw/kde-gcc/lib:
<br>
/opt/csw/kde-gcc/include:/usr/local/lib:/usr/local/qt/lib:/opt/sfw/lib:/usr/sfw/lib:
<br>
/usr/local/pgsql/lib:/opt/oracle/lib <br>
<br>
I tried with apache 1.3.x as well as with apache 2.0.x, changed the
LD_LIBRARY_PATH to any variation, I could imagine. But no success yet. <br>
<br>
As far as I know, there´s no construction similar to Linux´s
/etc/ld.so.conf and ldconfig on Solaris. So LD_LIBRARY_PATH seems the
only way for me to change the behaviour. <br>
</blockquote>
<br>
Actually, there is an equivalent to ld.so.conf -- but it's not
something that you really want to use if you can avoid it. It's not
really supported or well documented, as far as I can tell. The best
way to handle this is to either set LD_OPTIONS or LD_RUN_PATH. <br>
An example setting that I use (as a blastwave.org maintainer) is this: <br>
<br>
LD_OPTIONS='-R/opt/csw/lib -L/opt/csw/lib -R/usr/local/lib
-L/usr/local/lib' <br>
export LD_OPTIONS <br>
<br>
This example assumes that you're using the Sun compilers -- I have not
tested it with GCC, but I think it should work. If it fails to
compile, you may need to change it (depending on the way that it's
linking) to look more like this: <br>
<br>
LD_OPTIONS='-Wl,--rpath -Wl,/opt/csw/lib -L/opt/csw/lib' <br>
<br>
To check the generated binary and see if it can find the libraries, you
can run 'ldd -s mapserv' and look over the output. It will show the
library search path embedded in the binary and will tell you which
libraries it's linking against -- handy for things like libz.so that
exist in both /usr/lib and /opt/csw/lib (hint: you probably want the
/opt/csw version). <br>
<br>
Email me if you're trying to use optimized sparcv8plusb or sparcv9
binaries or libraries. It gets more complicated then. <br>
One last thing -- if you're trying to link any C++ code against
libraries (that are written in C++, like geos) in /opt/csw, you will
need to use the Sun compilers. No way around it. <br>
<br>
<blockquote type="cite">I´d appreciate any suggestion! <br>
<br>
Thank you very much for helping and best regards, <br>
Chris <br>
</blockquote>
<br>
-Josh <br>
(aka <a class="moz-txt-link-abbreviated"
href="mailto:buysse@blastwave.org">buysse@blastwave.org</a>) <br>
<br>
</blockquote>
</body>
</html>