Hacker News new | ask | show | jobs
by wahern 2033 days ago
> Then to launch the software you need a shell script that overrides the loader search path and move on with your life.

> The ultimate solution is the .app/.bundle paradigm of MacOS. Everything should copy that.

All ELF systems support the $ORIGIN RPATH macro. It lets you build and package an application exactly like, if not better than, you would a macOS bundle. Specifically, it let's you specify at compile time a library load path relative to the invoked binary. You'd specify it as $ORIGIN/../lib for the canonical bin/, lib/, etc layout.

1 comments

Awesome tip, thanks! I didn't know this existed.