Skip to content

Commit 131c0e1

Browse files
committed
Clear up the installation documentation
This ensures both the installation and ivm guides make various mentions of the necessary dependencies and environment variables.
1 parent efba0cf commit 131c0e1

File tree

2 files changed

+45
-33
lines changed

2 files changed

+45
-33
lines changed

docs/source/setup/installation.md

+33-29
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ ivm install latest
4141
```
4242

4343
::: note
44-
When using macOS and Homebrew, you may need to set the `LIBRARY_PATH` and `PATH`
45-
variables. See the [macOS installation section](#macos) for more details.
44+
ivm installs Inko from source, so you'll need to install the necessary
45+
[dependencies](#dependencies) for your platform first.
4646
:::
4747

4848
This installs the latest known version. If you want to install a specific
@@ -128,19 +128,6 @@ Inko is available in [Homebrew](https://brew.sh/):
128128
brew install inko
129129
```
130130

131-
You may need to add the LLVM `bin` directory to your `PATH` as follows:
132-
133-
```bash
134-
export PATH="$(brew --prefix llvm@17)/bin:$PATH"
135-
```
136-
137-
You may also need to set the `LIBRARY_PATH` to the following, though this
138-
doesn't appear to always be needed:
139-
140-
```bash
141-
export LIBRARY_PATH="$(brew --prefix llvm@17)/lib:$(brew --prefix zstd)/lib"
142-
```
143-
144131
## From source
145132

146133
When building from Git, first clone the repository:
@@ -209,22 +196,10 @@ make install DESTDIR=./package-root PREFIX=/usr/local
209196
The `PREFIX` variable must be set for both the `make` and `make install`
210197
commands, but `DESTDIR` is only necessary for `make install`.
211198

212-
### FreeBSD
213-
214-
When building from source, you may have to set the `LIBRARY_PATH` variable as
215-
follows:
216-
217-
```bash
218-
LIBRARY_PATH="/usr/local/lib" cargo build
219-
```
220-
221-
Without this the linker may fail to find the zstd and libffi libraries, which
222-
are needed by LLVM on FreeBSD.
223-
224199
## Dependencies
225200

226-
When building from source or using [ivm](ivm), you'll first need to install
227-
the compiler's dependencies.
201+
When building from source or using [ivm](ivm), you'll need to install the
202+
necessary dependencies.
228203

229204
### Arch Linux
230205

@@ -301,12 +276,41 @@ Older versions of Fedora aren't supported.
301276
sudo pkg install llvm17 rust git
302277
```
303278

279+
You may have to set the `LIBRARY_PATH` variable as follows:
280+
281+
```bash
282+
export LIBRARY_PATH="/usr/local/lib"
283+
```
284+
285+
Without this the linker may fail to find the zstd and libffi libraries, which
286+
are needed by LLVM on FreeBSD.
287+
304288
### macOS
305289

306290
```bash
307291
brew install llvm@17 rust git
308292
```
309293

294+
You may have to set `LIBRARY_PATH` as follows:
295+
296+
```bash
297+
export LIBRARY_PATH="$(brew --prefix llvm@17)/lib:$(brew --prefix zstd)/lib"
298+
```
299+
300+
You may also have to add the LLVM `bin` directory to your `PATH` as follows:
301+
302+
```bash
303+
export PATH="$(brew --prefix llvm@17)/bin:$PATH"
304+
```
305+
306+
Without setting these variables, it's possible building of Inko fails due to the
307+
build process not finding the necessary LLVM libraries.
308+
309+
::: tip
310+
See [this Homebrew issue](https://github.com/Homebrew/brew/issues/13481) for
311+
details on why this might be necessary.
312+
:::
313+
310314
### Ubuntu
311315

312316
For Ubuntu 24.04 and newer:

docs/source/setup/ivm.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
different versions of Inko, independent from your system's package manager. ivm
99
is written in Rust.
1010

11-
## Installing
11+
## Requirements
12+
13+
- Rust 1.70 or newer
14+
- The [dependencies](../installation#dependencies) necessary to build Inko from
15+
source
1216

13-
ivm itself only requires Rust 1.70 or newer, but to build Inko itself you'll
14-
need to also meet the requirements listed in the [installation
15-
guide](installation).
17+
## Installing
1618

1719
### Arch Linux
1820

@@ -102,6 +104,12 @@ Make sure to set a default version after installing Inko, otherwise you have
102104
to use `ivm run VERSION inko ...` to use Inko.
103105
:::
104106

107+
::: note
108+
Make sure the [dependencies](../installation#dependencies) necessary for your
109+
platform are installed, and that any required environment variables are set
110+
_before_ running `ivm install`.
111+
:::
112+
105113
To remove a version:
106114

107115
```bash

0 commit comments

Comments
 (0)