BerkeleyDB: dynamic linking

Marco d'Itri md at Linux.IT
Mon Jan 22 11:10:49 UTC 2001

On Jan 22, Russ Allbery <rra at> wrote:

 >> --with-berkeleydb=/usr/local/BerkeleyDB.3.1
 >> But I installed BerkeleyDB as a dynamic library, shared object. So then ld
 >> couldn't find libdb in a runtime because there was neither proper 
 >> LD_RUN_PATH environment variable nor "-R" as a compile option (gcc). I

 >Unfortunately, -R isn't portable.  On Linux, for example, you have to set
 >LD_RUN_PATH rather than use -R.  Other operating systems need various
No, the linux way is to use -rpath (which should never be inflicted by
defaults, because then buggy distributions will use it and risk to
screw up future upgrades).

 >other tricks.  I don't know of any good general solution to this problem.
 >Does anyone have any bright ideas apart from making the user add -R or set
 >LD_RUN_PATH or do whatever else is needed on their system?
I do not think this is a problem. If somebody keeps shared objects in a
non directory unknown to the dynamic loader then it's his own duty to
use -rpath, $LD_LIBRARY_PATH or similar hacks.


More information about the inn-workers mailing list