Allow offline compilation
tbu- opened this issue · 2 comments
tbu- commented
I don't know what needs to be done to make that work, but I'd like to be able to compile without being connected to the internet.
$ cross run --target i686-unknown-linux-steed --example hashmap --no-default-features --features naive_ralloc
Updating git repository `https://github.com/redox-os/ralloc`
warning: spurious network error (2 tries remaining): [12/-1] Failed to resolve address for github.com: Name or service not known
warning: spurious network error (1 tries remaining): [12/-1] Failed to resolve address for github.com: Name or service not known
error: failed to load source for a dependency on `ralloc`
Caused by:
Unable to update https://github.com/redox-os/ralloc
Caused by:
failed to fetch into /home/<user>/.cargo/git/db/ralloc-797ee1a3f928155b
To learn more, run the command again with --verbose.
error: couldn't generate Cargo.lock
caused by: `"cargo" "generate-lockfile" "--manifest-path" "/path/to/steed/Cargo.toml"` failed with exit code: Some(101)
note: run with `RUST_BACKTRACE=1` for a backtrace
japaric commented
cross
does a cargo generate-lockfile
everytime it's invoked (because it can't generate the lockfile inside the Docker container due to read-only mounts); that's what requires internet connection. There's no way to disable that behavior, sorry.
You can use Xargo though but it will probably be useful for i686 and x86_64 unless you have a bunch of cross toolchains and a properly configured QEMU around.
tbu- commented
With a new release of cross
, this issue should go away.