[R] Trouble building R 3.5.0 under Ubuntu 18.04
|@t@z@hn @end|ng |rom gm@||@com
Thu May 24 00:38:46 CEST 2018
On Wed, May 23, 2018 at 2:27 PM, Kevin E. Thorpe
<kevin.thorpe using utoronto.ca> wrote:
> I suspect the main difficulty the OP is having is building R with shlib
apt-get build-dep r-base
tar -xvf R-3.5.0.tar.gz
also works fine here. FWIW, I'm starting with the ubuntu:latest docker
image and going from there.
> Steve, can you build from source without the --enable-R-shlib flag on
> On 05/23/2018 01:58 PM, Ista Zahn wrote:
>> On Tue, May 22, 2018 at 6:47 PM, Steve Gutreuter <sgutreuter using gmail.com>
>>> 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
>> works for me.
>> 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 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: *** [libR.so] Error 1
>>> make: 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
> 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.thorpe using utoronto.ca Tel: 416.864.5776 Fax: 416.864.3016
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help