can't find libproj.so

nakiya123 nakiya123 at y...
Wed Nov 20 09:57:35 EST 2002


--- In gdal-dev at y..., Frank Warmerdam <warmerdam at p...> wrote:
> nakiya123 wrote:
> > I am trying to use an OGRCoordinateTransformation object but it fails
> > with:
> > 
> > ERROR 6: Unable to load PROJ.4 library (libproj.so), creation of
> > OGRCoordinateTransformation failed.
> > 
> > My program uses the proj4 library directly for coordinate
> > transformations(pj_fwd, etc.) and it works, so it must be finding the
> > library. It's in my LD_LIBRARY_PATH and I even set it up in my
> > ld.so.conf path/setup stuff. It shows in this:
> > 
> > % ldconfig -p | grep -i proj
> > libproj.so.0 (libc6) => /home/dmingus/lib/proj4/lib/libproj.so.0
> > libproj.so (libc6) => /home/dmingus/lib/proj4/lib/libproj.so
> > libmrproject.so.0 (libc6) => /usr/lib/libmrproject.so.0
> > 
> > I'm running RH8.0 with gcc-3.2.7, gdal from cvs(thanks for j2k!!!),
> > and proj-4.4.4 AND I've tried proj-4.4.5 both from source. Any
> > suggestions?
> 
> Hmm,
> 
> This is odd. You could try building and installing PROJ.4 from CVS, but
> I don't think that should be necessary. You might also want to put
some
> printf() statements in LoadProjLibrary() in ogrct.cpp to see what
> part is failing. Is it the initial CPLGetSymbol() call for
"pj_init", or
> one of the new functions?
> 
> If the initial CPLGetSymbol() is failing then the problem is somehow
related
> to your search paths (ie. LD_LIBRARY_PATH).
> 
> I would also suggest setting the CPL_LOG_ERRORS environment variable
to some
> non-empty value, and setting the CPL_DEBUG environment variable to
ON. This
> might cause CPLGetSymbol() to cough up some extra info on why the shared
> library load is failing.
> 
> Best regards,
> 
> -- 
>

CPL_LOG_ERRORS & CPL_DEBUG did nothing. I put printf's around the
loading of pj_init like this:
---------------------------------------------------------
printf( "********** DEBUGGING INFO: Gunna load pj_init... " );
pfn_pj_init = (projPJ (*)(int, char**)) CPLGetSymbol( LIBNAME,
"pj_init" );
CPLPopErrorHandler();

if( pfn_pj_init == NULL )
return( FALSE );

printf( "done **********\n" );
----------------------------------------------------------

"done" does not get printed. I tried the proj-cvs. Same results. I
did notice though that my program reports this:

% ldd lv
libproj.so.0 => /home/dmingus/lib/proj4/lib/libproj.so.0 (0x40013000)
libgdal.so => /home/dmingus/lib/gdal/lib/libgdal.so (0x40042000)
libGLU.so.1 => /usr/lib/libGLU.so.1 (0x402cb000)

notice the libproj.so.0. There is a libproj.so link pointing to the
same place that libproj.so.0 does which is libproj.so.0.3.1. From my
recolection, it should be linking up with libproj.so instead of
libproj.so.0 right? So I removed libproj.so.0 to force it, recompiled
and ldd showed:

libproj.so.0 => not found

funny!

Regardless, this looks like it's on my end so consider this a status
report instead of a troubleshooting request, unless you know exactly
what I'm doing wrong.

Thanks


---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at p...
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush | Geospatial Programmer for Rent





More information about the Gdal-dev mailing list