Wednesday, December 5, 2018

@rpath What?

Marcin Krzyżanowski:

@rpath stands for Runpath Search Path.

  • In the Xcode, it’s set with LD_RUNPATH_SEARCH_PATH setting.
  • In ld command tool it’s set with -rpath parameter when linking. So it’s a search path for the linker. Runtime Search Path instructs the dynamic linker to search a list of paths in order, to locate the dynamic library.

The value of the parameter may be an absolute path (or multiple paths) to a directory, e.g.: /usr/private/lib or @executable_path/Frameworks.


However, if we need to modify the @rpath manually, e.g., as a part of installation phase - there’s an app for that: install_name_tool.

2 Comments RSS · Twitter

On thing to know if you use install_name_tool, is that it will break the code signature.

Is this news? I've been using install_name_tool since 2002 or there about. Must be getting old :-(

Leave a Comment