[ 
https://issues.apache.org/jira/browse/HADOOP-11484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Edward Nevill updated HADOOP-11484:
-----------------------------------
    Description: 
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

<pre>
/**
 * 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;
}
</pre>

  was:
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

/**
 * 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;
}



> 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
>
>   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
> <pre>
> /**
>  * 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;
> }
> </pre>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to