rust/doc/errors.md
ron dd1b72a0d8
Fix typos and grammar in documentation
- Readme.md: add missing "you" ("If don't" → "If you don't")
- Readme.md: fix wrong preposition ("without this backend" → "with this backend")
- Readme.md: fix double space
- doc/errors.md: fix transposed letters ("libgccijt" → "libgccjit")
- doc/debugging.md: remove extra word ("Run do the command" → "Run the command")
- doc/debugging.md: fix past participle ("cannot be ran" → "cannot be run")
- doc/tips.md: add missing verb ("won't a chance" → "won't have a chance")
- doc/gimple.md: fix preposition ("interested into" → "interested in")
2026-02-11 17:38:07 -05:00

940 B

Common errors

This file lists errors that were encountered and how to fix them.

failed to build archive error

When you get this error:

error: failed to build archive: failed to open object file: No such file or directory (os error 2)

That can be caused by the fact that you try to compile with lto = "fat", but you didn't compile the sysroot with LTO. (Not sure if that's the reason since I cannot reproduce anymore. Maybe it happened when forgetting setting FAT_LTO.)

ld: cannot find crtbegin.o

When compiling an executable with libgccjit, if setting the *LIBRARY_PATH variables to the install directory, you will get the following errors:

ld: cannot find crtbegin.o: No such file or directory
ld: cannot find -lgcc: No such file or directory
ld: cannot find -lgcc: No such file or directory
libgccjit.so: error: error invoking gcc driver

To fix this, set the variables to gcc-build/build/gcc.