[R-pkg-devel] Setting up R-devel in Linux Mint 17.1 64-bit

Dirk Eddelbuettel edd at debian.org
Mon Jul 20 23:35:21 CEST 2015

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 
DYLIB_LDFLAGS = -shared -fopenmp# $(CFLAGS) $(CPICFLAGS)
## We want to ensure libR is picked up from $(R_HOME)/lib
	$(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.


http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org

More information about the R-package-devel mailing list