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

Parquet linking fails on MacOS due to @rpath in dylib

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.14.0
    • C++
    • None

    Description

      Linking an application or bindings against the parquet shared lib (from homebrew) fails with:

        dlopen(/Users/travis/build/r-lib/arrow/arrow.Rcheck/arrow/libs/arrow.so, 6): Library not loaded: @rpath/libarrow.13.dylib
        Referenced from: /usr/local/opt/apache-arrow/lib/libparquet.13.dylib
        Reason: image not found
      

      Indeed if we check the dylib dependencies there is an unresolved reference to @rpath to libarrow.

      otool -L /usr/local/opt/apache-arrow/lib/libparquet.13.dylib
      /usr/local/opt/apache-arrow/lib/libparquet.13.dylib:
      	/usr/local/opt/apache-arrow/lib/libparquet.13.dylib (compatibility version 13.0.0, current version 13.0.0)
      	@rpath/libarrow.13.dylib (compatibility version 13.0.0, current version 13.0.0)
      	/usr/local/opt/boost/lib/libboost_regex-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
      	/usr/local/opt/thrift/lib/libthrift-0.12.0.dylib (compatibility version 0.0.0, current version 0.0.0)
      	/usr/local/opt/protobuf/lib/libprotobuf.18.dylib (compatibility version 19.0.0, current version 19.1.0)
      	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.4)
      	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1)
      

      Does this mean ARROW_INSTALL_NAME_RPATH is not working?

      The workaround is to set the rpath when linking. The R package apparently hardcodes this to be /usr/local/lib which is appropriate.

      Attachments

        Issue Links

          Activity

            People

              jeroenooms Jeroen
              jeroenooms Jeroen
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: