Hi,
I tried compiling the latest pre-release for R 3.3.3 for the NixOS Linux
distribution [1], but the build fails during the "make check" phase
because of the following 2 issues:
1) The "tools" test in "tests/Examples" requires network access, which
it doesn't have in our build environment. Therefore, it fails as
follows according to "tools-Ex.Rout.fail":
| [...]
| > set.seed(11)
| > ## End(Don't show)
| > pdb <- CRAN_package_db()
| Warning in url(sprintf("%s/%s", cran, path), open = "rb") :
| URL 'http://CRAN.R-project.org/web/packages/packages.rds': status was 'Couldn't resolve host name'
| Error in url(sprintf("%s/%s", cran, path), open = "rb") :
| cannot open the connection to 'http://CRAN.R-project.org/web/packages/packages.rds'
| Calls: CRAN_package_db -> as.data.frame -> read_CRAN_object -> gzcon -> url
| Execution halted
I'm wondering whether it would be possible to extend the test suite
with a configure-time flag that disable tests which depend on network
access? My experience is that most modern Linux distributions run
their builds in a restricted environment and therefore will run into
trouble if the suite assumes that it can access the Internet.
2) When R is compiled with the --without-recommended-packages flag
(which is our preferred configuration), the "base" test in
"tests/Examples" fails, apparently because it depends on MASS. I'm
citing from "base-Ex.Rout.fail":
| > ## The string "foo" and the symbol 'foo' can be used interchangably here:
| > stopifnot( identical(isNamespaceLoaded( "foo" ), FALSE),
| + identical(isNamespaceLoaded(quote(foo)), FALSE),
| + identical(isNamespaceLoaded(quote(stats)), statL))
| >
| > hasM <- isNamespaceLoaded("MASS") # (to restore if needed)
| > Mns <- asNamespace("MASS") # loads it if not already
| Error in loadNamespace(name) : there is no package called 'MASS'
| Calls: asNamespace ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
| Execution halted
I hope this helps!
Best regards,
Peter
[1] http://nixos.org/
Test suite failures in R-devel_2017-02-25_r72256
3 messages · Peter Simons, Martin Maechler
Peter Simons <simons at nospf.cryp.to>
on Mon, 27 Feb 2017 10:30:39 +0100 writes:
> Hi, I tried compiling the latest pre-release for R 3.3.3
> for the NixOS Linux distribution [1], but the build fails
> during the "make check" phase because of the following 2
> issues:
> 1) The "tools" test in "tests/Examples" requires network
> access, which it doesn't have in our build
> environment.
One may argue that the 'make check' (or even 'make check-all')
tests could / should be allowed more resources than the pure
build environment.
> Therefore, it fails as follows according to
> "tools-Ex.Rout.fail":
> | [...]
> | > set.seed(11)
> | > ## End(Don't show)
> | > pdb <- CRAN_package_db()
> | Warning in url(sprintf("%s/%s", cran, path), open = "rb") :
> | URL 'http://CRAN.R-project.org/web/packages/packages.rds': status was 'Couldn't resolve host name'
> | Error in url(sprintf("%s/%s", cran, path), open = "rb") :
> | cannot open the connection to 'http://CRAN.R-project.org/web/packages/packages.rds'
> | Calls: CRAN_package_db -> as.data.frame -> read_CRAN_object -> gzcon -> url
> | Execution halted
> I'm wondering whether it would be possible to extend the test suite
> with a configure-time flag that disable tests which depend on network
> access? My experience is that most modern Linux distributions run
> their builds in a restricted environment and therefore will run into
> trouble if the suite assumes that it can access the Internet.
[see above] Is it necessary to also run the 'make check' part in
that restricted environment? Or could that ('checking") not get
more priviledges?
Note that you can only run "make check" if you don't install
recommended packages, whereas more thorough testing would
include
make check-devel
or even
make check-all
but these do have quite a bit more requirements including
recommended packages being present.
> 2) When R is compiled with the --without-recommended-packages flag
> (which is our preferred configuration), the "base" test in
> "tests/Examples" fails, apparently because it depends on MASS. I'm
> citing from "base-Ex.Rout.fail":
> | > ## The string "foo" and the symbol 'foo' can be used interchangably here:
> | > stopifnot( identical(isNamespaceLoaded( "foo" ), FALSE),
> | + identical(isNamespaceLoaded(quote(foo)), FALSE),
> | + identical(isNamespaceLoaded(quote(stats)), statL))
> | >
> | > hasM <- isNamespaceLoaded("MASS") # (to restore if needed)
> | > Mns <- asNamespace("MASS") # loads it if not already
> | Error in loadNamespace(name) : there is no package called 'MASS'
> | Calls: asNamespace ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
> | Execution halted
Yes, that example should not have assumed a recommended package
to be available unconditionally.
I've changed it, thank you!
> I hope this helps!
> Best regards,
> Peter
> [1] http://nixos.org/
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
1 day later
Martin Maechler <maechler at stat.math.ethz.ch>
on Mon, 27 Feb 2017 16:08:40 +0100 writes:
Peter Simons <simons at nospf.cryp.to>
on Mon, 27 Feb 2017 10:30:39 +0100 writes:
>> Hi, I tried compiling the latest pre-release for R 3.3.3
>> for the NixOS Linux distribution [1], but the build fails
>> during the "make check" phase because of the following 2
>> issues:
>> 1) The "tools" test in "tests/Examples" requires network
>> access, which it doesn't have in our build
>> environment.
> One may argue that the 'make check' (or even 'make check-all')
> tests could / should be allowed more resources than the pure
> build environment.
>> Therefore, it fails as follows according to
>> "tools-Ex.Rout.fail":
>> | [...]
>> | > set.seed(11)
>> | > ## End(Don't show)
>> | > pdb <- CRAN_package_db()
>> | Warning in url(sprintf("%s/%s", cran, path), open = "rb") :
>> | URL 'http://CRAN.R-project.org/web/packages/packages.rds': status was 'Couldn't resolve host name'
>> | Error in url(sprintf("%s/%s", cran, path), open = "rb") :
>> | cannot open the connection to 'http://CRAN.R-project.org/web/packages/packages.rds'
>> | Calls: CRAN_package_db -> as.data.frame -> read_CRAN_object -> gzcon -> url
>> | Execution halted
>> I'm wondering whether it would be possible to extend the test suite
>> with a configure-time flag that disable tests which depend on network
>> access? My experience is that most modern Linux distributions run
>> their builds in a restricted environment and therefore will run into
>> trouble if the suite assumes that it can access the Internet.
> [see above] Is it necessary to also run the 'make check' part in
> that restricted environment? Or could that ('checking") not get
> more priviledges?
> Note that you can only run "make check" if you don't install
> recommended packages, whereas more thorough testing would
> include
> make check-devel
> or even
> make check-all
>
> but these do have quite a bit more requirements including
> recommended packages being present.
I have to correct myself: The above paragraph may be misleading:
Much, if not all of
make check-devel
and make check-all
have worked well since R version 3.1.0 which had in its NEWS an entry
? More of 'make check' will work if recommended packages are not
installed: but recommended packages remain needed for thorough
checking of an R build.
Further, the 'R-admin' manual (on 'make check-all' etc) contains
| Note that these checks are only run completely
| if the recommended packages are installed.
so their presence is not required but much recommended for
thorough testing.
Martin