Skip to content

Commit ed56c82

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

File tree

1 file changed

+33
-30
lines changed

1 file changed

+33
-30
lines changed

src/vectorchord/getting-started/installation.md

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
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, x86_64)
7+
* Windows (x86_64)
8+
* Alpine Linux (x86_64, aarch64) [^1]
9+
10+
[^1]: VectorChord is tested with PostgreSQL 15, 16 and 17 on Alpine Linux.
11+
12+
Please report a bug if you encounter issues on any of the above operating systems.
13+
14+
Please submit a feature request if you need support for additional platforms.
15+
16+
There are 5 ways to install VectorChord.
417

518
## Docker
619

@@ -130,6 +143,12 @@ CREATE EXTENSION IF NOT EXISTS vchord CASCADE;
130143

131144
## PGXN
132145

146+
::: tip
147+
148+
See [Source](#source) for build requirements.
149+
150+
:::
151+
133152
1. Install VectorChord from [PostgreSQL Extension Network](https://pgxn.org/dist/vchord) with:
134153

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

159178
::: tip
160179

161-
VectorChord supports UNIX-like operating systems and Windows. Please report an issue if you cannot compile or make it work.
162-
163-
VectorChord supports little-endian architectures but only provides performance advantages on x86_64 and aarch64.
164-
165-
:::
166-
167-
You may need to install VectorChord from source. Please follow these steps.
180+
Build requirements:
168181

169-
1. Clone the repository and checkout the branch.
182+
* any port of `make`
183+
* `clang >= 16` with `libclang`
184+
* `rust >= 1.88` with `cargo`
170185

171-
```sh
172-
git clone https://github.com/tensorchord/VectorChord.git
173-
cd VectorChord
174-
git checkout "0.5.0"
175-
```
186+
It's recommended to use Rustup for installing Rust on most platforms, while on Alpine Linux, using the system package manager is advised.
176187

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`.
188+
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`.
178189

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

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

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

185196
```sh
197+
curl -fsSL https://github.com/tensorchord/VectorChord/archive/refs/tags/0.5.0.tar.gz | tar -xz
198+
cd VectorChord-0.5.0
186199
make build
187200
make install # or `sudo make install`
188201
```
189202

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

192205
```sh
193206
psql -U postgres -c 'ALTER SYSTEM SET shared_preload_libraries = "vchord"'
194207
```
195208

196-
5. Run the following SQL to ensure the extension is enabled.
209+
3. Run the following SQL to ensure the extension is enabled.
197210

198211
```sql
199212
CREATE EXTENSION IF NOT EXISTS vchord CASCADE;
200213
```
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)