From a90286962af32133f646dcd80ec8221eae5a7eda Mon Sep 17 00:00:00 2001 From: Himadri Bhattacharjee <107522312+lavafroth@users.noreply.github.com> Date: Tue, 16 Dec 2025 16:40:02 +0530 Subject: [PATCH] feat: add crti note to self --- content/post/nixos-notes-to-self.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/content/post/nixos-notes-to-self.md b/content/post/nixos-notes-to-self.md index f81aa64a..5102cb60 100644 --- a/content/post/nixos-notes-to-self.md +++ b/content/post/nixos-notes-to-self.md @@ -68,3 +68,14 @@ nix build -f ./builder.nix ```sh readlink /nix/var/nix/profiles/system | cut -d- -f2 ``` + +## crti.o not found + +If you are compiling a program with C FFI bindings, you might encounter the following error: + +``` +/nix/store/dc9vaz50jg7mibk9xvqw5dqv89cxzla3-binutils-2.44/bin/ld: cannot find crti.o: No such file or directory +collect2: error: ld returned 1 exit status +``` + +You need to add `stdenv.cc.cc.lib` to your flake's `buildInputs`.