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 Wed, 27 May 2015 14:24:17 GMT

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

Alan Burlison commented on HADOOP-11987:
----------------------------------------

In hadoop/hadoop-common-project/hadoop-common/src on Non-Linux platforms FindJNI.cmake gets
included twice, once by JNIFlags.cmake when that is included into the CMakeLists.txt, and
then again explicitly from CMakeLists.txt. Obviously that's not correct. If we fix the issues
in JNIFlags.cmake then the FIND_PACKAGE(JNI REQUIRED) can be removed from  CMakeLists.txt

You are correct about the 3 items in the bullet list above still being needed but they are
all Linux-specific and whilst some parts are guarded into a Linux-specific block, some aren't
so that needs fixing as well.

Although there's also a JNIFlags.cmake in hadoop-mapreduce-client, it isn't completely identical
to the one in hadoop-common, it looks like the hadoop-common one is more up-to-date and the
one in hadoop-mapreduce-client should be removed and replaced by a reference to a single copy.

Also, the JNIFlags.cmake from hadoop-common-project/hadoop-common gets included in multiple
other places

* hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/CMakeLists.txt
* hadoop-tools/hadoop-pipes/src/CMakeLists.txt
* hadoop-hdfs-project/hadoop-hdfs/src/CMakeLists.txt

Which all suggests the functionality in hadoop-common's JNIFlags.cmake needs to be generalised
and moved to a common place in the build tree, as suggested in HADOOP-12036.

> 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
(v6.3.4#6332)

Mime
View raw message