From jarioksa at sun3.oulu.fi  Wed May  4 08:30:13 2005
From: jarioksa at sun3.oulu.fi (jarioksa@sun3.oulu.fi)
Date: Wed May  4 08:30:32 2005
Subject: [Rd] MacOS X: update.packages(type="mac.binary") fails (PR#7834)
Message-ID: <20050504063013.BDADAA1FA@slim.kubism.ku.dk>

Dear Mr Moderator, please let me through. I want to reply to my own
thread. I once subscribed to this list, but then my subscription was not
accepted.

Now to the business:

The final failure came from missing .install.macbinary() function. I
grepped R-patched sourcesand the only instance of .install.macbinary()
was the call to the function in R-
patched/src/library/utils/R/packages2.R (stupid automatic linefeed in
mail composer: just parse it). There was no definition of the function,
so I don't know from where should that function be loaded. I looked at
the  R-patched/src/library/utils/R/aqua/GUI.R today (it was the only
file in that directory), and it had a function install.binaries() (but
no .install.macbinary()). So it might be that .install.macbinary()
function was supposed to call this function, and there is a naming
conflict.

My intention was to look at editing this piece today so that I would
change the call of .install.macbinary() into call of install.binaries,
but the sanguine(*) R in MacOS X refuses to start in GUI mode today with
uninformative error message ("The application R has unexpectedly
quit."). So it seems not be the only problem in the MacOS X build of R
at CRAN. Starting from bash prompt in Terminal.app fails as well with
error ".onLoad failed in 'loadNamespace' for 'tcltk'". After starting X,
R starts even from Terminal.app, but still fails when clicking the icon.

Anyway, I hope this helps.

(*) you may replace this with a synonymous Saxon adjective (English
word, Germanic/Norse origin).

On Tue, 2005-05-03 at 16:14 +0100, Prof Brian Ripley wrote:
> Binary installs are AFAIK only supported in the GUI, where the default is
> as documented.  So .install.macbinary() is not loaded except in the GUI.
> 
> The reason is that those binaries are tied to that particular build of R,
> and will not work with a general build on MacOS X.
> 
> I would expect this to work from the command-line in the GUI console, and
> had believed it had been tested there.
> 
> 
> On Tue, 3 May 2005 jari.oksanen@oulu.fi wrote:
> 
> > Full_Name: Jari Oksanen
> > Version: R 2.1.0
> > OS: MacOS 10.3.9
> > Submission from: (NULL) (130.231.102.145)
> >
> >
> > For various reasons (which need not be expanded here) I have tried to update my
> > long neglected R in MacOS X using handy command line tool update.packages()
> > using readily available binaries of contributed packages at CRAN. However, this
> > fails with message saying that packages xxxx_*_tar.gz is not found at the server
> > (HTTP error 404). Obviously, the package name is expanded wrongly as the binary
> > packages for MacOS X have type *.tgz. However, this seems not be the problem,
> > but there are two other problems:
> >
> > 1. update.packages does not transfer the value of 'type' to the next function
> > install.packages, but install.packages uses the value of getOption("pkgType")
> > which seems to be "source" in CRAN binary of MacOS X (contrary to documentation
> > at ?options).
> >
> > 2. If this is corrected, or first set options(pkgType="mac.binary"), the update
> > fails for missing function .install.macbinary().
> >
> > The first problem is easy to correct:
> >
> > --- update.packages.R   2005-05-03 17:13:36.000000000 +0300
> > +++ jarioksa.update.packages.R  2005-05-03 17:13:58.000000000 +0300
> > @@ -59,5 +59,5 @@
> >          install.packages(update[, "Package"], instlib, contriburl =
> > contriburl,
> >              method = method, available = available, destdir = destdir,
> > -            installWithVers = installWithVers, type)
> > +            installWithVers = installWithVers, type = type)
> >      }
> >  }
> >
> >
> > For the second, problem, I don't know what to do. grepping
> > R-patched_2005-05-03.tar.gz source found only one instance of
> > .install.macbinary(): the failed call in
> > R-patched/src/library/utils/R/packages2.R. I couldn't find the definition of the
> > function.
> >
> > Do I really have to use GUI? Uh.
> >
> > cheers, jari oksanen
> >
> > ______________________________________________
> > R-devel@stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
> >
> >
> 
-- 
Jari Oksanen -- Dept Biology, Univ Oulu, 90014 Oulu, Finland
Ph. +358 8 5531526, cell +358 40 5136529, fax +358 8 5531061
email jari.oksanen@oulu.fi, homepage http://cc.oulu.fi/~jarioksa/


[Rd] MacOS X: update.packages(type="mac.binary") fails (PR#7834)
jarioksa@sun3.oulu.fi