[llvm-dev] Building llvm so it can be installed by other users

Steve King via llvm-dev llvm-dev at lists.llvm.org
Wed Oct 21 10:56:55 PDT 2015


On Wed, Oct 21, 2015 at 10:38 AM, Jonathan Roelofs via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
>     2)  Package up all the dependencies so that the dynamic linker
>         knows to find them in a relative path, rather than an absolute
>         path.
>         *   There's two ways to make this one work:
>             *    By setting an environment variable in your users'
>                  environment:
>                 `export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH`
>                  Where $PREFIX is where you've installed this on your
>                  user's system, not necessarily the same as
>                  your CMAKE_INSTALL_PREFIX.
>             *    By arranging for that at compiler compile time:
>                  CFLAGS="-Wl,-rpath=../lib"
>

If you go with dynamic linking, using rpath is preferred over LD_LIBRARY_PATH.
https://www.google.com/search?q=LD_LIBRARY_PATH+problems


More information about the llvm-dev mailing list