Benlei Xu
2016-01-13 06:19:05 UTC
Hi all, i meet with a problem about leveldb compiling on AIX OS. I known
about the leveldb skipped testing on AIX, but i want to migrate the leveldb
to AIX for install Ceph.
So, i try to modified some codes and it throw out some errors like:
ld: 0706-005 Cannot find or open file: libleveldb.so.1
ld:open(): A file or directory in the path name does not
exist.
collect2: error: ld returned 255 exit status
make: *** [libleveldb.so.1.17] Error 1
In the build_detect_platform file, i add some codes as below:
AIX)
PLATFORM=OS_AIX
COMMON_FLAGS="$MEMCMP_FLAG -D_REENTRANT -DOS_AIX"
PLATFORM_LIBS="-lpthread"
PLATFORM_LDFLAGS="-pthread"
PORT_FILE=port/port_posix.cc
;;
in the port/port_posix.h file, i add some codes as below:
#undef PLATFORM_IS_LITTLE_ENDIAN
#if defined(OS_MACOSX)
#include <machine/endian.h>
#if defined(__DARWIN_LITTLE_ENDIAN) && defined(__DARWIN_BYTE_ORDER)
#define PLATFORM_IS_LITTLE_ENDIAN \
(__DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN)
#endif
#elif defined(_AIX)
#include <sys/types.h>
#include <sys/param.h>
#if defined(OS_MACOSX) || defined(OS_SOLARIS) || defined(OS_FREEBSD) ||\
defined(OS_NETBSD) || defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD)
||\
defined(OS_ANDROID) || defined(OS_HPUX) || defined(_AIX)
// Use fread/fwrite/fflush on platforms without _unlocked variants
#define fread_unlocked fread
#define fwrite_unlocked fwrite
#define fflush_unlocked fflush
#endif
and modified #define PLATFORM_IS_LITTLE_ENDIAN (__BYTE_ORDER ==
__LITTLE_ENDIAN) to #define PLATFORM_IS_LITTLE_ENDIAN false in
port/port_posix.h.
in ./port/atomic_pointer.h file, i add some codes as below:
#ifdef LEVELDB_CSTDATOMIC_PRESENT
#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 5
#include <atomic>
#else
#include <cstdatomic>
#endif
#endif
But I don't know what else can i do to fix this issue, so could anyone help
me for this question.
AIX OS Version: 6.1
Leveldb Version: 1.17
gcc version 4.9.2 (GCC)
Target: powerpc-ibm-aix6.1.0.0
about the leveldb skipped testing on AIX, but i want to migrate the leveldb
to AIX for install Ceph.
So, i try to modified some codes and it throw out some errors like:
ld: 0706-005 Cannot find or open file: libleveldb.so.1
ld:open(): A file or directory in the path name does not
exist.
collect2: error: ld returned 255 exit status
make: *** [libleveldb.so.1.17] Error 1
In the build_detect_platform file, i add some codes as below:
AIX)
PLATFORM=OS_AIX
COMMON_FLAGS="$MEMCMP_FLAG -D_REENTRANT -DOS_AIX"
PLATFORM_LIBS="-lpthread"
PLATFORM_LDFLAGS="-pthread"
PORT_FILE=port/port_posix.cc
;;
in the port/port_posix.h file, i add some codes as below:
#undef PLATFORM_IS_LITTLE_ENDIAN
#if defined(OS_MACOSX)
#include <machine/endian.h>
#if defined(__DARWIN_LITTLE_ENDIAN) && defined(__DARWIN_BYTE_ORDER)
#define PLATFORM_IS_LITTLE_ENDIAN \
(__DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN)
#endif
#elif defined(_AIX)
#include <sys/types.h>
#include <sys/param.h>
#if defined(OS_MACOSX) || defined(OS_SOLARIS) || defined(OS_FREEBSD) ||\
defined(OS_NETBSD) || defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD)
||\
defined(OS_ANDROID) || defined(OS_HPUX) || defined(_AIX)
// Use fread/fwrite/fflush on platforms without _unlocked variants
#define fread_unlocked fread
#define fwrite_unlocked fwrite
#define fflush_unlocked fflush
#endif
and modified #define PLATFORM_IS_LITTLE_ENDIAN (__BYTE_ORDER ==
__LITTLE_ENDIAN) to #define PLATFORM_IS_LITTLE_ENDIAN false in
port/port_posix.h.
in ./port/atomic_pointer.h file, i add some codes as below:
#ifdef LEVELDB_CSTDATOMIC_PRESENT
#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 5
#include <atomic>
#else
#include <cstdatomic>
#endif
#endif
But I don't know what else can i do to fix this issue, so could anyone help
me for this question.
AIX OS Version: 6.1
Leveldb Version: 1.17
gcc version 4.9.2 (GCC)
Target: powerpc-ibm-aix6.1.0.0
--
You received this message because you are subscribed to the Google Groups "leveldb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leveldb+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "leveldb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leveldb+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.