[
https://issues.apache.org/jira/browse/HADOOP-8806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13455495#comment-13455495
]
Allen Wittenauer commented on HADOOP-8806:
------------------------------------------
bq. However, snappy can't be loaded from this directory unless LD_LIBRARY_PATH
is set to include this directory
Or, IIRC, dlopen will look in the shared libraries run path (-rpath for those
using GNU LD, -R for just about everyone else). This is the preferred way to
deal with this outside of Java. See also the $ORIGIN 'macro' to make the path
dynamic based upon the executable location. There is no reason to really
hard-code any paths or set LD_LIBRARY_PATH in modern linkers due to these
features unless you are absolutely doing something crazy.
> libhadoop.so: search java.library.path when calling dlopen
> ----------------------------------------------------------
>
> Key: HADOOP-8806
> URL: https://issues.apache.org/jira/browse/HADOOP-8806
> Project: Hadoop Common
> Issue Type: Improvement
> Reporter: Colin Patrick McCabe
> Priority: Minor
>
> libhadoop calls {{dlopen}} to load {{libsnappy.so}} and {{libz.so}}. These
> libraries can be bundled in the {{$HADOOP_ROOT/lib/native}} directory. For
> example, the {{-Dbundle.snappy}} build option copies {{libsnappy.so}} to this
> directory. However, snappy can't be loaded from this directory unless
> {{LD_LIBRARY_PATH}} is set to include this directory.
> Should we also search {{java.library.path}} when loading these libraries?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira