Coder Social home page Coder Social logo

zhaodiankui / gpos Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vmware-archive/gpos

0.0 1.0 0.0 583 KB

The Greenplum Database OS abstraction layer

License: Apache License 2.0

CMake 1.65% Makefile 1.52% Python 0.17% Shell 0.37% C 10.11% C++ 86.18%

gpos's Introduction

Build Status

======================================================================
					   __________  ____  _____
					  / ____/ __ \/ __ \/ ___/
					 / / __/ /_/ / / / /\__ \ 
					/ /_/ / ____/ /_/ /___/ / 
					\____/_/    \____//____/  
					                          
                The Greenplum OS abstraction layer!
----------------------------------------------------------------------
Copyright (c) 2015, Pivotal Software, Inc.

Licensed under the Apache License, Version 2.0
======================================================================

Welcome to GPOS, the Greenplum OS abstraction layer!

GPOS supports various build types: debug, release with debug info, release. On x86 systems, GPOS can also be built as a 32-bit or 64-bit library. You'll need CMake 3.0 or higher to build GPOS. Get it from cmake.org, or your operating system's package manager.

Quick Start: Build GPOS and install under /usr/local

mkdir build
cd build
cmake ../
make
sudo make install

Or read on for more detailed instructions below...

Preperation for build

Go into gpos and create a build folder

mkdir build
cd build

How to generate make files with default options

  • debug build
cmake -D CMAKE_BUILD_TYPE=DEBUG ../

or

  • release build with debug info
cmake -D CMAKE_BUILD_TYPE=RelWithDebInfo ../

or

  • release build
cmake -D CMAKE_BUILD_TYPE=RELEASE ../

Advanced: How to generate make files using toolchain to generate 32 or 64 bit version makefiles

For the most part you should not need to explicitly compile a 32-bit or 64-bit version of GPOS. By default, a "native" version for your host platform will be compiled. However, if you are on x86 and want to, for example, build a 32-bit version of GPOS on a 64-bit machine, you can do so as described below. Note that you will need a "multilib" C++ compiler that supports the -m32/-m64 switches, and you may also need to install 32-bit ("i386") versions of the C and C++ standard libraries for your OS.

Debug version with verbose install path:

  • 32-bit x86
cmake -D VERBOSE_INSTALL_PATH=1 -D CMAKE_BUILD_TYPE=DEBUG -D CMAKE_TOOLCHAIN_FILE=../i386.toolchain.cmake ../
  • 64-bit x86
cmake -D VERBOSE_INSTALL_PATH=1 -D CMAKE_BUILD_TYPE=DEBUG -D CMAKE_TOOLCHAIN_FILE=../x86_64.toolchain.cmake ../

How to build

  • build
make
  • for faster build use the -j option of make. For instance, the following command runs make on 7 job slots
make -j7
  • show all commands being run as part of make
make VERBOSE=1

How to test

To run all GPOS tests, simply use the ctest command from the build directory after make finishes.

ctest

Much like make, ctest has a -j option that allows running multiple tests in parallel to save time. Using it is recommended for faster testing.

ctest -j7

By default, ctest does not print the output of failed tests. To print the output of failed tests, use the --output-on-failure flag like so (this is useful for debugging failed tests):

ctest -j7 --output-on-failure

To run a specific individual test, use the gpos_test executable directly.

./server/gpos_test -U CAutoTaskProxyTest

Note that some tests use assertions that are only enabled for DEBUG builds, so DEBUG-mode tests tend to be more rigorous.

Advanced: Extended Tests

Debug builds of GPOS include a couple of "extended" tests for features like fault-simulation and time-slicing that work by running the entire test suite in combination with the feature being tested. These tests can take a long time to run and are not enabled by default. To turn extended tests on, add the cmake arguments -D ENABLE_EXTENDED_TESTS=1.

How to install

By default, GPOS will be installed under /usr/local. You can change this by setting CMAKE_INSTALL_PREFIX when running cmake, for example:

cmake -D CMAKE_INSTALL_PREFIX=/home/user/gpos ../

If VERBOSE_INSTALL_PATH was not set during cmake then the header files are located in /usr/local/include/gpos the library is located at /usr/local/lib/libgpos.so (or similar paths under a different prefix)

If VERBOSE_INSTALL_PATH was turned on during cmake then the header files and libraries are located under a subdirectory of /usr/local/libgpos

  • build and install
make install
  • build and install with verbose output
make VERBOSE=1 install

Clean up stuff

  • remove the cmake files generated under build

  • If VERBOSE_INSTALL_PATH was not use during cmake then remove gpos header files and library, (assuming the default install prefix /usr/local)

rm -rf /usr/local/include/gpos
rm -rf /usr/local/lib/libgpos.so*

If VERBOSE_INSTALL_PATH was used during cmake then clean up the appropriate libraries and header files under /usr/local/libgpos (assuming the default install prefix /usr/local)

gpos's People

Contributors

craig-chasseur avatar entong avatar karthijrk avatar xinzweb avatar ryantang avatar vraghavan78 avatar zaksoup avatar d avatar hsyuan avatar armenatzoglou avatar

Watchers

diankuizhao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.