[R-sig-Debian] Trouble building R 3.5.0 under Ubuntu 18.04 (Bionic Beaver)

Steve Gutreuter @gutreuter @ending from gm@il@com
Thu May 24 15:15:27 CEST 2018


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



More information about the R-SIG-Debian mailing list