Haroon Nassiry wrote:

> In fact we are using crle to fix the locations of the libraries, that is 
> why we are using it ( the reason we are doing this is because we put C++ 
> objects in shared memory and all processes using those objects MUST see 
> the vtables for those object at the same offset, otherwise SEGVs occur 
> when a process calls virtual function on object created by different 
> process ).

Oh, I see.

Then let's return to your original example.  When you create an
"alternative" object (the one that's been fixed to an address
space), the configuration file holds two pieces of information:
the location of the "original" object, and the location of its
associated "alternative".  If the runtime linker, as part of
its searching for dependencies, is directed to the "original"
object, it will substitute this for the "alternative".

So, given that you already have applications with a recorded
runpath of /fnsw/lib/shobj, you want to consider these the
"original" dependencies.

Thus:

  crle -c fn.conf -o /apps002/fnsw/lib/shobj/fixed-libs \
     -I /fnsw/lib/shobj/libfn_test_shlib.so

I think is what you want.  This takes the original file and
makes an alternative in /apps002....  When ld.so.1 processes
your app, it will look for libfn_test_shlib.so in the
original directory, the configuration file will then indicate
that this "match" should be switched to use the /apps002
alternative.

"ldd -c fn.conf" should confirm the use of the alternative.

Note, I've heard of folks playing in a similar "shared memory"
model, but never heard the results, so I can't claim crle()
is a total solution to this mode of operation.  Good luck.


>> Have they looked at the $ORIGIN runpath token as an alternative
>> to having to use LD_LIBRARY_PATH?
> No can you give us more information on what this is or tell us where to 
> look for information on this.

Forget this, now that I understand your scenario.  $ORIGIN
provides a generic way of finding dependencies that can be
installed in different locations on a system.  The Linker
and Libraries Manual has this well documented.


-- 
Rod

Reply via email to