Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


RPATH is very nice, but it's a huge pain to set in Makefiles because you have to reliably escape the "$ORIGIN"


(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.


You can use elfedit instead, but really, it's not that much of a pain to just do it right in the first place.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: