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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Andreas Tille-5
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

--
http://fam-tille.de

Reply | Threaded
Open this post in threaded view
|

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

jnqnfe
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 | Threaded
Open this post in threaded view
|

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

Andreas Tille-5
Hi,

thanks a lot for these helpful hints.

On Mon, Apr 06, 2020 at 08:51:57PM +0100, [hidden email] wrote:
>
> 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).

I was simply following what upstream code was specifying as requriement
(which probably makes perfectly sense when not using a Debian chroot
that has no remote access).

>  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.

I'll keep a record of these helpful hints in Git of that package.  It
turned out that I can use r-cran-av as an alternative which for the
intended purpose works out of the box.  So I'll delay this for the
future if there might be some need, thought.

Thanks again

      Andreas.

--
http://fam-tille.de