[Gdal-dev] solaris run-time linkage
Ian MacColl
ianm at itee.uq.edu.au
Tue Apr 22 17:45:08 EDT 2003
Hello:
Is there a way to compile and link gdal and ogr under solaris to
specify search directories for the runtime linker?
I'm compiling mapserv for CGI. I don't control the CGI host so I can't
define LD_LIBRARY_PATH. I can compile and link on an identical solaris
2.8 host using gcc 2.95. Libraries gdal depends on seem to assimilate
LDFLAGS from the environment, with a -R option to pass runtime search
directories. However, gdal uses c++ rather than ld for linkage, and
it's not immediately obvious how to pass the search list through to the
linker (I've tried both -R... and -Wl,-R... in both LD_SHARED and LIBS
in GDALmake.opt). It looks as though the configure scripts sees the
LDFLAGS value, and puts it in config.status, but it doesn't end up in
the gdal make files.
The error that I'm getting, for example when I run ogr2ogr, is failure
to find libproj. I think this means ogr2ogr is finding libgdal, but
libgdal can't find libproj. Setting LD_LIBRARY_PATH makes the error
disappear.
So, is there a way to specify the search directories in libgdal and
friends?
If not, I guess I'm stuck with either the default search directories,
or trying to wrap mapserv in a script that sets LD_LIBRARY_PATH. Any
other ideas?
thanks
Ian
More information about the Gdal-dev
mailing list