Skip to content

Commit b055c4b

Browse files
committed
update build requirements
Signed-off-by: usamoi <[email protected]>
1 parent 45a3c6d commit b055c4b

File tree

1 file changed

+31
-39
lines changed

1 file changed

+31
-39
lines changed

src/vectorchord/getting-started/installation.md

Lines changed: 31 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
# Installation
22

3-
There are four ways to install VectorChord.
3+
VectorChord is tested on the following operating system:
4+
5+
* Ubuntu (x86_64, aarch64)
6+
* MacOS (aarch64)
7+
* Windows (x86_64)
8+
* Alpine Linux (x86_64, aarch64) [^1]
9+
10+
[^1]: VectorChord is tested with PostgreSQL 15 in `community` repository, 16 and 17 in `main` repository on Alpine Linux 3.22.
11+
12+
Please report a bug if you encounter issues on any of the above operating systems, or submit a feature request for additional platform support.
13+
14+
There are 4 ways to install VectorChord.
415

516
## Docker
617

@@ -62,15 +73,6 @@ Other sections may align with the above.
6273

6374
## Debian packages
6475

65-
::: tip
66-
67-
Installation from Debian packages requires a dependency on `GLIBC >= 2.35`, so only the following distributions are supported:
68-
69-
- `Debian 12 (Bookworm)` or later
70-
- `Ubuntu 22.04` or later
71-
72-
:::
73-
7476
Debian packages are used for Debian-based Linux distributions, including Debian and Ubuntu. They can be easily installed by `apt`. You can use this installation method on x86_64 Linux and aarch64 Linux.
7577

7678
1. Download Debian packages in [the release page](https://github.com/tensorchord/VectorChord/releases/latest), and install them by `apt`.
@@ -130,6 +132,12 @@ CREATE EXTENSION IF NOT EXISTS vchord CASCADE;
130132

131133
## PGXN
132134

135+
::: tip
136+
137+
See [Source](#source) for build requirements.
138+
139+
:::
140+
133141
1. Install VectorChord from [PostgreSQL Extension Network](https://pgxn.org/dist/vchord) with:
134142

135143
```sh
@@ -158,53 +166,37 @@ There is a broken VectorChord `0.4.1` package on PGXN. Please do not use it. Use
158166

159167
::: tip
160168

161-
VectorChord supports UNIX-like operating systems and Windows. Please report an issue if you cannot compile or make it work.
169+
Build requirements:
162170

163-
VectorChord supports little-endian architectures but only provides performance advantages on x86_64 and aarch64.
171+
* any port of `make`
172+
* `clang >= 16` with `libclang`
173+
* `rust >= 1.89` with `cargo`
164174

165-
:::
166-
167-
You may need to install VectorChord from source. Please follow these steps.
168-
169-
1. Clone the repository and checkout the branch.
170-
171-
```sh
172-
git clone https://github.com/tensorchord/VectorChord.git
173-
cd VectorChord
174-
git checkout "0.5.0"
175-
```
175+
It's recommended to use Rustup for installing Rust on most platforms, while on Alpine Linux, using the system package manager is advised.
176176

177-
2. Install a C compiler and Rust. For Clang, the version must be 16 or higher. For GCC, the version must be 14 or higher. Other C compilers are not supported, and we prefer and recommend using Clang. For Rust, the version must be the same as that recorded in `rust-toolchain.toml`.
177+
You can set the environment variable `CC` to specify the desired C compiler for the build system. If you do not set this variable, the build system automatically searches for clang and gcc. To compile all C code with clang, set `CC` to the path of clang. To compile all C code with gcc, set `CC` to the path of gcc; note that in this case, there is a requirement `gcc >= 14`.
178178

179-
You could download Clang from https://github.com/llvm/llvm-project/releases.
179+
Rust version requirement is not a long-term guarantee; we will raise the required Rust version with each new release.
180180

181-
You could setup Rust with Rustup. See https://rustup.rs/.
181+
:::
182182

183-
3. Build it and install it.
183+
1. Download the source code, build and install it with `make`.
184184

185185
```sh
186+
curl -fsSL https://github.com/tensorchord/VectorChord/archive/refs/tags/0.5.0.tar.gz | tar -xz
187+
cd VectorChord-0.5.0
186188
make build
187189
make install # or `sudo make install`
188190
```
189191

190-
4. Configure your PostgreSQL by modifying the `shared_preload_libraries` to include the extension. And then restart the PostgreSQL cluster.
192+
2. Configure your PostgreSQL by modifying the `shared_preload_libraries` to include the extension. And then restart the PostgreSQL cluster.
191193

192194
```sh
193195
psql -U postgres -c 'ALTER SYSTEM SET shared_preload_libraries = "vchord"'
194196
```
195197

196-
5. Run the following SQL to ensure the extension is enabled.
198+
3. Run the following SQL to ensure the extension is enabled.
197199

198200
```sql
199201
CREATE EXTENSION IF NOT EXISTS vchord CASCADE;
200202
```
201-
202-
::: tip
203-
204-
By default, `VectorChord` only finds `clang` in `PATH` as the C compiler.
205-
206-
If your Clang executable is not named `clang` or is not in `PATH`, please set the environment variable `CC` to path of your Clang.
207-
208-
If you prefer to use GCC, please set the environment variable `CC` to `gcc` or path of your GCC.
209-
210-
:::

0 commit comments

Comments
 (0)