You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Pearu Peterson (JIRA)" <ji...@apache.org> on 2019/04/02 20:24:00 UTC

[jira] [Commented] (ARROW-5090) Linking failure on MacOS due to @rpath in dylib

    [ https://issues.apache.org/jira/browse/ARROW-5090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16808126#comment-16808126 ] 

Pearu Peterson commented on ARROW-5090:
---------------------------------------

To avoid this failure, I have used

{{export LDFLAGS="-L$PREFIX/lib -Wl,-rpath,$PREFIX/lib" }}

 

> Linking failure on MacOS due to @rpath in dylib
> -----------------------------------------------
>
>                 Key: ARROW-5090
>                 URL: https://issues.apache.org/jira/browse/ARROW-5090
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>            Reporter: Jeroen
>            Priority: Major
>
> Linking an application or bindings against the arrow shared lib (from homebrew) fails with:
> {code}
>   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
> {code}
> I don't think an installed lib should contain @rpath. The workaround is to set the rpath when linking. The R package [apparently hardcodes](https://github.com/apache/arrow/blob/master/r/src/Makevars.in#L21) this to be /usr/local/lib which is appropriate.
> I think the proper solution is to build with: CMAKE_BUILD_WITH_INSTALL_RPATH=ON



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)