about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/doc/errors.md
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-05-19 08:28:03 +0000
committerbors <bors@rust-lang.org>2024-05-19 08:28:03 +0000
commit9f4b6517208d77556a919789ed285e0c6f67bbb5 (patch)
treeed59ba0a778df31624015f2719f19f215d36e429 /compiler/rustc_codegen_gcc/doc/errors.md
parent143661a7f0df8b456f9caffbb1fabafcd4407db0 (diff)
parentc944b01b81abe1f28f3f8dd9bf883bd66facc7de (diff)
downloadrust-9f4b6517208d77556a919789ed285e0c6f67bbb5.tar.gz
rust-9f4b6517208d77556a919789ed285e0c6f67bbb5.zip
Auto merge of #17259 - lnicola:sync-from-rust, r=lnicola
internal: Sync from downstream
Diffstat (limited to 'compiler/rustc_codegen_gcc/doc/errors.md')
-rw-r--r--compiler/rustc_codegen_gcc/doc/errors.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_gcc/doc/errors.md b/compiler/rustc_codegen_gcc/doc/errors.md
new file mode 100644
index 00000000000..5727b0ff7c8
--- /dev/null
+++ b/compiler/rustc_codegen_gcc/doc/errors.md
@@ -0,0 +1,27 @@
+# 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 libgccijt, 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`.