[
https://issues.apache.org/jira/browse/HADOOP-11987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14559640#comment-14559640
]
Colin Patrick McCabe commented on HADOOP-11987:
-----------------------------------------------
I agree that some of the logic in {{JNIFlags.cmake}} is irrelevant because
{{FindJNI.cmake}} is loaded afterwards. However {{FindJNI.cmake}} is still
needed to:
* Set the \-m32 flag to CFLAGS, LDFLAGS, CPPFLAGS if the JVM is 32-bit and the
architecture is x86
* Set CMAKE_SYSTEM_PROCESSOR to i686 if the JVM is 32-bit and the architecture
is x86
* Add -mfloat-abi=softfp if the architecture is ARM and it is needed
I would suggest:
* removing the calls to FIND_PACKAGE(JNI REQUIRED) since they may override
variables that we don't want to override
* removing the duplicate copy of {{FindJNI.cmake}} in {{hadoop-mapreduce}}.
They should be sourcing the one in hadoop-common, just as HDFS does, rather
than duplicating.
If we want to make more improvements later we always can, but this will clear
things up.
> 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)