Configuring SWC-DB build

SWC-DB Configuration Options

CONFIG OPTION DESCRIPTION VALUE OPTIONS DEFAULT VALUE
O_LEVEL Level of optimizations:
0: = -Os
1: = -O2s
2: += -floop-interchange -flto -fuse-linker-plugin -ffat-lto-objects
3: = -O3
4: += -flto -fuse-linker-plugin -ffat-lto-objects
5: += BUILD_LINKING=STATIC
6: += BUILD_LINKING_CORE=STATIC
0-7 3
SWC_IMPL_SOURCE when possible implement SWC-DB source-code ON/OFF OFF
USE_GNU_READLINE whether to use GNU libreadline ON/OFF OFF(ON if EDITLINE not found)
LOOKUP_INCLUDE_PATHS additional paths to headers posix-dir-path_LIST; “/opt/local/include;/usr/local/include;usr/local/lib;/usr/include”
LOOKUP_LIB_PATHS additional paths to libraries posix-dir-path_LIST; “/opt/local/lib;/usr/local/lib;/usr/lib;/lib”
JAVA_INSTALL_PATH JAVA_HOME to use, suggested $(find /usr/lib/jvm -name jni.h | sed s"/\/include\/jni.h//"g) posix-dir-path ENV{JAVA_HOME}
ASIO_INCLUDE_PATH suggested as by instructions posix-dir-path ””
WITHOUT_THRIFT_C Not to build the libswcdb_thrift_c ON/OFF OFF
GLIB_INCLUDE_PATH suggested $(pkg-config --cflags glib-2.0 | tr ' ' ';' | sed 's/-I//g' ) posix-dir-path ””
WITHOUT_PAM Not to build the libpam_swcdb_max_retries ON/OFF OFF
HADOOP_INSTALL_PATH HADOOP_HOME to use, suggested as by instructions posix-dir-path ENV{HADOOP_HOME}
SWC_DOCUMENTATION configure for generating documentations ON/OFF OFF
SWC_MALLOC_NOT_INSISTENT Not to use SWC-DB insistent malloc ON/OFF OFF(clang-ON)
SWC_INSTALL_DEP_LIBS Install the 3rd-party dependencies libaries used for linking ON/OFF OFF
SWC_WITHOUT_JAVA skip java/maven builds ON/OFF OFF
SWC_ENABLE_SANITIZER Enable build-wide the specified sanitizer (slower perf. by x3-x10) address/thread OFF
USE_DEFAULT_MALLOC use compiler/libc malloc ON/OFF OFF
USE_JEMALLOC use libjemalloc ON/OFF OFF
USE_HOARD use libhoard ON/OFF OFF
USE_MIMALLOC use libmimalloc ON/OFF OFF
USE_TCMALLOC use libtcmalloc ON/OFF OFF(default libtcmalloc_minimal or USE_DEFAULT_MALLOC)
USE_LIBSSL The SSL-Library to use open/wolf open
SWC_LANGUAGES require to build with support of listed languages NONE or ANY / applicable CSV: py2,py3,pypy2,pypy3,java,netstd,c_glib any possible
SWC_BUILTIN_FS builtin filesystems (impl./prelinked without use of dynamic linking loader), suggested=local,broker applicable CSV: local,broker,hadoop_jvm,hadoop,ceph any possible
SWC_DEFAULT_ENCODER the encoder to use for default config value PLAIN/ZLIB/SNAPPY/ZSTD ZSTD
SWC_BUILD_PKG Build only the specified package Environment:
* env
* doc
Libraries:
* lib-core
* lib
* lib-fs
* lib-fs-local
* lib-fs-broker
* lib-fs-ceph
* lib-fs-hadoop
* lib-fs-hadoop-jvm
* lib-thrift
* lib-thrift-c
* pam-max-retries
Applications:
* manager
* ranger
* fsbroker
* thiriftbroker
* utils
NONE(build-all)
SWC_PATH_ETC Build with specific /etc/ path posix-dir-path, finish with slash / application-base/../etc/swcdb/
SWC_PATH_LOG Build with specific /log/ path posix-dir-path, finish with slash / application-base/../var/log/swcdb/
SWC_PATH_RUN Build with specific /run/ path posix-dir-path, finish with slash / application-base/../run/
SWC_WITHOUT_THRIFT skip Thrift builds ON/OFF OFF

CMake Configuration Options

CONFIG OPTION DESCRIPTION VALUE OPTIONS DEFAULT VALUE
CMAKE_SKIP_RPATH runtime-linking ON/OFF OFF
CMAKE_INSTALL_PREFIX SWC-DB path of installation, suggested /opt/swcdb posix-dir-path /usr/local
CMAKE_BUILD_TYPE Build Type (the ‘Release' applies NDEBUG to O_LEVEL) Debug/Release Debug

Configuring

The Configuration Option Format -D{option}={value})

cmake ../swc-db [SWC-DB Configuration Options] [Cmake Configuration Options];

Configuration Examples

an Optimized Release build
    cmake ../swc-db \
      -DO_LEVEL=6 -DSWC_IMPL_SOURCE=ON \
      -DSWC_BUILTIN_FS=local,broker \
      -DSWC_LANGUAGES=ALL \
      -DASIO_INCLUDE_PATH=${ASIO_INCLUDE_PATH} \
      -DWITHOUT_THRIFT_C=OFF \
      -DGLIB_INCLUDE_PATH="$(pkg-config --cflags glib-2.0 | tr ' ' ';' | sed 's/-I//g' )" \
      -DWITHOUT_PAM=ON \
      -DCMAKE_SKIP_RPATH=OFF -DCMAKE_INSTALL_PREFIX=/opt/swcdb \
      -DSWC_DOCUMENTATION=OFF \
      -DCMAKE_BUILD_TYPE=Release;
a Standard Release build
    cmake ../swc-db \
      -DO_LEVEL=3 -DSWC_IMPL_SOURCE=OFF \
      -DSWC_LANGUAGES=ALL \
      -DASIO_INCLUDE_PATH=${ASIO_INCLUDE_PATH} \
      -DWITHOUT_THRIFT_C=OFF \
      -DGLIB_INCLUDE_PATH="$(pkg-config --cflags glib-2.0 | tr ' ' ';' | sed 's/-I//g' )" \
      -DWITHOUT_PAM=ON \
      -DCMAKE_SKIP_RPATH=OFF \
      -DCMAKE_INSTALL_PREFIX=/opt/swcdb \
      -DSWC_DOCUMENTATION=OFF \
      -DCMAKE_BUILD_TYPE=Release;
a Debug Release build
    cmake ../swc-db \
      -DO_LEVEL=1 -DSWC_IMPL_SOURCE=OFF \
      -DSWC_LANGUAGES=ALL \
      -DASIO_INCLUDE_PATH=${ASIO_INCLUDE_PATH} \
      -DWITHOUT_THRIFT_C=OFF \
      -DGLIB_INCLUDE_PATH="$(pkg-config --cflags glib-2.0 | tr ' ' ';' | sed 's/-I//g' )" \
      -DWITHOUT_PAM=ON \
      -DCMAKE_SKIP_RPATH=OFF \
      -DCMAKE_INSTALL_PREFIX=/opt/swcdb \
      -DSWC_DOCUMENTATION=OFF \
      -DCMAKE_BUILD_TYPE=Debug;