Android RPC server fails to build


#1

After syncing to the latest master, app/android_rpc build seems to fail. The first error I see is:

tvm/apps/android_rpc/app/src/main/jni/../../../../../../3rdparty/dmlc-core/include/dmlc/./endian.h:26:6: error:
      "Unable to determine endianness of your machine; use CMake to compile"
    #error "Unable to determine endianness of your machine; use CMake to compile"
     ^

Seems like endian.h was changed back in last November (https://github.com/dmlc/dmlc-core/pull/476/files#diff-acaf026494317cb69f35ee84e4fc996d). I am wondering which case Android with Clang falls to.

However, I don’t see anyone complaining about this failure. Am I missing anything?


#2

You’re not alone.
I’ve put

#include <endian.h>
#define DMLC_LITTLE_ENDIAN (__BYTE_ORDER == __LITTLE_ENDIAN)

to #else branch and comment #error
Not the best solution but It’s compiles and work.