Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-1537

[C++] Support building with full path install_name on macOS

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: C++

      Description

      The current libarrow.dylib uses @rpath/libarrow.0.dylib for install_name. It works well when we can set DYLD_LIBRARY_PATH environment variable or libarrow.dylib is installed into the standard path such as /usr/local/lib/.

      There are some cases that we can't set DYLD_LIBRARY_PATH. For example, we can't set DYLD_LIBRARY_PATH when we use libarrow.0.dylib via a shell script. Because the recent macOS doesn't inherit DYLD_LIBRARY_PATH for security reason. It's caused as System Integration Protection (SIP). We need to use libarrow.0.dylib via a shell script when we build Arrow GLib's *.gir files. It means that we need to install Arrow C++ into the standard path for building Arrow GLib on macOS. If we install Arrow C++ into the non-standard path such as ~/local/, we can't build Arrow GLib.

      If we use full path for libarrow.dylib's install_name, we don't need to set DYLD_LIBRARY_PATH. It means that we can build Arrow GLib with Arrow C++ installed into the non-standard path such as ~/local/.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user kou opened a pull request:

          https://github.com/apache/arrow/pull/1100

          ARROW-1537: [C++] Support building with full path install_name on macOS

          If you use `@rpath` for install_name (default), you can use the
          DYLD_LIBRARY_PATH environment variable to find libarrow.dylib. But the
          DYLD_LIBRARY_PATH environment variable isn't inherited to sub process by
          System Integration Protection (SIP). It's difficult to use
          libarrow.dylib.

          You can use full path install_name by -DARROW_INSTALL_NAME_RPATH=OFF
          CMake option. If you use it, you can find libarrow.dylib without
          DYLD_LIBRARY_PATH environment variable.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/kou/arrow cpp-macos-support-install-name

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/arrow/pull/1100.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #1100


          commit 8207ace3868f90fad5d04da375d55ba2d5211b66
          Author: Kouhei Sutou <kou@clear-code.com>
          Date: 2017-09-13T13:30:23Z

          [C++] Support building with full path install_name on macOS

          If you use @rpath for install_name (default), you can use the
          DYLD_LIBRARY_PATH environment variable to find libarrow.dylib. But the
          DYLD_LIBRARY_PATH environment variable isn't inherited to sub process by
          System Integration Protection (SIP). It's difficult to use
          libarrow.dylib.

          You can use full path install_name by -DARROW_INSTALL_NAME_RPATH=OFF
          CMake option. If you use it, you can find libarrow.dylib without
          DYLD_LIBRARY_PATH environment variable.


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user kou opened a pull request: https://github.com/apache/arrow/pull/1100 ARROW-1537 : [C++] Support building with full path install_name on macOS If you use `@rpath` for install_name (default), you can use the DYLD_LIBRARY_PATH environment variable to find libarrow.dylib. But the DYLD_LIBRARY_PATH environment variable isn't inherited to sub process by System Integration Protection (SIP). It's difficult to use libarrow.dylib. You can use full path install_name by -DARROW_INSTALL_NAME_RPATH=OFF CMake option. If you use it, you can find libarrow.dylib without DYLD_LIBRARY_PATH environment variable. You can merge this pull request into a Git repository by running: $ git pull https://github.com/kou/arrow cpp-macos-support-install-name Alternatively you can review and apply these changes as the patch at: https://github.com/apache/arrow/pull/1100.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1100 commit 8207ace3868f90fad5d04da375d55ba2d5211b66 Author: Kouhei Sutou <kou@clear-code.com> Date: 2017-09-13T13:30:23Z [C++] Support building with full path install_name on macOS If you use @rpath for install_name (default), you can use the DYLD_LIBRARY_PATH environment variable to find libarrow.dylib. But the DYLD_LIBRARY_PATH environment variable isn't inherited to sub process by System Integration Protection (SIP). It's difficult to use libarrow.dylib. You can use full path install_name by -DARROW_INSTALL_NAME_RPATH=OFF CMake option. If you use it, you can find libarrow.dylib without DYLD_LIBRARY_PATH environment variable.
          Hide
          wesmckinn Wes McKinney added a comment -

          Issue resolved by pull request 1100
          https://github.com/apache/arrow/pull/1100

          Show
          wesmckinn Wes McKinney added a comment - Issue resolved by pull request 1100 https://github.com/apache/arrow/pull/1100
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/arrow/pull/1100

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/arrow/pull/1100

            People

            • Assignee:
              kou Kouhei Sutou
              Reporter:
              kou Kouhei Sutou
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development