Skip to content

Build R static

2 messages · Alex Bryant, Simon Urbanek

#
On May 20, 2010, at 8:50 AM, Alex Bryant wrote:

            
That depends heavily on the OS and tools used and has nothing to do with R itself. You'll need static versions of all libraries you depend on and compilers capable of using them (=and having static libs themselves). In addition, packages are shared libraries in R so all static libraries that can be potentially used need to be PIC-safe (which is normally not the case).

That said, your motivation doesn't seem to be relevant here, because you can simply ship dynamic libraries with R which is much easier and more efficient (since you won't be copying them over and over for each binary and package). The usual motivation for a purely static binary is to ship it as one file but since that's not possible with R (it needs packages etc.) you don't gain anything at all.

Cheers,
Simon