[R] R Compile From Source Issue RHEL 6.5

Barros, Chris cbarros at hbs.edu
Tue Oct 4 20:27:07 CEST 2016


Hi-

I’m compiling R from source and running into an issue when enabling --enable-R-shlib. I get the following below. I did try and add “-fPIC" to the bzip2 makefile with no luck.

/usr/bin/ld: /usr/local/apps/R/3.3.1/library/lib/libbz2.a(bzlib.o): relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC

/usr/local/apps/R/3.3.1/library/lib/libbz2.a: could not read symbols: Bad value

collect2: ld returned 1 exit status




apps/R/3.3.1/library/include/  -c g_cntrlify.c -o g_cntrlify.o

gcc -std=gnu99 -I../../src/extra  -I. -I../../src/include -I../../src/include  -I/usr/local/include -I../../src/nmath -DHAVE_CONFIG_H   -fopenmp -fpic  -I/usr/local/apps/R/3.3.1/library/include/ -I/usr/local/apps/R/3.3.1/library/include/  -c g_fontdb.c -o g_fontdb.o

gcc -std=gnu99 -I../../src/extra  -I. -I../../src/include -I../../src/include  -I/usr/local/include -I../../src/nmath -DHAVE_CONFIG_H   -fopenmp -fpic  -I/usr/local/apps/R/3.3.1/library/include/ -I/usr/local/apps/R/3.3.1/library/include/  -c g_her_glyph.c -o g_her_glyph.o

gfortran  -fopenmp -fpic  -g -O2  -c xxxpr.f -o xxxpr.o

gcc -std=gnu99 -shared -fopenmp -L/usr/local/apps/R/3.3.1/library/lib  -o libR.so CommandLineArgs.o Rdynload.o Renviron.o RNG.o agrep.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   -lreadline  -lpcre -llzma -lbz2 -lz -lrt -ldl -lm

/usr/bin/ld: /usr/local/apps/R/3.3.1/library/lib/libbz2.a(bzlib.o): relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC

/usr/local/apps/R/3.3.1/library/lib/libbz2.a: could not read symbols: Bad value

collect2: ld returned 1 exit status

make[3]: *** [libR.so] Error 1

make[3]: Leaving directory `/usr/local/apps/R/3.3.1/R-3.3.1-source/src/main'

make[2]: *** [R] Error 2

make[2]: Leaving directory `/usr/local/apps/R/3.3.1/R-3.3.1-source/src/main'

make[1]: *** [R] Error 1

make[1]: Leaving directory `/usr/local/apps/R/3.3.1/R-3.3.1-source/src'

make: *** [R] Error 1

Any help would be appreciated.

Christopher Barros | Sr. Systems Engineer| Information Technology Group | Harvard Business School| 617.496.5180<tel:617.496.5180>| cbarros at hbs.edu<mailto:cbarros at hbs.edu>


	[[alternative HTML version deleted]]



More information about the R-help mailing list