d55deaa420
uutils / onig_sys
oniguruma guards its alloca.h include on the autoconf macro:
#if defined(HAVE_ALLOCA_H)
# include <alloca.h>
#endif
onig_sys is compiled by the `cc` crate, so no configure ever runs and
nothing defines it. Under GCC 14+ the resulting implicit declaration is
an error, so uutils failed at
regint.h:271: error: implicit declaration of function 'alloca'
relibc does ship <alloca.h>, so declare it in the cookbook's C flags.
This asserts a fact about the sysroot rather than silencing a warning,
and is what a cross-build environment is expected to supply for sources
that have no configure step. Packages whose own configure defines it to
1 are unaffected -- identical redefinitions are not diagnosed.
netutils
Declares `libredox = "0.1"`, a version string, so cargo resolved
libredox and its transitive redox_syscall from crates.io instead of the
forks. With the forks now at 0.1.19 / 0.9.1 the crates.io side is not in
the offline cache and the build died with
failed to download `redox_syscall v0.9.0`
Caused by: attempting to make an HTTP request, but --offline was
specified
local/AGENTS.md 'Local fork dependency rule (ABSOLUTE)' prohibits
version strings for crates that have a local fork, for exactly this
reason -- a second copy of the crate in the graph gives mismatched
types, and offline builds cannot resolve it at all. [patch.crates-io]
now redirects the direct and transitive resolutions onto the forks.
Both cook clean.
44 lines
2.0 KiB
Diff
44 lines
2.0 KiB
Diff
Route the Redox ABI crates through the local forks.
|
|
|
|
netutils declares `libredox = "0.1"`, a version string, so cargo resolves
|
|
libredox and its transitive redox_syscall from crates.io rather than from
|
|
Red Bear's forks. With the forks now at libredox 0.1.19 / redox_syscall
|
|
0.9.1, the crates.io side is not in the offline cache and the build dies:
|
|
|
|
failed to download `redox_syscall v0.9.0`
|
|
Caused by: attempting to make an HTTP request, but --offline was specified
|
|
|
|
local/AGENTS.md § "Local fork dependency rule (ABSOLUTE)" prohibits version
|
|
strings for any crate that has a local fork, for exactly this reason: cargo
|
|
can pull a second copy of the crate into the graph, producing mismatched
|
|
types, and an offline build cannot resolve it at all.
|
|
|
|
Adding [patch.crates-io] redirects both the direct dependency and the
|
|
transitive ones onto the forks. The declaration above is left as-is so the
|
|
diff stays minimal; the patch table is what governs resolution.
|
|
|
|
--- a/Cargo.toml
|
|
+++ b/Cargo.toml
|
|
@@ -50,3 +50,21 @@
|
|
|
|
[target.'cfg(not(target_os = "redox"))'.dependencies]
|
|
libc = "0.2.51"
|
|
+
|
|
+# Red Bear: route the Redox ABI crates through the local forks.
|
|
+#
|
|
+# `libredox = "0.1"` above is a version string, which resolves from
|
|
+# crates.io and drags crates.io's redox_syscall in with it:
|
|
+#
|
|
+# failed to download `redox_syscall v0.9.0`
|
|
+# Caused by: attempting to make an HTTP request, but --offline was specified
|
|
+#
|
|
+# local/AGENTS.md § "Local fork dependency rule" makes version strings for
|
|
+# fork crates a violation precisely because of this: two copies of the same
|
|
+# crate in one graph give mismatched types, and the offline build cannot
|
|
+# resolve the crates.io side at all. [patch.crates-io] redirects the direct
|
|
+# and transitive resolutions onto the forks that are the source of truth.
|
|
+[patch.crates-io]
|
|
+redox_syscall = { path = "../../../../local/sources/syscall" }
|
|
+libredox = { path = "../../../../local/sources/libredox" }
|
|
+redox-scheme = { path = "../../../../local/sources/redox-scheme" }
|