You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting-started.md
+61-9Lines changed: 61 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -105,7 +105,12 @@ The following output should be printed out:
105
105
## Troubleshooting
106
106
107
107
### Building dependencies:
108
-
This step includes compiling the Linux kernel which can get quite resource intensive. In our tests `6GB` is the minimum value for which compiling Linux is possible, this means you might not be able to use Rex on machines with 6GB or less RAM. A sign that you ran into Out-Of-Memory (OOM) error is if you encounter this warning:
108
+
109
+
This step includes compiling the Linux kernel which can get quite resource
110
+
intensive. In our tests `6GB` is the minimum value for which compiling
111
+
Linux is possible, this means you might not be able to use Rex on machines
112
+
with 6GB or less RAM. A sign that you ran into Out-Of-Memory (OOM) error is
113
+
if you encounter this warning:
109
114
110
115
```bash
111
116
/root/rex/linux/scripts/link-vmlinux.sh: line 113: 55407 Killed LLVM_OBJCOPY="${OBJCOPY}"${PAHOLE} -J ${PAHOLE_FLAGS}${1}
For WSL users, it is recommended to allocate more RAM to WSL before starting this step since WSL by default only utilizes half the RAM available on the host machine:
127
+
For WSL users, it is recommended to allocate more RAM to WSL before
128
+
starting this step since WSL by default only utilizes half the RAM
129
+
available on the host machine:
130
+
131
+
From a Powershell instance, create and open a `.wslconfig` file in your
132
+
home directory:
123
133
124
-
From a Powershell instance, create and open a `.wslconfig` file in your home directory:
125
134
```bash
126
135
notepad $HOME/.wslconfig
127
136
```
128
137
129
138
Add the following lines to the file then save:
139
+
130
140
```bash
131
141
[wsl2]
132
-
memory=6GB
142
+
memory=8GB
143
+
swap=8GB
133
144
```
134
145
135
146
You should change the value to how much memory you want to allocate to WSL.
136
147
148
+
Another issue that may happen is bootstrap failure due to the missing
149
+
`libLLVM-19-rex.so`:
150
+
151
+
```console
152
+
--- stderr
153
+
llvm-config: error: libLLVM-19-rex.so is missing
154
+
thread 'main' panicked at compiler/rustc_llvm/build.rs:264:16:
155
+
command did not execute successfully: "/home/chin39/Documents/rex-kernel/build/rust-build/x86_64-unknown-linux-gnu/llvm/bin/llvm-config" "--link-shared" "--libs" "--system-libs" "asmparser" "bitreader" "bitwriter" "coverage" "instrumentation" "ipo" "linker" "lto" "x86"
156
+
expected success, got: exit status: 1
157
+
stack backtrace:
158
+
0: rust_begin_unwind
159
+
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/panicking.rs:665:5
160
+
1: core::panicking::panic_fmt
161
+
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/core/src/panicking.rs:76:14
162
+
2: build_script_build::output
163
+
3: build_script_build::main
164
+
4: core::ops::function::FnOnce::call_once
165
+
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
as it changes the linkage of `libLLVM` from static to dynamic, but rust
176
+
bootstrap process does not rebuild `libLLVM.so` following the change.
177
+
The issue can be fixed by removing the build directory created by meson and
178
+
starting a clean build.
179
+
137
180
### Building the Rex samples:
138
-
There are some caveats before you run this step. By default the `ninja` build tool uses a quite high level of parallelism, which might again cause OOM on personal machines. A sign of this happenning is if you try this step and run into similar errors to:
181
+
182
+
There are some caveats before you run this step. By default the `ninja`
183
+
build tool uses a quite high level of parallelism, which might again cause
184
+
OOM on personal machines. A sign of this happenning is if you try this step
185
+
and run into similar errors to:
139
186
140
187
```bash
141
188
error: could not compile `core` (lib)
@@ -144,19 +191,24 @@ Caused by:
144
191
process didn't exit successfully:
145
192
```
146
193
147
-
To resolve this problem, try running with fewer commands in parallel using the `-j` argument, for example to run with 4 commands in parallel:
194
+
To resolve this problem, try running with fewer commands in parallel using
195
+
the `-j` argument, for example to run with 4 commands in parallel:
148
196
149
197
```bash
150
198
meson compile -C build -j 4
151
199
```
152
200
153
-
Our tests indicate a peak memory usage of 12GB with `-j 8`, so if you have less RAM it's helpful to keep the `-j` argument below 8.
201
+
Our tests indicate a peak memory usage of 12GB with `-j 8`, so if you have
202
+
less RAM it's helpful to keep the `-j` argument below 8.
154
203
155
204
### Booting the QEMU VM:
156
-
By default our QEMU VM runs on 8GB of memory. To reduce this, open the qemu scripts using an editor and locate line 300:
205
+
206
+
By default our QEMU VM runs on 8GB of memory. To reduce this, open the qemu
207
+
scripts using an editor and locate line 300:
157
208
158
209
```bash
159
210
MEMORY=8192
160
211
```
161
212
162
-
And change this value to the number you want. Rex has been tested to work with 4GB or `MEMORY=4096`.
213
+
And change this value to the number you want. Rex has been tested to work
0 commit comments