[Rd] R 2.0.0: problem: installing --with-package-versions

Matthias Burger matthias.burger at epigenomics.com
Wed Oct 6 16:55:56 CEST 2004


following the given advice by Brian Ripley I first tried the variant
i) install once without --with-package-versions
    repeat with --with-package-versions
    remove the package folder without the version info

which did not work for me (see details below).


ii) patch $R_HOM/lib/R/bin/INSTALL as suggested (well I did not reinstall from 
INSTALL.in as was implied)
and install with --with-package-versions set in the first attempt
works and the package loads fine into the R session.


Thank you very much for the prompt and very helpful feedback!

Regards,

   Matthias



Details for i)
in the second installation R issues a warning
* Installing *source* package 'RUnit' as 'RUnit_0.4.0' ...
** R
** inst
** save image

rm: cannot remove 
`/mnt/nfs/local.hm/R/R-2.0.x-libs-EpiR/RUnit_0.4.0/R/RUnit_0.4.0': No such file 
or directory
** preparing package for lazy loading

  RUnit loaded.

** help
  >>> Building/Updating help pages for package 'RUnit'
      Formats: text html latex example
   RUnit-internal                    text    html    latex
   RUnit-intro                       text    html    latex
   checkFuncs                        text    html    latex   example
[...]

In R
this results in (fresh R 2.0.0 session)
 > library("RUnit_0.4.0")
Error in gzfile(file, "rb") : unable to open connection
In addition: Warning message:
cannot open compressed file `/mnt/local/R/R-2.0.x-libs-EpiR/RUnit_0.4.0/R/RUnit.rdx'
Error: Unable to load R code in package 'RUnit_0.4.0'
Error in library("RUnit_0.4.0") : package/namespace load failed for 'RUnit'

or with lib.loc provided additional (also .libPaths() knows of this location)
 > library("RUnit_0.4.0", lib.loc="/mnt/local/R/R-2.0.x-libs-EpiR")
Error in gzfile(file, "rb") : unable to open connection
In addition: Warning message:
cannot open compressed file `/mnt/local/R/R-2.0.x-libs-EpiR/RUnit_0.4.0/R/RUnit.rdx'
Error: Unable to load R code in package 'RUnit_0.4.0'
Error in library("RUnit_0.4.0", lib.loc = "/mnt/local/R/R-2.0.x-libs-EpiR") :
         package/namespace load failed for 'RUnit'





Prof Brian Ripley wrote:
> It seems that if you first install this without --with-package-versions
> then with and then remove the first version, it works.
> 
> Here is a patch, shortly to appear in R-patched/R-devel:
> 
> --- INSTALL.in  (revision 31298)
> +++ INSTALL.in  (working copy)
> @@ -601,10 +601,10 @@
>      ## is no namespace).  Argh.
>      ## </NOTE>
>      save_image_defaults="list(compress=TRUE, safe=FALSE)"
> -    code_file="${R_PACKAGE_DIR}/R/${R_PACKAGE_NAME}"
> +    code_file="${R_PACKAGE_DIR}/R/${pkg_name}"
>      rda_file="${R_PACKAGE_DIR}/R/all.rda"
>      if test -f NAMESPACE; then
> -      code_cmd="echo invisible(.libPaths(c(\"${lib}\", .libPaths()))); 
> .getRequiredPackages(); saveNamespaceImage(\"${pkg_name}\", 
> \"${rda_file}\", \"${lib}\")"
> +      code_cmd="echo invisible(.libPaths(c(\"${lib}\", .libPaths()))); 
> .getRequiredPackages(); saveNamespaceImage(\"${R_PACKAGE_NAME}\", 
> \"${rda_file}\", \"${lib}\")"
>        loader_file=nsrdaload.R
>        R_save_args="--vanilla --slave"
>      else
> 
> 
> On Tue, 5 Oct 2004, Matthias Burger wrote:
> 
> 
>>Hello R developers,
>>
>>installing R 2.0.0 from source on a Linux Debian system (gcc 3.2.2)
>>  - which worked just fine - I encountered the following problem when trying to
>>update/install packages with the option --with-package-versions:
>>
>>example: RUnit 0.4.0 (also on CRAN)
>>
>>R20 CMD INSTALL -l /mnt/local/R/R-2.0.x-libs-EpiR --with-package-versions 
>>RUnit_0.4.0.tar.gz
>>
>>or after untaring
>>R20 CMD INSTALL -l /mnt/local/R/R-2.0.x-libs-EpiR --with-package-versions RUnit
>>
>>I get
>>* Installing *source* package 'RUnit' as 'RUnit_0.4.0' ...
>>** R
>>** inst
>>** save image
>>Error in loadNamespace(package, lib.loc, keep.source, TRUE, TRUE) :
>>         package 'RUnit' does not have a name space
>>Execution halted
>>ERROR: execution of package source for 'RUnit' failed
>>
>>This happens only with the --with-package-versions option.
>>I scanned the manual and ?INSTALL but did not find mention of this behaviour.
>>
>>Any suggestion what I have overlooked or how to cure the failure?
>>
>>
>>Regards,
>>
>>   Matthias
>>
>>
>> >version
>>          _
>>platform i686-pc-linux-gnu
>>arch     i686
>>os       linux-gnu
>>system   i686, linux-gnu
>>status
>>major    2
>>minor    0.0
>>year     2004
>>month    10
>>day      04
>>language R
>>
>>
> 
> 

-- 
Matthias Burger                     Project Manager/ Biostatistician
Epigenomics AG    Kleine Praesidentenstr. 1    10178 Berlin, Germany
phone:+49-30-24345-371                          fax:+49-30-24345-555
http://www.epigenomics.com           matthias.burger at epigenomics.com



More information about the R-devel mailing list