[R] Build R-1.9.0 with static libraries ?
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed May 19 13:40:31 CEST 2004
On Wed, 19 May 2004, Mélanie PELEGRINI-ISSAC wrote:
Very important information clipped here.
Quoting me with attribution:
> > ## For example, one can set flags for profiling here.
> > ## MAIN_LDFLAGS=
> >
> > My guess is that you want -Bstatic.
> >
>
> Sorry to bother the mailing list again, but I'm not a specialist in
> compiling, so I'm quite lost...
>
> I tried
> MAIN_LDFLAGS=-Bstatic
> in config.site
>
> Incidentally, after running configure I get in Makeconf file the
> following flag
> MAIN_LDFLAGS = -Bstatic -Wl,--export-dynamic
>
> R compiles fine, however when I try to run it from another machine I get
> the following error
> myDirectory/R.bin: error while loading shared libraries: libg2c.so.0:
> cannot open shared object file: No such file or directory
>
> So I think it didn't solve my problem... and R still looks for shared
> objects. I tried
> MAIN_LDFLAGS=-Bstatic -static-libgcc
> in config.site
> but it didn't work either.
Note, it says
## The flags which are necessary for loading main program which will
## load DLLs at runtime. HP-UX and Linux-elf are examples of platforms
## which use this. These platforms are already taken care of by
## configure, and anything set here will be in addition unless MAIN_LD
## is given.
## For example, one can set flags for profiling here.
## MAIN_LDFLAGS=
so please set MAIN_LD as it suggests (and that's why I quoted the whole
thing for you to read!)
> How can I force R to use static versions of shared objects such as
> LIBS = -lreadline -ldl -lncurses -lm
> FLIBS = -lfrtbegin -lg2c -lm -lgcc_s
> ???
--
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-help
mailing list