Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] Updated buid from source #343

Merged
merged 7 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@ Supports a wide range of data types including strings, numerics, vectors, and mo

## 🎮 Get Started

### Docker pull

```bash
docker pull infinity:0.1.0-nightly-20231221
docker run -d --name infinity -v /tmp/infinity/:/tmp/infinity --network=host infiniflow/infinity bash ./opt/bin/infinity

```


### Install Infinity's Python client
Expand Down
94 changes: 39 additions & 55 deletions docs/build_from_source.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

# Build from Source

- [Build from source on Ubuntu 22.04](#build-from-source-on-ubuntu-2204)
- [Build from source on Ubuntu 23.10](#build-from-source-on-ubuntu-2310)
Expand All @@ -7,97 +7,81 @@

This section provides instructions on building Infinity from source on Ubuntu 22.04.

### Step1 Download source code
### Step1 Download the source code

```shell
$ git clone https://github.com/infiniflow/infinity.git
```

### Step2 Install necessary dependencies

#### Step [1/9]: sudo apt update && sudo apt install -y git wget unzip software-properties-common

```bash
sudo apt update && sudo apt install -y git wget unzip software-properties-common
```

#### Step [2/9]: Download cmake-3.28.1

```bash
sudo apt update && sudo apt install git wget unzip software-properties-common
wget https://cmake.org/files/v3.28/cmake-3.28.1-linux-x86_64.tar.gz
```

### Step [3/9]: Install cmake-3.28.1

```bash
tar zxvf cmake-3.28.1-linux-x86_64.tar.gz
cp -rf cmake-3.28.1-linux-x86_64/bin/* /usr/local/bin && cp -rf cmake-3.28.1-linux-x86_64/share/* /usr/local/share && rm -rf cmake-3.28.1-linux-x86_64
wget https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip
unzip ninja-linux.zip && cp ninja /usr/local/bin && rm ninja ninja-linux.zip
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
sudo add-apt-repository -P ppa:ubuntu-toolchain-r/test
sudo add-apt-repository -P ppa:mhier/libboost-latest
sudo apt update && sudo apt install g++-13 clang-17 clang-tools-17 flex libboost1.81-dev liblz4-dev libevent-dev liburing-dev libthrift-dev
ln -s /usr/lib/llvm-17/bin/clang-scan-deps /usr/bin/clang-scan-deps
```

###


## Step3 Build source code
### Step3 Build the source code

```shell
$ git config --global --add safe.directory infinity
$ cd infinity && mkdir build && cd build
$ export CC=/usr/bin/clang-18
$ export CXX=/usr/bin/clang++-18
$ cmake -G Ninja ..
$ ninja -j 12
git config --global --add safe.directory infinity
cd infinity && mkdir build && cd build
export CC=/usr/bin/clang-18
export CXX=/usr/bin/clang++-18
cmake -G Ninja ..
ninja -j 12
```

### Step4 Start up Infinity server
### Step4 Start up the Infinity server

```shell
$ ./src/infinity_main
.build/src/infinity_main
```



## Build from source on Ubuntu 23.10

```shell
$ git clone https://github.com/infiniflow/infinity.git
```
This section provides instructions on building Infinity from source on Ubuntu 23.10.


## Step1 Download Source Code
### Step1 Download Source Code

```shell
$ git clone https://github.com/infiniflow/infinity.git
git clone https://github.com/infiniflow/infinity.git
```

## Step2 Install dependencies






## Step3 Build source code
### Step2 Install dependencies

```shell
$ git config --global --add safe.directory infinity
$ cd infinity && mkdir build && cd build
$ export CC=/usr/bin/clang-18
$ export CXX=/usr/bin/clang++-18
$ cmake -G Ninja ..
$ ninja -j 12
```bash
sudo apt update && sudo apt install -y git wget
wget https://cmake.org/files/v3.28/cmake-3.28.1-linux-x86_64.tar.gz
tar zxvf cmake-3.28.1-linux-x86_64.tar.gz
cp -rf cmake-3.28.1-linux-x86_64/bin/* /usr/local/bin && cp -rf cmake-3.28.1-linux-x86_64/share/* /usr/local/share && rm -rf cmake-3.28.1-linux-x86_64
sudo apt install -y ninja-build clang-17 clang-tools-17 flex libboost1.81-dev liblz4-dev libevent-dev liburing-dev libthrift-dev
ln -s /usr/lib/llvm-17/bin/clang-scan-deps /usr/bin/clang-scan-deps
```

### Step4 Start up Infinity server
### Step3 Build source code

```shell
$ ./src/infinity_main
git config --global --add safe.directory infinity
cd infinity && mkdir build && cd build
export CC=/usr/bin/clang-18
export CXX=/usr/bin/clang++-18
cmake -G Ninja ..
ninja -j 12
```

## SDK develop

### Generate thrift rpc code
### Step4 Start up Infinity server

```shell
$ apt install thrift-compiler
$ cd tools && python generate_rpc_code.py
.build/src/infinity_main
```
Loading