The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

RPATH Best Practices

Where I work, large software development house, some of the engineers got into this hugh debate over whether or not RPATH should be set for shared libraries.

Under Linux/Unix, shared libraries are like DLLs in Windows.  They have names like

For as long as we have known, we never set the RPATH when it came time to compile & link our shared libraries.  Our shared libraries, some, live in /usr/lib while others just sit in the install path of the application such as /usr/local/my_program/lib.

RPATH allos you to set a field with in, at least I think, so that can load other shared libraries it may need.  Without setting the RPATH, the operating system wide cache is searched.  Under Linux this is /etc/ or LD_LIBRARY_PATH and CRLE under Solaris.

The debate insued for some time.  I'm on the side lines watching the debate and I thought I would post here to get feed back from other professionals.

What are the PROs and CONs to using RPATH and is setting RPATH generally a recommended thing to do?

Are there any best practices to using RPATH?
Thursday, December 08, 2005
I have positive experience with RPATH and $ORIGIN (putting the .so in the same directory with the executable, without hard-coding the path). But not enough experience that I can give a "best practice" endorsement.
Ori Berger Send private email
Saturday, December 10, 2005

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz