[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help to enable test suite precondition for covid-19 relevant R package



On Mon, 2020-04-06 at 21:17 +0200, Andreas Tille wrote:
> Hi,
> 
> the cran package r-cran-gganimate requires r-cran-gifski to run its
> test
> suite.  I've prepared the latter in Git[1].  To build the package a
> rust
> compiler is needed which I provided via Build-Depends:
> cargo.  Unfortunately
> there will be some Rust modules needed which the build process tries
> to
> download:
> 
> ...
> gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG    -pthread
> -fvisibility=hidden -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-
> j1tBvV/r-base-3.6.3=. -fstack-protector-strong -Wformat -W
> /usr/bin/cargo build --release --manifest-path=myrustlib/Cargo.toml
>     Updating crates.io index
> warning: spurious network error (2 tries remaining): failed to
> resolve address for github.com: Temporary failure in name resolution;
> class=Net (12)
> warning: spurious network error (1 tries remaining): failed to
> resolve address for github.com: Temporary failure in name resolution;
> class=Net (12)
> error: failed to fetch `https://github.com/rust-lang/crates.io-index`
> 
> Caused by:
>   failed to resolve address for github.com: Temporary failure in name
> resolution; class=Net (12)
> make[1]: *** [Makevars:12: myrustlib/target/release/libmyrustlib.a]
> Error 101
> ...
> 
> Since I have no idea about rust:  How can I find out what extra
> module
> is needed and do we possibly have a package of it I could use as
> Build-Depends?
> 
> Kind regards
> 
>       Andreas.
> 
> 
> [1] https://salsa.debian.org/r-pkg-team/r-cran-gifski
> 

without looking at any of the packages, at all, you say you're
unfamiliar with Rust, so perhaps the following hints will be helpful:
 1. you can use the Rustc compiler (rustc) directly unless you actually
need to make use of a Cargo project file (Cargo.toml).
 2. `cargo` has an `--offline` option to run without network access.
Cargo is built around the concept of "crates" (libraries) being
available on crates.io, which projects can depend upon by specifying
dependencies in Cargo.toml (though it is also possible to have
dependencies hosted elsewhere), and which cargo can automatically
download, compile and link when building your project. Cargo can thus
have a need to retrieve an updated index of available crates (just like
apt update), requiring internet access, as well as needing internet
access to fetch depended upon crates that you have not already got
cached. You can however as I just mentioned run it in offline mode
whereby it tries to proceed with cached dependencies only.


Reply to: