Make the no-hardlinks-patches conditional and move them to
files/no-hardlinks.
Newer kernels should return sane kern.proc.pathname values for
hardlinks which will hopefully help avoid the intermittent "can't
find crate for `std`" build failures we had on the package
builders.
Thanks to kib@ for fixing kernel behavior. Now let's see if it
makes a difference for lang/rust-nightly.
Changes: 25ec827385...e249ce6b23
PR: 248184
It is currently broken:
error: unresolved link to `crate::os::unix::ffi::OsStrExt`
--> library/std/src/ffi/mod.rs:134:22
|
134 | //! [unix.OsStrExt]: crate::os::unix::ffi::OsStrExt
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unresolved link
|
= note: `-D broken-intra-doc-links` implied by `-D warnings`
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: unresolved link to `crate::os::unix::ffi::OsStrExt::from_bytes`
--> library/std/src/ffi/mod.rs:135:21
|
135 | //! [`from_bytes`]: crate::os::unix::ffi::OsStrExt::from_bytes
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unresolved link
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: unresolved link to `crate::os::unix::ffi::OsStrExt::as_bytes`
--> library/std/src/ffi/mod.rs:136:19
|
136 | //! [`as_bytes`]: crate::os::unix::ffi::OsStrExt::as_bytes
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unresolved link
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: unresolved link to `crate::os::unix::ffi::OsStringExt`
--> library/std/src/ffi/mod.rs:131:25
|
131 | //! [unix.OsStringExt]: crate::os::unix::ffi::OsStringExt
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unresolved link
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: unresolved link to `crate::os::unix::ffi::OsStringExt::from_vec`
--> library/std/src/ffi/mod.rs:132:19
|
132 | //! [`from_vec`]: crate::os::unix::ffi::OsStringExt::from_vec
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unresolved link
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: unresolved link to `crate::os::unix::ffi::OsStringExt::into_vec`
--> library/std/src/ffi/mod.rs:133:19
|
133 | //! [`into_vec`]: crate::os::unix::ffi::OsStringExt::into_vec
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unresolved link
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: unresolved link to `crate::os::windows::ffi::OsStrExt`
--> library/std/src/ffi/mod.rs:138:25
|
138 | //! [windows.OsStrExt]: crate::os::windows::ffi::OsStrExt
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unresolved link
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: unresolved link to `crate::os::windows::ffi::OsStrExt::encode_wide`
--> library/std/src/ffi/mod.rs:139:22
|
139 | //! [`encode_wide`]: crate::os::windows::ffi::OsStrExt::encode_wide
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unresolved link
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: unresolved link to `crate::os::windows::ffi::OsStringExt`
--> library/std/src/ffi/mod.rs:141:28
|
141 | //! [windows.OsStringExt]: crate::os::windows::ffi::OsStringExt
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unresolved link
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: unresolved link to `crate::os::windows::ffi::OsStringExt::from_wide`
--> library/std/src/ffi/mod.rs:142:20
|
142 | //! [`from_wide`]: crate::os::windows::ffi::OsStringExt::from_wide
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unresolved link
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: unresolved link to `crate::os::unix::fs::PermissionsExt`
--> library/std/src/fs.rs:176:25
|
176 | /// [`PermissionsExt`]: crate::os::unix::fs::PermissionsExt
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unresolved link
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: unresolved link to `crate::os::unix::fs::symlink`
--> library/std/src/fs.rs:1741:37
|
1741 | /// [`std::os::unix::fs::symlink`]: crate::os::unix::fs::symlink
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unresolved link
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: unresolved link to `crate::os::windows::fs::symlink_file`
--> library/std/src/fs.rs:1742:45
|
1742 | /// [`std::os::windows::fs::symlink_file`]: crate::os::windows::fs::symlink_file
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unresolved link
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: unresolved link to `crate::os::windows::fs::symlink_dir`
--> library/std/src/fs.rs:1743:22
|
1743 | /// [`symlink_dir`]: crate::os::windows::fs::symlink_dir
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unresolved link
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: aborting due to 14 previous errors
error: Could not document `std`.
The location of rustc (found via env::current_exe()) is used to
find the right libstd. However it might have been "copied" by
creating a hard link to the new location instead. Like /proc/curproc/file,
KERN_PROC_PATHNAME (used internally by current_exe()) can return
any of the file's multiple paths. Most of the time it returns the
right rustc path and the build will succeed but occasionally it
will return the "wrong" path and the build fails with:
error[E0463]: can't find crate for `std`
If this is right a viable workaround should be to never create hard
links during the build, so let's try that.
Also drop the related llvm-config-wrapper workaround.
PR: 248184
RLS is broken in nightly-2020-07-18 but that should not have aborted
the package build. Add a workaround for the dist.missing-tools
with build.tools bug.
https://github.com/rust-lang/rust/issues/74545
- Add workaround to fix build when CC/CXX have "clang" in them [1]
- Add patch to allow build with outdated libgit2 0.99.0
Changes: 485c5fb6e1...7f3df57724
PR: 238556 [1]