summaryrefslogtreecommitdiff
path: root/content/posts/2019-2-1-compiling-memory-requirements.md
diff options
context:
space:
mode:
authorChristian Segundo2024-09-01 20:34:09 +0200
committerChristian Segundo2024-09-01 20:34:09 +0200
commitfae17644b9ef2382994bf3ce7d288e08211c42ef (patch)
tree66305cadf6371bb777f8c2e7fa62db4930621e4c /content/posts/2019-2-1-compiling-memory-requirements.md
parent82c70566e88d9260d68f69ab59e6761197d828ec (diff)
downloadcheck-caps-lock-fae17644b9ef2382994bf3ce7d288e08211c42ef.tar.gz
migrate more stuff
Diffstat (limited to 'content/posts/2019-2-1-compiling-memory-requirements.md')
-rw-r--r--content/posts/2019-2-1-compiling-memory-requirements.md33
1 files changed, 33 insertions, 0 deletions
diff --git a/content/posts/2019-2-1-compiling-memory-requirements.md b/content/posts/2019-2-1-compiling-memory-requirements.md
new file mode 100644
index 0000000..567dcb2
--- /dev/null
+++ b/content/posts/2019-2-1-compiling-memory-requirements.md
@@ -0,0 +1,33 @@
+---
+layout: post
+title: there is NOT at least X GiB RAM
+category: GNU/Linux
+tags:
+ - gentoo
+---
+
+Recently, while compiling latest Rust version I came across a problem on my very
+old Macbook where `emerge` complained about not enough RAM to compile Rust.
+
+The `check-reqs_pkg_setup` from `check-reqs.eclass` takes care of this check:
+
+```bash
+...
+pre_build_checks() {
+ CHECKREQS_DISK_BUILD="7G"
+ CHECKREQS_MEMORY="4G"
+...
+ check-reqs_pkg_setup
+}
+```
+
+If you don't have enough memory, the quick and dirty solution is to add enough
+swap and run `emerge` again with `${I_KNOW_WHAT_I_AM_DOING}` set.
+
+```
+fallocate -l 8G /mnt/swap.swap
+mkswap /mnt/swap.swap
+swapon /mnt/swap.swap
+chmod 600 /mnt/swap.swap
+I_KNOW_WHAT_I_AM_DOING=1 emerge -1 rust
+```