ROCm / ROCm-CompilerSupport

The compiler support repository provides various Lightning Compiler related services.
47 stars 31 forks source link

Set RPATH so libraries are found at runtime #21

Closed candrews closed 4 years ago

candrews commented 4 years ago

If the RPATH is not set, then link errors occur at runtime as the dynamic linker cannot find the llvm libraries. For example, ldd libamd_comgr.so reports ibclangFrontend.so.9svn => not found By setting the RPATH, the dynamic linker knows where to look for the llvm libraries.

See https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling

candrews commented 4 years ago

Nevermind... it's better to add a file to /etc/ld.so.conf.d add ROC llvm to the rpath.

See https://docs.fedoraproject.org/en-US/packaging-guidelines/#_beware_of_rpath