hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Patrick McCabe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-12036) Consolidate all of the cmake extensions in one directory
Date Fri, 29 May 2015 20:53:17 GMT

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

Colin Patrick McCabe commented on HADOOP-12036:
-----------------------------------------------

bq. _REENTRANT is I believe better replaced by -pthread for gcc, as that ensures that both
the appropriate preprocessor and compiler flags are both set. However I wasn't sure that all
the native code in Hadoop was threaded so I felt it was better to explicitly specify this
in each individual CMakeList.txt file

All the native code is threaded.  Please set either {{\-pthread}} or {{REENTRANT}} (it seems
that -pthread simply sets {{REENTRANT}}, on gcc at least).

bq. -D_LARGEFILE_SOURCE seems to be deprecated according to http://man7.org/linux/man-pages/man7/feature_test_macros.7.html:
"New programs should not employ this macro; defining _XOPEN_SOURCE as just described or defining
_FILE_OFFSET_BITS with the value 64 is the preferred mechanism to achieve the same result".
_FILE_OFFSET_BITS=64 is already in the current CFLAGS but I believe even that can't be made
a global option, as noted in the CMakeLists.txt for hadoop-yarn-project: "note: can't enable
-D_LARGEFILE: see MAPREDUCE-4258"

Ha, I filed that jira years ago.  It's sad to see it hasn't been fixed yet.

Anyway, we want large file support for every other program that gets compiled.  It needs to
be in this common code you are working on.  {{hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/CMakeLists.txt}}
can simply set a variable which the common code will check, and disable large-file support
if it sees.

bq. _GNU_SOURCE isn't appropriate as a compiler command-line flag, as discussed in HADOOP-11997

Please set {{_GNU_SOURCE}} on Linux.  On other OSes you can set whatever you need to get all
the features of that OS.

> 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: prototype01.txt
>
>
> 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)

Mime
View raw message