You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "westonpace (via GitHub)" <gi...@apache.org> on 2023/05/17 18:23:20 UTC

[GitHub] [arrow] westonpace commented on issue #35577: missing -lthrift flag when linking R arrow.so

westonpace commented on issue #35577:
URL: https://github.com/apache/arrow/issues/35577#issuecomment-1551865779

   > I think that conda activate or something sets related environments such as LD_LIBRARY_PATH and PKG_CONFIG_PATH automatically.
   
   That's not quite accurate.  conda-build configures the origin / loader_path of shared libraries:
   
   ```
   Relative links require a special variable in the link itself:
   
       On Linux, the $ORIGIN variable allows you to specify "relative to this file as it is being executed".
   
       On macOS, the variables are:
   
           @rpath---Allows you to set relative links from the system load paths.
   
           @loader_path---Equivalent to $ORIGIN.
   
           @executable_path---Supports the Apple .app directory approach, where libraries know where they live relative to their calling application.
   
   Conda-build uses @loader_path on macOS and $ORIGIN on Linux because we install into a common root directory and can assume that other libraries are also installed into that root. The use of the variables allows you to build relocatable binaries that can be built on one system and sent everywhere.
   
   On Linux, conda-build modifies any shared libraries or generated executables to use a relative dynamic link by calling the patchelf tool. On macOS, the install_name_tool tool is used.
   ```
   
   However, that is the responsibility of conda-build and not the package being built (e.g. building arrow directly shouldn't configure the rpath but conda-forge's arrow recipe should).  This does mean, if you are building and installing into conda directly by setting `CMAKE_INSTALL_PREFIX` (I do this myself), then you either need to set the rpath manually (to emulate conda-build) or set `LD_LIBRARY_PATH`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org