From simon.urbanek at r-project.org  Thu May 20 18:50:19 2010
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Thu, 20 May 2010 12:50:19 -0400
Subject: [Rd] Build R static
In-Reply-To: <41A047C9B0CF8D4CBB0C8BA991086CCB0E43F58F14@exchange07.i-review.com>
References: <41A047C9B0CF8D4CBB0C8BA991086CCB0E43F58F14@exchange07.i-review.com>
Message-ID: <FEA3109E-EF4D-4DDD-BAD2-2F739D11E613@r-project.org>


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

> Does anyone know if it's possible to create a static build of R?
> 

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



> Thanks,
> 
> From: Alex Bryant
> Sent: Monday, May 10, 2010 2:50 PM
> To: 'r-devel at r-project.org'
> Subject: Build R static
> 
> Hi, I am having trouble building R static on Solaris 5.10.  I have a requirement to run R within a specific user account on Solaris 5.10 and I do not have access to compilers and or shared libraries on the target machine.  I thought I could build R static ( I've build it locally on Solaris with shared libraries) and just ftp the build to the target Solaris box.  Can any help with what ./configure & Make flags need to be set for this, assuming it is possible?
> 
> Here is what my currently built ./bin/exec/R executable is using.
> 
> $ ldd R
>        libRblas.so =>   (file not found)
>        libg2c.so.0 =>   /usr/local/lib/libg2c.so.0
>        libm.so.2 =>     /usr/lib/libm.so.2
>        libreadline.so.6 =>      /usr/local/lib/libreadline.so.6
>        libcurses.so.1 =>        /usr/lib/libcurses.so.1
>        libnsl.so.1 =>   /usr/lib/libnsl.so.1
>        libsocket.so.1 =>        /usr/lib/libsocket.so.1
>        libdl.so.1 =>    /usr/lib/libdl.so.1
>        libiconv.so.2 =>         /usr/local/lib/libiconv.so.2
>        libicuuc.so.3 =>         /usr/lib/libicuuc.so.3
>        libicui18n.so.3 =>       /usr/lib/libicui18n.so.3
>        libc.so.1 =>     /usr/lib/libc.so.1
>        libgcc_s.so.1 =>         /usr/local/lib/libgcc_s.so.1
>        libmp.so.2 =>    /usr/lib/libmp.so.2
>        libmd5.so.1 =>   /usr/lib/libmd5.so.1
>        libscf.so.1 =>   /usr/lib/libscf.so.1
>        libicudata.so.3 =>       /usr/lib/libicudata.so.3
>        libpthread.so.1 =>       /usr/lib/libpthread.so.1
>        libCrun.so.1 =>  /usr/lib/libCrun.so.1
>        libdoor.so.1 =>  /usr/lib/libdoor.so.1
>        libuutil.so.1 =>         /usr/lib/libuutil.so.1
>        /platform/SUNW,Sun-Fire-280R/lib/libc_psr.so.1
>        /platform/SUNW,Sun-Fire-280R/lib/libmd5_psr.so.1
> 
> Thanks for your help,
> Alex
> 
> //************************
> // Alex Bryant
> // Software Developer
> // Integrated Clinical Systems, Inc.
> // 908-996-7208
> 
> 
> ________________________________
> Confidentiality Note: This e-mail, and any attachment to...{{dropped:13}}
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 
> 



[Rd] Build R static
Simon Urbanek