[PATCH] D25304: cmake: Set the proper rpath in add_llvm_executable and llvm_add_library
Peter Levine via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 6 13:12:15 PDT 2016
plevine added inline comments.
> beanz wrote in AddLLVM.cmake:494
> Why are you setting this off? This doesn't seem right to me.
Whenever building clang with BUILD_WITH_INSTALL_RPATH set to ON, it fails with
> warning: libclangLex.so.4.0, needed by lib32/libclangFormat.so.4.0.0, not found (try using -rpath or -rpath-link)
> /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: warning: libclangAST.so.4.0, needed by lib32/libclangToolingCore.so.4.0.0, not found (try using -rpath or -rpath-link)
along with undefined reference errors pertaining to clang library symbols. The libraries do include in their rpath "$ORIGIN/../lib32" which does correctly point back to the library directory even at build time so I admit I'm at a loss. Regardless, clang does build correctly with BUILD_WITH_INSTALL_RPATH set to OFF and the correct and necessary rpath exists at runtime. I'm open to any insight you can offer and any changes you would suggest.
https://reviews.llvm.org/D25304
More information about the llvm-commits
mailing list