compiler/rustc_codegen_gcc/doc/errors.md MARKDOWN 28 lines View on github.com → Search inside
1# Common errors23This file lists errors that were encountered and how to fix them.45### `failed to build archive` error67When you get this error:89```10error: failed to build archive: failed to open object file: No such file or directory (os error 2)11```1213That can be caused by the fact that you try to compile with `lto = "fat"`, but you didn't compile the sysroot with LTO.14(Not sure if that's the reason since I cannot reproduce anymore. Maybe it happened when forgetting setting `FAT_LTO`.)1516### ld: cannot find crtbegin.o1718When compiling an executable with libgccjit, if setting the `*LIBRARY_PATH` variables to the install directory, you will get the following errors:1920```21ld: cannot find crtbegin.o: No such file or directory22ld: cannot find -lgcc: No such file or directory23ld: cannot find -lgcc: No such file or directory24libgccjit.so: error: error invoking gcc driver25```2627To fix this, set the variables to `gcc-build/build/gcc`.

Findings

✓ No findings reported for this file.

Get this view in your editor

Same data, no extra tab — call code_get_file + code_get_findings over MCP from Claude/Cursor/Copilot.