Henrik Bengtsson
2001-Aug-03 20:53 UTC
[R] Warning when building packages and update suggestion
I want to share this knowledge to save you the hours it took me to troubleshoot the following problem. Maybe you already know about this, but I certainly didn't. In the end I also suggest an update fix. PROBLEM: I have been building packages for a couple of months now without any problems. However, a couple of hours ago I ran into a strange problem, which I first couldn't understand or fix: >Rcmd build --binary R.base ... make[1]: *** [/tmp/Rbuild.468075/R.base/zzzz] Error 1 make[1]: Leaving directory `/users/braju.com.R/public_html/R.base/R.base' make: *** [pkg-R.base] Error 2 make: Leaving directory `/progs/R/rw1030/src/gnuwin32' *** Installation of R.base failed *** ... REASON: As usual you think that *you* didn't do anything different than usual. However, yesterday I added a library(R.base) in my ~/R.profile file, i.e. every time [R] starts the library R.base is automatically loaded. After imitating the same make calls as 'Rcmd build --binary R.base' does and looking into on of the temporary files created, I saw that during the build process [R] was started. I turned out that [R] failed because it tried to load the library I was currently building and from the previous build I did an error was introduced. So, the installed R.base didn't work, which made any try rebuild it to fail. SOLUTION: My solution was to remove ~/R.profile and everything worked as usual. UPDATE SUGGESTION: I don't know much about the package building process, but couldn't [R] *always* be started with the options --no-site-file (Suppress reading of the site-wide startup profile) and --no-init-file (Suppress reading of the directory or user's .Rprofile file) when Rcmd build is used? I was trying to look into the make files where this should be done, but I couldn't find it. Henrik Bengtsson Lund University/UC Berkeley -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Prof Brian D Ripley
2001-Aug-04 06:11 UTC
[R] Warning when building packages and update suggestion
First, this is a comment on *one* way of building packages under *Windows*. So it is hardly universal. And you did not even mention the OS. Second, is not R.base a confusing name? There is already an R base package, and the solution is already used for that! Third, the sources are all there for you to investigate, and the information is in the documentation. R is run to create the time stamp. Make your package by make STAMP=NO pkg-R.base to avoid this, or alter the line @echo "cat('Built: R ', R.version[['major']], '.', R.version[['minor']], '; Win32; ', format(Sys.time()), sep='')" | $(RHOME)/bin/Rterm --slave >> ${DPKG}/DESCRIPTION in src/gnuwin32/MakePkg as you wish. I have added --vanilla. BDR On Fri, 3 Aug 2001, Henrik Bengtsson wrote:> I want to share this knowledge to save you the hours it took me to > troubleshoot the following problem. Maybe you already know about this, but I > certainly didn't. In the end I also suggest an update fix. > > PROBLEM: > I have been building packages for a couple of months now without any > problems. However, a couple of hours ago I ran into a strange problem, which > I first couldn't understand or fix: > > >Rcmd build --binary R.base > ... > make[1]: *** [/tmp/Rbuild.468075/R.base/zzzz] Error 1 > make[1]: Leaving directory `/users/braju.com.R/public_html/R.base/R.base' > make: *** [pkg-R.base] Error 2 > make: Leaving directory `/progs/R/rw1030/src/gnuwin32' > *** Installation of R.base failed *** > ... > > REASON: > As usual you think that *you* didn't do anything different than usual. > However, yesterday I added a library(R.base) in my ~/R.profile file, i.e. > every time [R] starts the library R.base is automatically loaded. After > imitating the same make calls as 'Rcmd build --binary R.base' does and > looking into on of the temporary files created, I saw that during the build > process [R] was started. I turned out that [R] failed because it tried to > load the library I was currently building and from the previous build I did > an error was introduced. So, the installed R.base didn't work, which made > any try rebuild it to fail. > > SOLUTION: > My solution was to remove ~/R.profile and everything worked as usual. > > > UPDATE SUGGESTION: > I don't know much about the package building process, but couldn't [R] > *always* be started with the options --no-site-file (Suppress reading of the > site-wide startup profile) and --no-init-file (Suppress reading of the > directory or user's .Rprofile file) when Rcmd build is used? I was trying to > look into the make files where this should be done, but I couldn't find it. > > > Henrik Bengtsson > Lund University/UC Berkeley > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._