Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D9153C2DE for ; Tue, 18 Jun 2013 20:14:20 +0000 (UTC) Received: (qmail 32496 invoked by uid 500); 18 Jun 2013 20:14:20 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 32466 invoked by uid 500); 18 Jun 2013 20:14:20 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 32458 invoked by uid 99); 18 Jun 2013 20:14:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jun 2013 20:14:20 +0000 Date: Tue, 18 Jun 2013 20:14:20 +0000 (UTC) From: "Arpit Agarwal (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-9648) Fix build native library on mac osx MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-9648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13687136#comment-13687136 ] Arpit Agarwal commented on HADOOP-9648: --------------------------------------- Thanks for taking this up Kirill. I verified that the native library builds on OSX with your changes. Few comments from the 2.0.5 patch. # Tests are not able to load the native library. TestNativeIO fails with "Unable to load native-hadoop library for your platform... using builtin-java classes where applicable". # The working directory should be restored before returning to avoid changing the callers cwd. I think it would be best to use the mkdirat and openat functions except on OS X via conditional compilation. {code} - if (mkdirat(cwd, token, perm) != 0) { + if(fchdir(cwd) < 0) { {code} # The iterative approach to replace fcloseall looks somewhat inefficient. At the very least it should be restricted to OS X and fcloseall() used everywhere else. {code} + for (; rl.rlim_max > 2; rl.rlim_max--) { + close(rl.rlim_max); + } {code} # Is this change necessary? I can build without it. {code} - 2.4.0a + 2.5.0 {code} > Fix build native library on mac osx > ----------------------------------- > > Key: HADOOP-9648 > URL: https://issues.apache.org/jira/browse/HADOOP-9648 > Project: Hadoop Common > Issue Type: Bug > Affects Versions: 1.0.4, 1.2.0, 1.1.2, 2.0.5-alpha > Reporter: Kirill A. Korinskiy > Attachments: HADOOP-9648-native-osx.1.0.4.patch, HADOOP-9648-native-osx.1.1.2.patch, HADOOP-9648-native-osx.1.2.0.patch, HADOOP-9648-native-osx.2.0.5-alpha-rc1.patch > > > Some patches for fixing build a hadoop native library on os x 10.7/10.8. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira