diff options
| author | Laurențiu Nicola <lnicola@dend.ro> | 2024-05-19 11:20:26 +0300 |
|---|---|---|
| committer | Laurențiu Nicola <lnicola@dend.ro> | 2024-05-19 11:20:26 +0300 |
| commit | 6ead205843eabf8121107b2f95c55be857f195e6 (patch) | |
| tree | ec4e9aabbf7b678dd04192d806e1ee7cc8987263 /compiler/rustc_codegen_gcc/doc/errors.md | |
| parent | 2018426f569829bf5bb8866e16957eaef508f770 (diff) | |
| parent | 6579ed89f0fcc26da71afdd11d30d63f6f812a0a (diff) | |
| download | rust-6ead205843eabf8121107b2f95c55be857f195e6.tar.gz rust-6ead205843eabf8121107b2f95c55be857f195e6.zip | |
Merge from rust-lang/rust
Diffstat (limited to 'compiler/rustc_codegen_gcc/doc/errors.md')
| -rw-r--r-- | compiler/rustc_codegen_gcc/doc/errors.md | 27 |
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`. |
