dmlc-core icon indicating copy to clipboard operation
dmlc-core copied to clipboard

QNX: unable to determine endianness of your machine

Open 987410 opened this issue 2 years ago • 1 comments

Hello,

I am using dmlc-core in qnx env, when compile dmlc-core, error "Unable to determine endianness of your machine; use CMake to compile" happened in endian.h:

#ifdef DMLC_CMAKE_LITTLE_ENDIAN // If compiled with CMake, use CMake's endian detection logic #define DMLC_LITTLE_ENDIAN DMLC_CMAKE_LITTLE_ENDIAN #else #if defined(APPLE) || defined(_WIN32) #define DMLC_LITTLE_ENDIAN 1 #elif defined(GLIBC) || defined(GNU_LIBRARY)
|| defined(ANDROID) || defined(RISCV) #include <endian.h> #define DMLC_LITTLE_ENDIAN (__BYTE_ORDER == __LITTLE_ENDIAN) #elif defined(FreeBSD) || defined(OpenBSD) #include <sys/endian.h> #define DMLC_LITTLE_ENDIAN (_BYTE_ORDER == _LITTLE_ENDIAN) #elif defined(EMSCRIPTEN) || defined(hexagon) #define DMLC_LITTLE_ENDIAN 1 #elif defined(__sun) || defined(sun) #include <sys/isa_defs.h> #if defined(_LITTLE_ENDIAN) #define DMLC_LITTLE_ENDIAN 1 #else #define DMLC_LITTLE_ENDIAN 0 #endif #else #error "Unable to determine endianness of your machine; use CMake to compile" #endif #endif

my question is :

  1. Does dmlm support qnx os?
  2. qnx has its own gulliver.h to define endian, how to use it in dmlc-core?

thanks

987410 avatar Jun 20 '22 06:06 987410

As the error message suggests, please use CMake to build.

hcho3 avatar Jun 20 '22 22:06 hcho3

Fixed in https://github.com/dmlc/dmlc-core/pull/672

hcho3 avatar Aug 08 '23 19:08 hcho3