I suspect the main difficulty the OP is having is building R with shlib support.

Steve, can you build from source without the --enable-R-shlib flag on configure?

Kevin

On 05/23/2018 01:58 PM, Ista Zahn wrote:
On Tue, May 22, 2018 at 6:47 PM, Steve Gutreuter <sgutreu...@gmail.com> wrote:
I would love to hear from anyone who has successfully built 3.5.0 under
  Ubuntu 18.04 (Bionic Beaver).

This is the wrong list, see R-sig-debian. That said,

apt-get update
apt-get build-dep r-base
wget https://cran.r-project.org/src/base/R-3/R-3.5.0.tar.gz
tar -xvf R-3.5.0.tar.gz
cd R-3.5.0
./configure
make
./bin/R

works for me.

--Ista
  My attempts have failed, including:

export LDFLAGS="$LDFLAGS -fPIC"
export CXXFLAGS="$CXXFLAGS -fPIC"
export CFLAGS="$CFLAGS -fPIC"
./configure --enable-R-shlib --prefix=/usr/lib/R/3.5.0

#### Configure completes normally without errors or warnings

make

#### make fails, always with lines like:
/usr/bin/x86_64-linux-gnu-ld: ../appl/dtrsl.o: relocation R_X86_64_32
against `.rodata' can not be used when making a shared object;
recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: attrib.o: relocation R_X86_64_PC32
against symbol `R_NilValue' can not be used when making a shared
object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
Makefile:177: recipe for target 'libR.so' failed
make[3]: *** [libR.so] Error 1
make[3]: Leaving directory '/home/steve/src/R/R-3.5.0/src/main'
Makefile:135: recipe for target 'R' failed

How does one set the -fPIC flag?

I have never had trouble compiling under Mint, which is based on
Ubuntu.

Thanks!
Steve



--
Kevin E. Thorpe
Head of Biostatistics,  Applied Health Research Centre (AHRC)
Li Ka Shing Knowledge Institute of St. Michael's Hospital
Assistant Professor, Dalla Lana School of Public Health
University of Toronto
email: kevin.tho...@utoronto.ca  Tel: 416.864.5776  Fax: 416.864.3016

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to