Changes for build on solaris
Makefile adjust paths for solaris build Makefile enable _GLIBCXX_USE_C99 so that std::to_string is available db_compaction_test.cc Initialise a variable to avoid a compilation error db_impl.cc Include <alloca.h> db_test.cc Include <alloca.h> Environment.java recognise solaris envrionment options_bulder.cc Make log unambiguous geodb_impl.cc Make log and floor unambiguous
This commit is contained in:
parent
83e1de92af
commit
d78c6b28c4
12
Makefile
12
Makefile
@ -143,6 +143,9 @@ else
|
|||||||
OPT += -DNDEBUG
|
OPT += -DNDEBUG
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(PLATFORM), OS_SOLARIS)
|
||||||
|
PLATFORM_CXXFLAGS += -D _GLIBCXX_USE_C99
|
||||||
|
endif
|
||||||
ifneq ($(filter -DROCKSDB_LITE,$(OPT)),)
|
ifneq ($(filter -DROCKSDB_LITE,$(OPT)),)
|
||||||
# found
|
# found
|
||||||
CFLAGS += -fno-exceptions
|
CFLAGS += -fno-exceptions
|
||||||
@ -1036,7 +1039,11 @@ install: install-static
|
|||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
JAVA_INCLUDE = -I$(JAVA_HOME)/include/ -I$(JAVA_HOME)/include/linux
|
JAVA_INCLUDE = -I$(JAVA_HOME)/include/ -I$(JAVA_HOME)/include/linux
|
||||||
|
ifeq ($(PLATFORM), OS_SOLARIS)
|
||||||
|
ARCH := $(shell isainfo -b)
|
||||||
|
else
|
||||||
ARCH := $(shell getconf LONG_BIT)
|
ARCH := $(shell getconf LONG_BIT)
|
||||||
|
endif
|
||||||
ROCKSDBJNILIB = librocksdbjni-linux$(ARCH).so
|
ROCKSDBJNILIB = librocksdbjni-linux$(ARCH).so
|
||||||
ROCKSDB_JAR = rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH)-linux$(ARCH).jar
|
ROCKSDB_JAR = rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH)-linux$(ARCH).jar
|
||||||
ROCKSDB_JAR_ALL = rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH).jar
|
ROCKSDB_JAR_ALL = rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH).jar
|
||||||
@ -1052,6 +1059,11 @@ else
|
|||||||
JAVA_INCLUDE = -I/System/Library/Frameworks/JavaVM.framework/Headers/
|
JAVA_INCLUDE = -I/System/Library/Frameworks/JavaVM.framework/Headers/
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(PLATFORM), OS_SOLARIS)
|
||||||
|
ROCKSDBJNILIB = librocksdbjni-solaris$(ARCH).so
|
||||||
|
ROCKSDB_JAR = rocksdbjni-$(ROCKSDB_MAJOR).$(ROCKSDB_MINOR).$(ROCKSDB_PATCH)-solaris$(ARCH).jar
|
||||||
|
JAVA_INCLUDE = -I$(JAVA_HOME)/include/ -I$(JAVA_HOME)/include/solaris
|
||||||
|
endif
|
||||||
|
|
||||||
libz.a:
|
libz.a:
|
||||||
-rm -rf zlib-1.2.8
|
-rm -rf zlib-1.2.8
|
||||||
|
@ -1898,7 +1898,7 @@ TEST_P(DBCompactionTestWithParam, DISABLED_CompactFilesOnLevelCompaction) {
|
|||||||
std::set<std::string> overlapping_file_names;
|
std::set<std::string> overlapping_file_names;
|
||||||
std::vector<std::string> compaction_input_file_names;
|
std::vector<std::string> compaction_input_file_names;
|
||||||
for (int f = 0; f < file_picked; ++f) {
|
for (int f = 0; f < file_picked; ++f) {
|
||||||
int level;
|
int level = 0;
|
||||||
auto file_meta = PickFileRandomly(cf_meta, &rnd, &level);
|
auto file_meta = PickFileRandomly(cf_meta, &rnd, &level);
|
||||||
compaction_input_file_names.push_back(file_meta->name);
|
compaction_input_file_names.push_back(file_meta->name);
|
||||||
GetOverlappingFileNumbersForLevelCompaction(
|
GetOverlappingFileNumbersForLevelCompaction(
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <alloca.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <climits>
|
#include <climits>
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#ifndef OS_WIN
|
#ifndef OS_WIN
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include <alloca.h>
|
||||||
|
|
||||||
#include "db/filename.h"
|
#include "db/filename.h"
|
||||||
#include "db/dbformat.h"
|
#include "db/dbformat.h"
|
||||||
|
@ -18,6 +18,10 @@ public class Environment {
|
|||||||
OS.contains("aix"));
|
OS.contains("aix"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isSolaris() {
|
||||||
|
return OS.contains("sunos");
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean is64Bit() {
|
public static boolean is64Bit() {
|
||||||
return (ARCH.indexOf("64") > 0);
|
return (ARCH.indexOf("64") > 0);
|
||||||
}
|
}
|
||||||
@ -36,6 +40,8 @@ public class Environment {
|
|||||||
return String.format("%sjni-linux%s", name, arch);
|
return String.format("%sjni-linux%s", name, arch);
|
||||||
} else if (isMac()) {
|
} else if (isMac()) {
|
||||||
return String.format("%sjni-osx", name);
|
return String.format("%sjni-osx", name);
|
||||||
|
} else if (isSolaris()) {
|
||||||
|
return String.format("%sjni-solaris%d", name, is64Bit() ? 64 : 32);
|
||||||
}
|
}
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
@ -45,7 +51,7 @@ public class Environment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static String appendLibOsSuffix(final String libraryFileName, final boolean shared) {
|
private static String appendLibOsSuffix(final String libraryFileName, final boolean shared) {
|
||||||
if (isUnix()) {
|
if (isUnix() || isSolaris()) {
|
||||||
return libraryFileName + ".so";
|
return libraryFileName + ".so";
|
||||||
} else if (isMac()) {
|
} else if (isMac()) {
|
||||||
return libraryFileName + (shared ? ".dylib" : ".jnilib");
|
return libraryFileName + (shared ? ".dylib" : ".jnilib");
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "rocksdb/options.h"
|
#include "rocksdb/options.h"
|
||||||
|
|
||||||
|
using std::log;
|
||||||
|
|
||||||
namespace rocksdb {
|
namespace rocksdb {
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -19,6 +19,9 @@
|
|||||||
#include "util/coding.h"
|
#include "util/coding.h"
|
||||||
#include "util/string_util.h"
|
#include "util/string_util.h"
|
||||||
|
|
||||||
|
using std::log;
|
||||||
|
using std::floor;
|
||||||
|
|
||||||
//
|
//
|
||||||
// There are two types of keys. The first type of key-values
|
// There are two types of keys. The first type of key-values
|
||||||
// maps a geo location to the set of object ids and their values.
|
// maps a geo location to the set of object ids and their values.
|
||||||
|
Loading…
Reference in New Issue
Block a user