[
https://issues.apache.org/jira/browse/HADOOP-12036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14596417#comment-14596417
]
Colin Patrick McCabe commented on HADOOP-12036:
-----------------------------------------------
Thanks, [~alanburlison]. Looks good.
{code}
#
# Solaris-specific JNI configuration.
#
elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
...
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "i386")
set(CMAKE_SYSTEM_PROCESSOR "amd64")
...
{code}
Given that we are disallowing 32-bit builds on Solaris, is this necessary?
{code}
# Set the shared compiler flags if using GCC.
if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX)
hadoop_add_compiler_flags("${GCC_SHARED_FLAGS}")
endif()
{code}
clang is a valid choice to build Hadoop. It supports all the same flags as gcc
(for all practical purposes). I'm pretty sure Intel's compiler supports most
of the gcc flags as well.
In general, we should have logic like this:
{code}
if (some weird compiler that doesn't support gcc flags) {
// do something special
} else {
// set gcc flags
}
{code}
In other words, we should special-case things that are not gcc-compatible
rather than special-casing gcc. Otherwise we are going to get incorrect builds
on clang, icc, etc. etc.
bq. I need to fine-tune the patch to cope with misfeatures in the standard
CMake infrastructure - in the case of bzip detection the compilation is using
the -m64 flag but the bzip library being probed is being passed to the compiler
as a path rather than as -lbzip2, and the path being passed is the 32-bit
library path rather than the 64-bit one. The test compile then fails because
CMake thinks the library isn't present when it actually is. Also, even if
-DREQUIRE_BZIP2 is passed to CMake on the command line and there's logic in the
CMakeLists.txt which is supposed to fail the build when bzip2 isn't found, the
build continues.
Ah, that's interesting. I guess we didn't notice it earlier since most
developers don't have 32-bit binaries installed any more. We should probably
just write our own bzip2 detection code, similar to how we've done with some
other libraries. It would be nice to make this a separate patch. It seems
like the kind of thing people would want to backport to earlier releases. It
would also be easier to review that way (there is no logical dependency on the
other stuff)
thanks again, good to see progress on this.
> Consolidate all of the cmake extensions in one directory
> --------------------------------------------------------
>
> Key: HADOOP-12036
> URL: https://issues.apache.org/jira/browse/HADOOP-12036
> Project: Hadoop Common
> Issue Type: Sub-task
> Reporter: Allen Wittenauer
> Assignee: Alan Burlison
> Attachments: HADOOP-12036.001.patch
>
>
> Rather than have a half-dozen redefinitions, custom extensions, etc, we
> should move them all to one location so that the cmake environment is
> consistent between the various native components.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)