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 B0C4C1014B for ; Wed, 21 Jan 2015 19:23:36 +0000 (UTC) Received: (qmail 86672 invoked by uid 500); 21 Jan 2015 19:23:36 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 86617 invoked by uid 500); 21 Jan 2015 19:23:36 -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 86600 invoked by uid 99); 21 Jan 2015 19:23:36 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jan 2015 19:23:36 +0000 Date: Wed, 21 Jan 2015 19:23:36 +0000 (UTC) From: "Colin Patrick McCabe (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HADOOP-11484) hadoop-mapreduce-client-nativetask fails to build on ARM AARCH64 due to x86 asm statements 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-11484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Colin Patrick McCabe updated HADOOP-11484: ------------------------------------------ Summary: hadoop-mapreduce-client-nativetask fails to build on ARM AARCH64 due to x86 asm statements (was: Fails to build on ARM AARCH64 due to x86 asm statements) > hadoop-mapreduce-client-nativetask fails to build on ARM AARCH64 due to x86 asm statements > ------------------------------------------------------------------------------------------ > > Key: HADOOP-11484 > URL: https://issues.apache.org/jira/browse/HADOOP-11484 > Project: Hadoop Common > Issue Type: Bug > Components: build > Affects Versions: trunk-win > Environment: ARM aarch64 development board > Reporter: Edward Nevill > Assignee: Edward Nevill > Labels: build > Fix For: trunk-win > > Attachments: HADOOP-11484.001.patch > > Original Estimate: 24h > Remaining Estimate: 24h > > Hadoop fails to build on ARM aarch64 (or any non x86 platform) because of the following in > hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/lib/primitives.h > {noformat} > /** > * little-endian to big-endian or vice versa > */ > inline uint32_t bswap(uint32_t val) { > __asm__("bswap %0" : "=r" (val) : "0" (val)); > return val; > } > inline uint64_t bswap64(uint64_t val) { > #ifdef __X64 > __asm__("bswapq %0" : "=r" (val) : "0" (val)); > #else > uint64_t lower = val & 0xffffffffU; > uint32_t higher = (val >> 32) & 0xffffffffU; > lower = bswap(lower); > higher = bswap(higher); > return (lower << 32) + higher; > #endif > return val; > } > {noformat} > The following also fails in > hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/src/util/Checksum.cc > {noformat} > static uint32_t cpuid(uint32_t eax_in) { > uint32_t eax, ebx, ecx, edx; > # if defined(__PIC__) && !defined(__LP64__) > // 32-bit PIC code uses the ebx register for the base offset -- > // have to save and restore it on the stack > asm("pushl %%ebx\n\t" > "cpuid\n\t" > "movl %%ebx, %[ebx]\n\t" > "popl %%ebx" : "=a" (eax), [ebx] "=r"(ebx), "=c"(ecx), "=d"(edx) : "a" (eax_in) > : "cc"); > # else > asm("cpuid" : "=a" (eax), "=b"(ebx), "=c"(ecx), "=d"(edx) : "a"(eax_in) > : "cc"); > # endif > return ecx; > } > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)