From c@@rd|@g@bor @end|ng |rom gm@||@com  Fri Mar  8 14:57:50 2019
From: c@@rd|@g@bor @end|ng |rom gm@||@com (=?UTF-8?B?R8OhYm9yIENzw6FyZGk=?=)
Date: Fri, 8 Mar 2019 13:57:50 +0000
Subject: [Rd] package installation needs the file utility on Unix
In-Reply-To: <e8cf95d1-1393-7199-7222-533f22eb6baa@gmail.com>
References: <CABtg=Kneq7Uh6_wyzj9OPTgLPpCYJDqjsawCabzgOkc3x89-OA@mail.gmail.com>
 <e8cf95d1-1393-7199-7222-533f22eb6baa@gmail.com>
Message-ID: <CABtg=K=zjQ4ha2nzNS1iv_uGubYYPEKNyasracwmk+jYeGhbMA@mail.gmail.com>

Thanks! Good point about the compiler toolchain.....on Alpine Linux,
which tends to be small, gcc can be less than 100MB, so still might
matter a bit....

Gabor

On Fri, Mar 8, 2019 at 1:44 PM Tomas Kalibera <tomas.kalibera at gmail.com> wrote:
>
> Well, this only applies to source installs of packages that have some
> files with the special extension, so on systems where a compiler
> toolchain needs to be installed, so the image cannot be really tiny,
> anyway. But ok, I've made stage install use "file" only when it is
> available. When it isn't and some file with extension sl, so, dylib or
> dll in the package installation is not in fact a shared object, one will
> get a number of error messages from the respective tools, but the
> installation passes. Currently on Linux this is the case of RcppParallel
> and FastRWeb.
>
> Tomas
>
> On 3/7/19 11:57 PM, G?bor Cs?rdi wrote:
> > The new staged package installation shells out to the 'file' utility
> > on Unix systems:
> > https://github.com/wch/r-source/blob/31ee14c620eb1b939acd322f3b5617f998aab8e8/src/library/tools/R/install.R#L578
> >
> > Although 'file' is usually present on most Unix systems, it might be
> > missing from small Docker containers, where the aim is to make the
> > container as small possible. The magic file of 'file' is about 5MB, so
> > that is significant in this case.
> >
> > R uses 'file' to decide if a .so, .dll, etc. file is indeed a shared
> > library, and (as I understand) if it is, it then goes on to try to fix
> > the hardcoded installation path in it, using an os specific tool.
> >
> > As the second part needs to handle errors anyway, I wonder if it would
> > make sense to skip the 'file' call completely, after all it is quite
> > unlikely that a .dll or .so, etc. file is _not_ a shared library, and
> > even if it is not, the errors will be caught later.
> >
> > Thanks, Gabor
> >
> > ______________________________________________
> > R-devel at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
>
>



[Rd] package installation needs the file utility on Unix
=?UTF-8?B?R8OhYm9yIENzw6FyZGk=?=