prevent+improve repl erros

This commit is contained in:
Anton-4 2023-09-30 20:34:33 +02:00
parent 7aa5fe0c6f
commit d7a27acfd7
No known key found for this signature in database
GPG Key ID: 0971D718C0A9B937
2 changed files with 28 additions and 4 deletions

View File

@ -918,10 +918,15 @@ fn link_linux(
eprintln!("You may need to install libgcc\n");
}
if maybe_crti.is_none() | maybe_crtn.is_none() | maybe_scrt1.is_none() {
eprintln!("Couldn't find the glibc development files!");
eprintln!("We need the objects crti.o, crtn.o, and Scrt1.o");
eprintln!("You may need to install the glibc development package");
eprintln!("(probably called glibc-dev or glibc-devel)\n");
eprintln!("Couldn't find the libc development files!");
eprintln!("We need the files crti.o, crtn.o, and Scrt1.o");
eprintln!();
eprintln!("On Ubuntu/Debian execute:");
eprintln!("\tsudo apt install libc-dev\n");
eprintln!("On ArchLinux/Manjaro execute:");
eprintln!("\tsudo pacman -S glibc\n");
eprintln!("On Fedora execute:");
eprintln!("\tsudo dnf install glibc-devel\n");
}
let dirs = lib_dirs

View File

@ -22,6 +22,25 @@ which includes the Roc compiler and some helpful utilities.
1. Check everything worked by executing `roc version`
1. Install libc development files and ld (binutils) if you'd like to use the repl (`roc repl`):
- On Ubuntu/Debian:
```sh
sudo apt install libc-dev binutils
```
- On ArchLinux/Manjaro:
```sh
sudo pacman -S glibc binutils
```
- on Fedora:
```sh
sudo dnf install glibc-devel binutils
```
## How to install Roc platform dependencies
This step is not necessary if you only want to use the [basic-cli platform](https://github.com/roc-lang/basic-cli), like in the tutorial.