Steve Gutreuter
2018-May-24 13:15 UTC
[R-sig-Debian] Trouble building R 3.5.0 under Ubuntu 18.04 (Bionic Beaver)
All of my attempts to build R 3.5.0 from sources under Ubuntu 18.04 have failed, and I cannot figure out what I am doing wrong. I have tried may things, 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: gcc -Wl,--export-dynamic -fopenmp -fPIC -o R.bin Rmain.o CommandLineArgs.o Rdynload.o Renviron.o RNG.o agrep.o altrep.o apply.o arithmetic.o array.o attrib.o bind.o builtin.o character.o coerce.o colors.o complex.o connections.o context.o cum.o dcf.o datetime.o debug.o deparse.o devices.o dotcode.o dounzip.o dstruct.o duplicate.o edit.o engine.o envir.o errors.o eval.o format.o gevents.o gram.o gram- ex.o graphics.o grep.o identical.o inlined.o inspect.o internet.o iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o match.o memory.o names.o objects.o options.o paste.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o qsort.o radixsort.o random.o raw.o registration.o relop.o rlocale.o saveload.o scan.o seq.o serialize.o sort.o source.o split.o sprintf.o startup.o subassign.o subscript.o subset.o summary.o sysutils.o times.o unique.o util.o version.o g_alab_her.o g_cntrlify.o g_fontdb.o g_her_glyph.o xxxpr.o `ls ../unix/*.o ../appl/*.o ../nmath/*.o` ../extra/tre/libtre.a -L"../../lib" -lRblas -lgfortran -lm -lquadmath -lreadline -lpcre -llzma -lbz2 -lz -lrt -ldl -lm -licuuc -licui18n /usr/bin/x86_64-linux-gnu-ld: ../appl/dchdc.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/x86_64-linux-gnu-ld: ../appl/dpbfa.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/x86_64-linux-gnu-ld: ../appl/dpbsl.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/x86_64-linux-gnu-ld: ../appl/dpoco.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/x86_64-linux-gnu-ld: ../appl/dpodi.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/x86_64-linux-gnu-ld: ../appl/dpofa.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/x86_64-linux-gnu-ld: ../appl/dposl.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/x86_64-linux-gnu-ld: ../appl/dqrdc2.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/x86_64-linux-gnu-ld: ../appl/dqrdc.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/x86_64-linux-gnu-ld: ../appl/dqrls.o: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/x86_64-linux-gnu-ld: ../appl/dqrsl.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/x86_64-linux-gnu-ld: ../appl/dqrutl.o: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/x86_64-linux-gnu-ld: ../appl/dsvdc.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/x86_64-linux-gnu-ld: ../appl/dtrco.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/x86_64-linux-gnu-ld: ../appl/dtrsl.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/x86_64-linux-gnu-ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status Makefile:145: recipe for target 'R.bin' failed make[3]: *** [R.bin] Error 1 make[3]: Leaving directory '/home/steve/src/R/R-3.5.0/src/main' Makefile:137: recipe for target 'R' failed make[2]: *** [R] Error 2 make[2]: Leaving directory '/home/steve/src/R/R-3.5.0/src/main' Makefile:28: recipe for target 'R' failed make[1]: *** [R] Error 1 make[1]: Leaving directory '/home/steve/src/R/R-3.5.0/src' Makefile:60: recipe for target 'R' failed The same occurs with or without --enable-R-shlib My interpretation is that -fPIC is not being seen by the compilers, but the call to gcc clearly includes it. I would greatly appreciate any advice on how to get this build to succeed. Best, Steve
Dirk Eddelbuettel
2018-May-24 16:22 UTC
[R-sig-Debian] Trouble building R 3.5.0 under Ubuntu 18.04 (Bionic Beaver)
On 24 May 2018 at 09:15, Steve Gutreuter wrote: | All of my attempts to build R 3.5.0 from sources under Ubuntu 18.04 | have failed, and I cannot figure out what I am doing wrong. I have Ubuntu builds https://launchpad.net/~marutter/+archive/ubuntu/rrutter3.5 with sources if you want to know more. Based on my Debian builds which you can peruse at https://salsa.debian.org/edd/r-base That said, R 3.5.0 is _not_ compatible with R 3.4.* and before so if you install these binaries expect _all_ old R packages, whether from r-cran-* or locally installed, to croak. Which is why R 3.5.0 is not yet mirrored at CRAN -- we're just not there yet. | tried may things, including : | | export LDFLAGS="$LDFLAGS -fPIC" | export CXXFLAGS="$CXXFLAGS -fPIC" | export CFLAGS="$CFLAGS -fPIC" | ./configure --enable-R-shlib --prefix=/usr/lib/R/3.5.0 I am not sure where you got those settings from. That is (AICR) not what it is in the R Installation + Administration manual which you should consult if you insist on doing it locally. I have a fairly strongly held conviction that the available binaries are actually better for you (we make many informed choices for you and add several bells as well as a few whistles) but you are free to ignore it. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org