4 ms·
This nice and clean solution is too little known I think. Far better than shipping shell scripts which are very hard to get right and most application developer
by catdog 9y ago
This nice and clean solution is too little known I think. Far better than shipping shell scripts which are very hard to get right and most application developers are not shell scripting experts.
- pjc50 9y agoRPATH is very nice, but it's a huge pain to set in Makefiles because you have to reliably escape the "$ORIGIN"
- Spivak 9y ago(Don't do this) You could patch the binary after compilation with elfpatch. Also, test: echo "\$$ORIGIN" outputs $ORIGIN. $$ translates to a literal dollar sign. \ escapes the dollar sign in the shell.
- binarycrusader 9y agoYou can use elfedit instead, but really, it's not that much of a pain to just do it right in the first place.