[FWTools] FWTools3 Experiment
Even Rouault
even.rouault at mines-paris.org
Sat Dec 18 17:12:24 EST 2010
> > * Debian Lenny 32 bit : OK. I've noticed that it used an older
> > installation of /usr/lib/ogdi/libvrf.so instead of the one in
> > $FWTOOLS_ROOT/usr/lib/ogdi.
>
> Hmm, I'm not sure why this is.
>
> I will say that I noticed my local system versions of some packages
> like libsqlite.so were being used in preference to the ones in FWTools.
> I tracked this down to the rpath attribute in various built binaries.
> I've added a step to my preparation to strip out rpaths from binaries
> and shared libraries. I documented this on my blog:
>
> http://fwarmerdam.blogspot.com/
Interesting reading. "man dlopen" on my Ubuntu 10.04 gives indeed the loading
order you mention in your blog.
>
> Perhaps that will also address the libvrt issue?
Unfortunately not. I've tracked down to OGDI source itself and hardcoded paths
In ogdi-3.2.0.beta2/ogdi/c-api/ecs_dyna.c :
if !defined(MODULES_PATH)
#define MODULES_PATH "/usr/lib/ogdi/"
#endif
void *handle;
handle = dlopen(libname,RTLD_LAZY);
if (handle != NULL)
return handle;
/* Even Rouault : here we would need something like */
/* this to search in the LD_LIBRARY_PATH before trying the */
/* hardcoded MODULES_PATH */
if ((temp = (char *) malloc(strlen(libname)+7)) == NULL)
return NULL;
sprintf(temp,"lib%s.so",libname);
handle = dlopen(temp,RTLD_LAZY);
free(temp);
if (handle != NULL)
return handle;
/* end of addition */
if ((temp = (char *) malloc(strlen(MODULES_PATH)+strlen(libname)+1)) ==
NULL)
return NULL;
sprintf(temp,MODULES_PATH "%s",libname);
handle = dlopen(temp,RTLD_LAZY);
free(temp);
if (handle != NULL)
return handle;
if ((temp = (char *) malloc(strlen(MODULES_PATH)+strlen(libname)+7)) ==
NULL)
return NULL;
sprintf(temp,MODULES_PATH "lib%s.so",libname);
handle = dlopen(temp,RTLD_LAZY);
free(temp);
if (handle == NULL) {
/* Try with the .so extension */
if ((temp = (char *) malloc(strlen(libname)+7)) == NULL)
return NULL;
strcpy(temp,"lib");
strcat(temp,libname);
strcat(temp,".so");
handle = dlopen(temp,RTLD_LAZY);
#ifdef notdef
printf( "dlopen(%s) error: %s\n", temp, dlerror() );
#endif
free(temp);
}
return handle;
>
> Today I also stripped out some stuff that did not seem necessary to
> make the whole package smaller. Python distutils, some docs and the
> distributed .pyc files. New packages at:
>
> http://home.gdal.org/fwtools/FWTools-linux-i686-3.0.2.tar.gz
> http://home.gdal.org/fwtools/FWTools-linux-x86_64-3.0.2.tar.gz
>
> I greatly appreciate the alpha testing.
>
> Best regards,
More information about the FWTools
mailing list