Re:Suckless.org: software that sucks less
by kazinator on Saturday February 22, 2025 @09:07PM
(#43145601)
Two things:
1. You can bake the LD_LIBRARY_PATH into your executable with the -rpath mechanism.
2. Both rpath and LD_LIBRARY_PATH expand certain tokens such as $ORIGIN. $ORIGIN expands to the location of the program.
So you can (for instance) set a rpath of $ORIGIN in your executable, and then it will look for its libs in its own directory. Just like is the intelligent default on on you-know-what Redmond operating system everyone rags on.
1. You can bake the LD_LIBRARY_PATH into your executable with the -rpath mechanism.
2. Both rpath and LD_LIBRARY_PATH expand certain tokens such as $ORIGIN. $ORIGIN expands to the location of the program.
So you can (for instance) set a rpath of $ORIGIN in your executable, and then it will look for its libs in its own directory. Just like is the intelligent default on on you-know-what Redmond operating system everyone rags on.