hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Burlison (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11987) JNI build should use default cmake FindJNI.cmake
Date Tue, 19 May 2015 18:14:02 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-11987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14550920#comment-14550920

Alan Burlison commented on HADOOP-11987:

I've spent some time digging around inside CMakeLists.txt and as far as I can tell, it *does*
actually use the system FindJNI anyway, via find_package(). In fact the local JNIFlags.cmake
is loaded first via an include and then the system one is loaded in later via find_package.
As both JNIFlags.cmake and FindJNI end up setting the same variables (JNI_INCLUDE_DIRS, JNI_LIBRARIES)
and the system one comes last, the system one already "wins" and much of the logic in JNIFlags.cmake
is irrelevant.

It I'm correct above, the bits of JNIFlags.cmake that are still relevant are, as you say,
the ARM FP detection and the JVM bitness handling for the compiler flags. The current 32/64
bit detection doesn't work for 64-bit Solaris but that's covered under HADOOP-11975

> JNI build should use default cmake FindJNI.cmake
> ------------------------------------------------
>                 Key: HADOOP-11987
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11987
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: native
>    Affects Versions: 2.7.0
>         Environment: All
>            Reporter: Alan Burlison
>            Assignee: Alan Burlison
>            Priority: Minor
> From http://mail-archives.apache.org/mod_mbox/hadoop-common-dev/201505.mbox/%3C55568DAC.1040303%40oracle.com%3E
> ----------
> Why does  hadoop-common-project/hadoop-common/src/CMakeLists.txt use JNIFlags.cmake in
the same directory to set things up for JNI 
> compilation rather than FindJNI.cmake, which comes as a standard cmake 
> module? The checks in JNIFlags.cmake make several assumptions that I 
> believe are only correct on Linux whereas I'd expect FindJNI.cmake to be 
> more platform-independent.
> ----------
> Just checked the repo of cmake and it turns out that FindJNI.cmake is
> available even before cmake 2.4. I think it makes sense to file a bug
> to replace it to the standard cmake module. Can you please file a jira
> for this?
> ----------
> This also applies to hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/JNIFlags.cmake

This message was sent by Atlassian JIRA

View raw message