[R-pkg-devel] Setting up R-devel in Linux Mint 17.1 64-bit
MAURICIO ZAMBRANO BIGIARINI
mauricio.zambrano at ufrontera.cl
Mon Jul 20 23:56:04 CEST 2015
=====================================
"When the pupil is ready, the master arrives."
(Zen proverb)
=====================================
Linux user #454569 -- Linux Mint user
On 20 July 2015 at 18:35, Dirk Eddelbuettel <edd at debian.org> wrote:
>
> On 20 July 2015 at 18:05, MAURICIO ZAMBRANO BIGIARINI wrote:
> | Dear list,
> |
> | I'm trying to set up the development version of R (R-devel ) for
> | testing some packages before submitting them to CRAN. I'm using Linux
> | Mint 17.1 64-bit, which is an Ubuntu-based distro.
> |
> | I followed the advice of Dirk on
> | https://stat.ethz.ch/pipermail/r-sig-debian/2012-August/001935.html
> |
> |
> | Everything seems to run fine until .configure:
> |
> | R is now configured for x86_64-unknown-linux-gnu
> |
> | Source directory: .
> | Installation directory: /usr/local/lib/R-devel
> |
> | C compiler: ccache gcc -std=gnu99 -g -O2
> | Fortran 77 compiler: gfortran -g -O2
> |
> | C++ compiler: ccache g++ -g -O2
> | C++11 compiler: ccache g++ -std=c++11 -g -O2
> | Fortran 90/95 compiler: gfortran -g -O2
> | Obj-C compiler:
> |
> | Interfaces supported: X11, tcltk
> | External libraries: readline, BLAS(generic), LAPACK(generic), curl
> | Additional capabilities: PNG, JPEG, TIFF, NLS, cairo, ICU
> | Options enabled: shared R library, R profiling
> |
> | Capabilities skipped:
> | Options not enabled: shared BLAS, memory profiling
> |
> | Recommended packages: no
>
> Looks good but ...
> |
> |
> | However, when running make, I got an error saying:
> |
> | "/usr/bin/ld: ../appl/dchdc.o: relocation R_X86_64_32 against
> | `.rodata' can not be used when making a shared object; recompile with
> | -fPIC"
> |
> |
> | I would highly appreciate any advice on how to solve this issue (or
> | what should I recompile with -fPIC and how).
>
> ... naybe your R was built without shared library support? The binaries
> resulting from my configuration (ie the Debian or Ubuntu packages obtained
> either from the distro themselves or the CRAN mirrors) have 'pic' set:
>
> edd at max:~$ grep -i pic /etc/R/Makeconf
> CPICFLAGS = -fpic
> CXXPICFLAGS = -fpic
> CXX1XPICFLAGS = -fpic
> DYLIB_LDFLAGS = -shared -fopenmp# $(CFLAGS) $(CPICFLAGS)
> FCPICFLAGS = -fpic
> FPICFLAGS = -fpic
> SHLIB_LDFLAGS = -shared# $(CFLAGS) $(CPICFLAGS)
> ## We want to ensure libR is picked up from $(R_HOME)/lib
> ALL_CFLAGS = $(R_XTRA_CFLAGS) $(PKG_CFLAGS) $(CPICFLAGS) $(SHLIB_CFLAGS) $(CFLAGS)
> ALL_CXXFLAGS = $(R_XTRA_CXXFLAGS) $(PKG_CXXFLAGS) $(CXXPICFLAGS) $(SHLIB_CXXFLAGS) $(CXXFLAGS)
> ALL_OBJCFLAGS = $(PKG_OBJCFLAGS) $(CPICFLAGS) $(SHLIB_CFLAGS) $(OBJCFLAGS)
> ALL_OBJCXXFLAGS = $(PKG_OBJCXXFLAGS) $(CXXPICFLAGS) $(SHLIB_CXXFLAGS) $(OBJCXXFLAGS)
> ALL_FFLAGS = $(R_XTRA_FFLAGS) $(PKG_FFLAGS) $(FPICFLAGS) $(SHLIB_FFLAGS) $(FFLAGS)
> $(FC) $(PKG_FCFLAGS) $(FCPICFLAGS) $(FCFLAGS) -c $< -o $@
> $(FC) $(PKG_FCFLAGS) $(FCPICFLAGS) $(FCFLAGS) -c $< -o $@
> edd at max:~$
>
> Here /etc/R/Makefonf is just a convenient link to $(R_HOME)/etc/Makeconf.
>
> Dirk
>
Thank you very much Dirk, but I forgot to mention that this is my very
first time trying to set up R-devel.
In my ~/SVN/R-devel/trunk/Makeconf file I currently don't have the
first two lines you mentioned:
CPICFLAGS = -fpic
CXXPICFLAGS = -fpic
and instead of
SHLIB_LDFLAGS = -shared# $(CFLAGS) $(CPICFLAGS)
I have
DYLIB_LDFLAGS = -shared -fopenmp# $(DYLIBS_LTO)
how can I be sure that I I enabled the shared library support ?
Mauricio
More information about the R-package-devel
mailing list