Re: [R] Build R-1.9.0 with static libraries ?

About this list Date view Thread view Subject view Author view Attachment view

From: Prof Brian Ripley (ripley@stats.ox.ac.uk)
Date: Wed 19 May 2004 - 21:40:31 EST


Message-id: <Pine.LNX.4.44.0405191238210.1246-100000@gannet.stats>

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@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

______________________________________________ R-help@stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:11 EST