[R-SIG-Mac] Half-installed package (was Consistency of information...)
macq
macqueen1 at mail.llnl.gov
Fri Apr 29 20:55:39 CEST 2005
More details on how I got a half-installed package; see below. (kind of long)
Fundamentally, what's happening (I believe) is that in the context
where I used it,
install.packages() is not cleaning up after itself like it normally does.
-Don
At 4:00 PM -0400 4/28/05, Simon Urbanek wrote:
>Don,
>
>On Apr 28, 2005, at 2:34 PM, Don MacQueen wrote:
>
>>I'm sorry, I thought the non-zero exit status message was
>>sufficient and definitive.
>>
>>Yes, it had failed. Prior to that message, it had said, in bright red text,
>>
>>make: *** [deldir.so] Error 1
>>ERROR: compilation failed for package 'deldir'
>
>Ok, that qualifies for "failed installation" :).
>
>>library(deldir) works in the sense that it returns no error or
>>warning message.
>
>This is the reason why R.app shows it as installed - the package is
>there and loads. In fact R.app simply asks R about the package list
>- it doesn't try to determine anything on its own. Hence this is not
>a problem in R.app (and has nothing to do with consistency of
>information about installed packages - because it is consistent),
>but rather something with the package installation.
>
>>After all this, there is a folder,
>> ~/Library/R/Library/deldir
>
>Oh, ok - you're installing your own private copy then.
>
>On Apr 28, 2005, at 2:53 PM, Don MacQueen wrote:
>>The only hint I saw, and it showed up in the Installer, was to
>>remove copies of old RAqua. In fact, it says "previous versions of
>>the Cocoa GUI are fine". Maybe I didn't look hard enough, but that
>>looked pretty definite to me.
>
>It's ok to install over previous version, no problem, but if you use
>your own private R packages, you cannot share them across R versions
>(that's why personally I recommend to avoid that practice unless you
>have no admin access). The safest thing is to delete ~/Library/R
>after upgrade. We don't want the installer to be destructive, that's
>why don't do it by default.
>
>Nevertheless, I still don't know how you happen to get the
>half-installed package. Did you use the Package Installer or did you
>install it manually? If so, can you reproduce it even after deleting
>~/Library/R?
Yes, I can.
Frist, I decided to make a fresh start by entirely deleting R. I
deleted ~Library/R, and /Library/Frameworks/R.framework. Then I
reinstalled R (2.1.0) from the mpkg installer. In the custom install
I selected all three options, including the optional X11/tcltk
package.
Then I started R.app. The very first thing I did was use
install.packages('deldir') at the command line in the console. Did
not use the GUI package installer. The full transcript is below.
Note that I am installing my own private copy of deldir, but not by
intent. That's just what happened. I do have admin privileges.
For comparison, I can mention that on another OS X box, where I have
installed R 2.1.0 from source, installation of deldir by the same
method succeeds, and does install globally, not as a private copy.
R : Copyright 2005, The R Foundation for Statistical Computing
Version 2.1.0 (2005-04-18), ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for a HTML browser interface to help.
Type 'q()' to quit R.
> install.packages('deldir')
Warning in install.packages("deldir") : argument 'lib' is missing:
using /Users/macq/Library/R/library
--- Please select a CRAN mirror for use in this session ---
trying URL 'http://cran.cnr.Berkeley.edu/src/contrib/deldir_0.0-2.tar.gz'
Content type 'application/x-tar' length 33380 bytes
opened URL
==================================================
downloaded 32Kb
* Installing *source* package 'deldir' ...
** libs
g77 -fno-common -g -O2 -c acchk.f -o acchk.o
g77 -fno-common -g -O2 -c addpt.f -o addpt.o
g77 -fno-common -g -O2 -c adjchk.f -o adjchk.o
g77 -fno-common -g -O2 -c binsrt.f -o binsrt.o
g77 -fno-common -g -O2 -c circen.f -o circen.o
g77 -fno-common -g -O2 -c cross.f -o cross.o
g77 -fno-common -g -O2 -c delet.f -o delet.o
g77 -fno-common -g -O2 -c delet1.f -o delet1.o
g77 -fno-common -g -O2 -c delout.f -o delout.o
g77 -fno-common -g -O2 -c delseg.f -o delseg.o
g77 -fno-common -g -O2 -c dirout.f -o dirout.o
g77 -fno-common -g -O2 -c dirseg.f -o dirseg.o
g77 -fno-common -g -O2 -c inddup.f -o inddup.o
g77 -fno-common -g -O2 -c initad.f -o initad.o
g77 -fno-common -g -O2 -c inside.f -o inside.o
g77 -fno-common -g -O2 -c insrt.f -o insrt.o
g77 -fno-common -g -O2 -c insrt1.f -o insrt1.o
g77 -fno-common -g -O2 -c locn.f -o locn.o
g77 -fno-common -g -O2 -c master.f -o master.o
g77 -fno-common -g -O2 -c mnnd.f -o mnnd.o
g77 -fno-common -g -O2 -c pred.f -o pred.o
g77 -fno-common -g -O2 -c qtest.f -o qtest.o
g77 -fno-common -g -O2 -c qtest1.f -o qtest1.o
g77 -fno-common -g -O2 -c stoke.f -o stoke.o
g77 -fno-common -g -O2 -c succ.f -o succ.o
g77 -fno-common -g -O2 -c swap.f -o swap.o
g77 -fno-common -g -O2 -c testeq.f -o testeq.o
g77 -fno-common -g -O2 -c triar.f -o triar.o
g77 -fno-common -g -O2 -c trifnd.f -o trifnd.o
gcc -bundle -flat_namespace -undefined suppress -L/usr/local/lib -o
deldir.so acchk.o addpt.o adjchk.o binsrt.o circen.o cross.o delet.o
delet1.o delout.o delseg.o dirout.o dirseg.o inddup.o initad.o
inside.o insrt.o insrt1.o locn.o master.o mnnd.o pred.o qtest.o
qtest1.o stoke.o succ.o swap.o testeq.o triar.o trifnd.o
-L/usr/local/lib/gcc/powerpc-apple-darwin6.8/3.4.2 -lg2c -lSystem
-lcc_dynamic -framework R
ld: can't locate file for: -lbundle1.o
make: *** [deldir.so] Error 1
ERROR: compilation failed for package 'deldir'
The downloaded packages are in
/private/tmp/RtmpIXX01o/downloaded_packages
Warning message:
installation of package 'deldir' had non-zero exit status in:
install.packages("deldir")
>
> require(deldir)
Loading required package: deldir
[1] TRUE
> search()
[1] ".GlobalEnv" "package:deldir" "package:methods"
"package:stats" "package:graphics"
[6] "package:grDevices" "package:utils" "package:datasets"
"Autoloads" "package:base"
> ls(2)
character(0)
>
At this point, if I go look in ~/Library/R, I see a folder named
deldir, with incomplete contents as I described yesterday.
Next, if I go to the GUI package installer and install the deldir
binary at the "System Level", it succeeds.
But, and I suppose this is no surprise, I now have a half-installed
private deldir, and a fully installed system deldir. require(deldir)
loads the private one in preference to the system one. The private
one has to be manually deleted outside of R. The lesson here is that
a user can get in trouble by mixing source and binary installations
of packages.
One more point. If I start R at the command line, using the
recommended alias in /usr/bin, then install.packages('deldir') fails
as in R.app, but it (1) goes for a system install instead of a
private one, and (2) cleans up after itself:
make: *** [deldir.so] Error 1
ERROR: compilation failed for package 'deldir'
** Removing
'/Library/Frameworks/R.framework/Versions/2.1.0/Resources/library/deldir'
** Restoring previous
'/Library/Frameworks/R.framework/Versions/2.1.0/Resources/library/deldir'
And just to be complete,
> version
_
platform powerpc-apple-darwin7.9.0
arch powerpc
os darwin7.9.0
system powerpc, darwin7.9.0
status
major 2
minor 1.0
year 2005
month 04
day 18
language R
>
More information about the R-SIG-Mac
mailing list