Mailinglist Archive: opensuse-programming (14 mails)

< Previous Next >
Re: [suse-programming-e] LD_RUN_PATH on SUSE 10.x
On Wed, 2006-09-20 at 16:45 -0400, Jerry Feldman wrote:
> On Wednesday 20 September 2006 4:35 pm, Roger Oberholtzer wrote:
> > I have a situation where a package installs some of its own libraries,
> > as well as one library with the exact same name as on in /usr/lib.
> > However, the package's library was compiled with different flags and is
> > not compatible with the one in /usr/lib.
> >
> > If I set LD_RUN_PATH to include the package's libraries, my executables
> > that link with the library in /usr/lib pick up the one in the package's
> > directory instead when they are run.
> >
> > IIRC, SVR4.2 (e.g., UnixWare) had syntax for LD_RUN_PATH that told if
> > the paths in LD_RUN_PATH should be checked before or after the system
> > directories. Is there any such capability for Linux? I would in fact
> > prefer to put the package's library directory in ldconfig. However,
> > doing so keeps things like KDE, GNOME and YAST from running, as they
> > then pick up the offending/incompatible version of the library. That is
> > why I am even bothering with LD_RUN_PATH.
> I'm nearly out the door.
> Make sure you build with -L<path to correct libraries>
> You can also use the -rpath command line flag for force the specific
> libraries into the program so it will pick up the right library at run
> time.

I am trying to accomplish installing applications anywhere. Then set the
path to their libraries in files in /etc/ldconfig.d. So, I do not know
the directory to set when it is compiled. Of course, I do set the
default install location when compiling. But if the install is
elsewhere, I need ldconfig.

If I could only control the order of checking that the dynamic loader
will use. I really want the system libs to be checked first. Any libs in
files in /etc/ldconfig.d should be checked after those
in /etc/, which in turn should be checked after those that are
'built in'. Instead, it seems that when ldconfig builds the cache, it
finds a library and remembers the last place it was found.

I guess my options are to contact the maker of the package with the
offending (depending on your POV) library. It is ActiveState's Tcl
package. Which is really a great package! Except for it's flawed libxml2

Roger Oberholtzer

OPQ Systems AB
Ramböll Sverige AB
Kapellgränd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden

Tel: Int +46 8-615 60 20
Fax: Int +46 8-31 42 23

< Previous Next >