From 182660575253e4d1fb572ed5d1c053cf11ac6409 Mon Sep 17 00:00:00 2001 From: Vissidarte-Herman Date: Thu, 21 Dec 2023 04:44:17 +0800 Subject: [PATCH 1/7] Updated buid from source --- docs/build_from_source.md | 89 ++++++++++++++++++++++++++++++--------- 1 file changed, 69 insertions(+), 20 deletions(-) diff --git a/docs/build_from_source.md b/docs/build_from_source.md index cc9b013d9e..a564b2a94f 100644 --- a/docs/build_from_source.md +++ b/docs/build_from_source.md @@ -7,7 +7,7 @@ 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 @@ -15,10 +15,10 @@ $ 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 +#### Step [1/9]: sudo apt update && sudo apt install git wget unzip software-properties-common ```bash -sudo apt update && sudo apt install -y git wget unzip software-properties-common +sudo apt update && sudo apt install git wget unzip software-properties-common ``` #### Step [2/9]: Download cmake-3.28.1 @@ -34,10 +34,44 @@ 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 ``` -### +### Step [4/9]: Download ninja-1.11.1 +```bash +wget https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip +``` + +### Step [5/9]: Install ninja-1.11.1 into /usr/local/bin' + +```bash +unzip ninja-linux.zip && cp ninja /usr/local/bin && rm ninja ninja-linux.zip +``` + +### Step [6/9]: Add apt source for llvm-17 + +```bash +wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc +``` + +### Step [7/9]: Add apt source for g++-13 gcc-13 libstdc++-13-dev libboost1.81-dev + +```bash +sudo add-apt-repository -P ppa:ubuntu-toolchain-r/test +sudo add-apt-repository -P ppa:mhier/libboost-latest +``` + +### Step [8/9] : 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 + +```bash +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 +``` -## Step3 Build source code +### Step [9/9]: Create a symbolic link for clang-scan-deps-17 + +```bash +ln -s /usr/lib/llvm-17/bin/clang-scan-deps /usr/bin/clang-scan-deps +``` + +### Step3 Build the source code ```shell $ git config --global --add safe.directory infinity @@ -48,7 +82,7 @@ $ cmake -G Ninja .. $ ninja -j 12 ``` -### Step4 Start up Infinity server +### Step4 Start up the Infinity server ```shell $ ./src/infinity_main @@ -58,25 +92,49 @@ $ ./src/infinity_main ## Build from source on Ubuntu 23.10 +This section provides instructions on building Infinity from source on Ubuntu 23.10. + + +### Step1 Download Source Code + ```shell $ git clone https://github.com/infiniflow/infinity.git ``` +### Step2 Install dependencies -## Step1 Download Source Code +#### Step [1/5]: sudo apt update && sudo apt install -y git wget -```shell -$ git clone https://github.com/infiniflow/infinity.git +```bash +sudo apt update && sudo apt install -y git wget ``` -## Step2 Install dependencies +#### Step [2/5]: Download cmake-3.28.1 +```bash +wget https://cmake.org/files/v3.28/cmake-3.28.1-linux-x86_64.tar.gz +``` +#### Step [3/5]: 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 +``` +#### Step [4/5]: sudo apt install -y ninja-build clang-17 clang-tools-17 flex libboost1.81-dev liblz4-dev libevent-dev liburing-dev libthrift-dev +```bash +sudo apt install -y ninja-build clang-17 clang-tools-17 flex libboost1.81-dev liblz4-dev libevent-dev liburing-dev libthrift-dev +``` + +#### Step [5/5]: Create a symbolic link for clang-scan-deps-17 + +```bash +ln -s /usr/lib/llvm-17/bin/clang-scan-deps /usr/bin/clang-scan-deps +``` -## Step3 Build source code +### Step3 Build source code ```shell $ git config --global --add safe.directory infinity @@ -91,13 +149,4 @@ $ ninja -j 12 ```shell $ ./src/infinity_main -``` - -## SDK develop - -### Generate thrift rpc code - -```shell -$ apt install thrift-compiler -$ cd tools && python generate_rpc_code.py ``` \ No newline at end of file From cfe90f7d33aaeab056d998e851fdc794476aca42 Mon Sep 17 00:00:00 2001 From: Vissidarte-Herman Date: Thu, 21 Dec 2023 04:48:52 +0800 Subject: [PATCH 2/7] Minor --- docs/build_from_source.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/build_from_source.md b/docs/build_from_source.md index a564b2a94f..a0cd75b644 100644 --- a/docs/build_from_source.md +++ b/docs/build_from_source.md @@ -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) From 9f1d757be2be69f55ec2b98853e9abb66a2006c1 Mon Sep 17 00:00:00 2001 From: Vissidarte-Herman Date: Thu, 21 Dec 2023 04:59:24 +0800 Subject: [PATCH 3/7] Combined commands --- docs/build_from_source.md | 102 +++++++------------------------------- 1 file changed, 19 insertions(+), 83 deletions(-) diff --git a/docs/build_from_source.md b/docs/build_from_source.md index a0cd75b644..8164f908a5 100644 --- a/docs/build_from_source.md +++ b/docs/build_from_source.md @@ -7,85 +7,42 @@ This section provides instructions on building Infinity from source on Ubuntu 22.04. -### Step1 Download the 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 git wget unzip software-properties-common - -```bash -sudo apt update && sudo apt install git wget unzip software-properties-common -``` - -#### Step [2/9]: Download cmake-3.28.1 +#### Step2 Install necessary dependencies ```bash 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 -``` - -### Step [4/9]: Download ninja-1.11.1 - -```bash wget https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip -``` - -### Step [5/9]: Install ninja-1.11.1 into /usr/local/bin' - -```bash unzip ninja-linux.zip && cp ninja /usr/local/bin && rm ninja ninja-linux.zip -``` - -### Step [6/9]: Add apt source for llvm-17 - -```bash wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc -``` - -### Step [7/9]: Add apt source for g++-13 gcc-13 libstdc++-13-dev libboost1.81-dev - -```bash sudo add-apt-repository -P ppa:ubuntu-toolchain-r/test sudo add-apt-repository -P ppa:mhier/libboost-latest -``` - -### Step [8/9] : 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 - -```bash -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 -``` - -### Step [9/9]: Create a symbolic link for clang-scan-deps-17 - -```bash +sudo apt update && sudo apt install git wget unzip software-properties-common 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 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 the Infinity server ```shell -$ ./src/infinity_main +./src/infinity_main ``` @@ -98,55 +55,34 @@ This section provides instructions on building Infinity from source on Ubuntu 23 ### Step1 Download Source Code ```shell -$ git clone https://github.com/infiniflow/infinity.git +git clone https://github.com/infiniflow/infinity.git ``` ### Step2 Install dependencies -#### Step [1/5]: sudo apt update && sudo apt install -y git wget - ```bash sudo apt update && sudo apt install -y git wget -``` - -#### Step [2/5]: Download cmake-3.28.1 - -```bash wget https://cmake.org/files/v3.28/cmake-3.28.1-linux-x86_64.tar.gz -``` - -#### Step [3/5]: 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 -``` - -#### Step [4/5]: sudo apt install -y ninja-build clang-17 clang-tools-17 flex libboost1.81-dev liblz4-dev libevent-dev liburing-dev libthrift-dev - -```bash sudo apt install -y ninja-build clang-17 clang-tools-17 flex libboost1.81-dev liblz4-dev libevent-dev liburing-dev libthrift-dev -``` - -#### Step [5/5]: Create a symbolic link for clang-scan-deps-17 - -```bash ln -s /usr/lib/llvm-17/bin/clang-scan-deps /usr/bin/clang-scan-deps ``` + ### Step3 Build 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 ```shell -$ ./src/infinity_main +./src/infinity_main ``` \ No newline at end of file From 23dc50a7aa4ee7158b347787833a41f87ced28ca Mon Sep 17 00:00:00 2001 From: Vissidarte-Herman Date: Thu, 21 Dec 2023 05:00:03 +0800 Subject: [PATCH 4/7] minor --- docs/build_from_source.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/build_from_source.md b/docs/build_from_source.md index 8164f908a5..321cbb8621 100644 --- a/docs/build_from_source.md +++ b/docs/build_from_source.md @@ -42,7 +42,7 @@ ninja -j 12 ### Step4 Start up the Infinity server ```shell -./src/infinity_main +.build/src/infinity_main ``` @@ -69,7 +69,6 @@ sudo apt install -y ninja-build clang-17 clang-tools-17 flex libboost1.81-dev li ln -s /usr/lib/llvm-17/bin/clang-scan-deps /usr/bin/clang-scan-deps ``` - ### Step3 Build source code ```shell @@ -84,5 +83,5 @@ ninja -j 12 ### Step4 Start up Infinity server ```shell -./src/infinity_main +.build/src/infinity_main ``` \ No newline at end of file From 6ed45195b79d3258f7709c62ca59305858184640 Mon Sep 17 00:00:00 2001 From: Vissidarte-Herman Date: Thu, 21 Dec 2023 05:01:08 +0800 Subject: [PATCH 5/7] format updates --- docs/build_from_source.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/build_from_source.md b/docs/build_from_source.md index 321cbb8621..db6ba564d4 100644 --- a/docs/build_from_source.md +++ b/docs/build_from_source.md @@ -7,13 +7,13 @@ This section provides instructions on building Infinity from source on Ubuntu 22.04. -#### Step1 Download the source code +### Step1 Download the source code ```shell $ git clone https://github.com/infiniflow/infinity.git ``` -#### Step2 Install necessary dependencies +### Step2 Install necessary dependencies ```bash wget https://cmake.org/files/v3.28/cmake-3.28.1-linux-x86_64.tar.gz @@ -46,7 +46,6 @@ ninja -j 12 ``` - ## Build from source on Ubuntu 23.10 This section provides instructions on building Infinity from source on Ubuntu 23.10. From 3d1cced590094ec4e1a4b05d3c51f0915d84660b Mon Sep 17 00:00:00 2001 From: Vissidarte-Herman Date: Thu, 21 Dec 2023 05:02:15 +0800 Subject: [PATCH 6/7] separated commands --- docs/build_from_source.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/build_from_source.md b/docs/build_from_source.md index db6ba564d4..0c459db5ed 100644 --- a/docs/build_from_source.md +++ b/docs/build_from_source.md @@ -16,6 +16,7 @@ $ git clone https://github.com/infiniflow/infinity.git ### Step2 Install necessary dependencies ```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 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 @@ -24,7 +25,7 @@ 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 git wget unzip software-properties-common g++-13 clang-17 clang-tools-17 flex libboost1.81-dev liblz4-dev libevent-dev liburing-dev libthrift-dev +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 ``` From f95a9d70ba44b5594509fd92b26437c94ff8fd64 Mon Sep 17 00:00:00 2001 From: Vissidarte-Herman Date: Thu, 21 Dec 2023 05:07:21 +0800 Subject: [PATCH 7/7] Added docker commands --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 16610d3590..a7d3c291cd 100644 --- a/README.md +++ b/README.md @@ -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