Skip to content

Latest commit

 

History

History
168 lines (112 loc) · 3.57 KB

File metadata and controls

168 lines (112 loc) · 3.57 KB

Build Source Code

Prerequisite

Nebula is developed based C++14, so it requires a compiler supporting C++14 features.

Supported system version

  • Fedora 29, 30
  • Centos 6.5, 7.5
  • Ubuntu 16.04, 18.04

Required disk size

When building type is DEBUG, suggestion reserve disk space is 30G at least.

Building locally

Step 1: clone code

bash> git clone https://github.com/vesoft-inc/nebula.git

Step 2: install dependencies

The script build_dep.sh bellow depends on the cloud Open-Storage-Service (OSS)

A. If you can download OSS packages directly
 bash> cd nebula && ./build_dep.sh
B. If you cannot download OSS packages directly
  1. Install others through local sources
bash> cd nebula && ./build_dep.sh N
  1. Download the corresponding version of the dependency package
  1. Install the package
tar xf ${package_name}.tar.gz
cd ${package_name} && ./install.sh

Step 3: update ~/.bashrc

bash> source ~/.bashrc

Step 4: build debug version

bash> mkdir build && cd build
bash> cmake ..
bash> make
bash> sudo make install

Build release version, regenerate the makefile

bash> cmake -DCMAKE_BUILD_TYPE=Release ..
bash> make
bash> sudo make install

Building completed

  • If no errors are shown

    [100%] Built target ....

    Congratulations! Compile successfully...

  • You can see there are four folders in the the installation directory /usr/local/nebula: etc/, bin/, scripts/, share/.

    [[email protected] nebula]# ls /usr/local/nebula/
    bin  etc  scripts  share

Now, you can start nebula!

Trouble Shooting

Error info: /usr/bin/ld: cannot find Scrt1.o: No such file or directory

  1. Modify ~/.bashrc by appending following line to the end
export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LIBRARY_PATH
  1. Update ~/.bashrc
bash> source ~/.bashrc

Error info: [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

  1. do java -version get your java jdk version
  2. if your java version is not 1.8.0_xxx, please install it

Ubuntu

sudo apt-get -y install openjdk-8-jdk

Centos

sudo yum -y install java-1.8.0-openjdk

switch java

sudo update-alternatives --config java

and select the java-1.8.0-openjdk/java-8-openjdk

Error info: internal error

You need to compile the third-party by yourself, the installation path is /opt/nebula/third-party

Step 1: Download third-party src package

bash> wget https://nebula-graph.oss-accelerate.aliyuncs.com/third-party/nebula-3rdparty.tar.gz

Step 2: Build third-party

bash> tar xf nebula-3rdparty.tar.gz && cd nebula-3rdparty
bash> ./install_deps.sh
bash> cmake ./
bash> sudo make

Step 3: Configure the project's environment variables and download other dependencies

bash> cd nebula && ./build_dep.sh N
bash> source ~/.bashrc
bash> mkdir build && cd build
bash> cmake ..
bash> make