[R-SIG-Mac] Installing packages from source for all installed sub-architectures

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Mar 6 07:22:01 CET 2012


On 06/03/2012 01:24, Simon Urbanek wrote:
> Dan,
>
> On Mar 5, 2012, at 7:09 PM, Dan Tenenbaum wrote:
>
>> Hello,
>>
>> Are there plans to modify install.packages() on Mac so that if
>> type="source", the package is installed for all installed
>> sub-architectures?
>>
>> This works for Windows.
>>
>> Currently,
>> install.packages("mypkg", type="source")
>> **may** do the right thing, depending on what type of native code the
>> package has, whether if has a configure script., etc, but there's no
>> guarantee.
>>
>
> The same is true for Windows - to my best knowledge the rules are
> the
same on all platforms -- Makefile or configure prevent a package from
being built for more than one architecture, because they may modify the
sources in-place and thus the package can only be built once. The only
difference I'm aware of is that some Windows packages use configure.win
for things other than configuration, so binary maintainers may choose to
ignore those but that is not the default AFAIK.

That's my understanding too -- a small list of such packages is already 
known to INSTALL.

>
> Cheers,
> Simon
>
>
>> I might add that even installing a binary is not guaranteed to give
>> you .so files for all sub-architectures. CRAN and Bioconductor create
>> multi-arch binaries, but other package distributors may not do this,
>> in fact, they likely won't, since the procedure for generating such
>> binaries is not part of R and is therefore not documented as such.

Eh?  The recommended approach, INSTALL --merge-multiarch, _is_ part of 
R.  Although I rarely use it on Macs, AFAIK it works equally well there 
as on Windows.  And install.packages() takes arguments to be passed to 
INSTALL via INSTALL_opts .

>> There are of course ways to work around this. But it would be nice not
>> to have to work around it, and it would be very nice if a single
>> command could install a package (and, importantly, all its
>> dependencies) from source for all available architectures.

We are not so far off that, but can only workaround _some_ of the 
strange things package maintainers do.  For example, all but 0.5% of 
CRAN packages which install at all install 'out of the box' on Windows: 
the exceptions need --multi-arch.  On a Mac the figure appears to be 1-2%.

My experience is that there is a _tiny_ small proportion of R users 
installing from source on systems with multiple architectures who care 
about more than one architecture.  (It is a long while since I used 
32-bit R on Windows, Mac or Linux except as an R developer to test 
things.) And I think most of those people are knowledgeable enough to 
write their own scripts to cover the exceptions.

-- 
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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-SIG-Mac mailing list