Sean O'Keeffe
2011-Mar-02 15:46 UTC
[R-sig-Fedora] CentOS 5 install won't make with shared libs enabled
Hi, I've been trying to get a shared library version of the R package(version 2.12.1) installed on a CentOS 5 system. (It installs fine without but other packages demand shared libs - namely Rapache). I've tried this with yum but don't know of any flags to set to tell it to installl with shared libs enabled. I then tried a local R install as non-root with source packages: after downloading the latest tarball and unzipping: ./configure --prefix=/opt --enable-R-shlib make make[3]: Entering directory `/ifs/data/columbia/tm_lab/so2346/R-2.12.1/src/main' gcc -std=gnu99 -shared -L/usr/local/lib64 -o libR.so CConverters.o CommandLineArgs.o Rdynload.o Renviron.o RNG.o agrep.o apply.o arithmetic.o array.o attrib.o base.o bind.o builtin.o character.o coerce.o colors.o complex.o connections.o context.o cov.o cum.o dcf.o datetime.o debug.o deparse.o deriv.o devices.o dotcode.o dounzip.o dstruct.o duplicate.o engine.o envir.o errors.o eval.o format.o fourier.o gevents.o gram.o gram-ex.o gramLatex.o gramRd.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 model.o names.o objects.o optim.o optimize.o options.o par.o paste.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o qsort.o random.o raw.o registration.o relop.o rlocale.o saveload.o scan.o seq.o serialize.o size.o sort.o source.o split.o sprintf.o startup.o subassign.o subscript.o subset.o summary.o sysutils.o unique.o util.o version.o vfonts.o xxxpr.o ../unix/Rembedded.o ../unix/libunix.a ../appl/libappl.a ../nmath/libnmath.a ../extra/zlib/libz.a ../extra/bzip2/libbz2.a ../extra/pcre/libpcre.a ../extra/tre/libtre.a ../extra/xz/liblzma.a -L../../lib -lRblas -lgfortran -lm -lreadline -lncurses -ldl -lm /usr/bin/ld: CConverters.o: relocation R_X86_64_32S against `R_FunTab' can not be used when making a shared object; recompile with -fPIC CConverters.o: could not read symbols: Bad value collect2: ld returned 1 exit status make[3]: *** [libR.so] Error 1 make[3]: Leaving directory `/ifs/data/columbia/tm_lab/so2346/R-2.12.1/src/main' make[2]: *** [R] Error 2 make[2]: Leaving directory `/ifs/data/columbia/tm_lab/so2346/R-2.12.1/src/main' make[1]: *** [R] Error 1 make[1]: Leaving directory `/ifs/data/columbia/tm_lab/so2346/R-2.12.1/src' make: *** [R] Error 1 I then added the -fPIC to the CC line in Makeconf and did a new make but no joy: make[3]: Entering directory `/ifs/data/columbia/tm_lab/so2346/R-2.12.1/src/main' gcc -std=gnu99 -fPIC -shared -L/usr/local/lib64 -o libR.so CConverters.o CommandLineArgs.o Rdynload.o Renviron.o RNG.o agrep.o apply.o arithmetic.o array.o attrib.o base.o bind.o builtin.o character.o coerce.o colors.o complex.o connections.o context.o cov.o cum.o dcf.o datetime.o debug.o deparse.o deriv.o devices.o dotcode.o dounzip.o dstruct.o duplicate.o engine.o envir.o errors.o eval.o format.o fourier.o gevents.o gram.o gram-ex.o gramLatex.o gramRd.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 model.o names.o objects.o optim.o optimize.o options.o par.o paste.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o qsort.o random.o raw.o registration.o relop.o rlocale.o saveload.o scan.o seq.o serialize.o size.o sort.o source.o split.o sprintf.o startup.o subassign.o subscript.o subset.o summary.o sysutils.o unique.o util.o version.o vfonts.o xxxpr.o ../unix/Rembedded.o ../unix/libunix.a ../appl/libappl.a ../nmath/libnmath.a ../extra/zlib/libz.a ../extra/bzip2/libbz2.a ../extra/pcre/libpcre.a ../extra/tre/libtre.a ../extra/xz/liblzma.a -L../../lib -lRblas -lgfortran -lm -lreadline -lncurses -ldl -lm /usr/bin/ld: CConverters.o: relocation R_X86_64_32S against `R_FunTab' can not be used when making a shared object; recompile with -fPIC CConverters.o: could not read symbols: Bad value collect2: ld returned 1 exit status make[3]: *** [libR.so] Error 1 I've checked all the faq's and been googling this with no joy. I'd be grateful for any help on installing this dependency to get Rapache installed Thanks, Sean. [[alternative HTML version deleted]]
Tom Callaway
2011-Mar-02 15:51 UTC
[R-sig-Fedora] CentOS 5 install won't make with shared libs enabled
On 03/02/2011 10:46 AM, Sean O'Keeffe wrote:> Hi, > I've been trying to get a shared library version of the R package(version > 2.12.1) installed on a CentOS 5 system. (It installs fine without but other > packages demand shared libs - namely Rapache). > I've tried this with yum but don't know of any flags to set to tell it to > installl with shared libs enabled. I then tried a local R install as > non-root with source packages:The R package in EPEL should work fine on CentOS, and it is built with shared libs. If you have EPEL enabled, and run "yum install R", you'll get everything. ~tom =Fedora Project
Marc Schwartz
2011-Mar-02 16:14 UTC
[R-sig-Fedora] CentOS 5 install won't make with shared libs enabled
On Mar 2, 2011, at 9:46 AM, Sean O'Keeffe wrote:> Hi, > I've been trying to get a shared library version of the R package(version > 2.12.1) installed on a CentOS 5 system. (It installs fine without but other > packages demand shared libs - namely Rapache). > I've tried this with yum but don't know of any flags to set to tell it to > installl with shared libs enabled. I then tried a local R install as > non-root with source packages: > > after downloading the latest tarball and unzipping: > ./configure --prefix=/opt --enable-R-shlib > make > > make[3]: Entering directory > `/ifs/data/columbia/tm_lab/so2346/R-2.12.1/src/main' > gcc -std=gnu99 -shared -L/usr/local/lib64 -o libR.so CConverters.o > CommandLineArgs.o Rdynload.o Renviron.o RNG.o agrep.o apply.o arithmetic.o > array.o attrib.o base.o bind.o builtin.o character.o coerce.o colors.o > complex.o connections.o context.o cov.o cum.o dcf.o datetime.o debug.o > deparse.o deriv.o devices.o dotcode.o dounzip.o dstruct.o duplicate.o > engine.o envir.o errors.o eval.o format.o fourier.o gevents.o gram.o > gram-ex.o gramLatex.o gramRd.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 model.o names.o objects.o optim.o > optimize.o options.o par.o paste.o platform.o plot.o plot3d.o plotmath.o > print.o printarray.o printvector.o printutils.o qsort.o random.o raw.o > registration.o relop.o rlocale.o saveload.o scan.o seq.o serialize.o size.o > sort.o source.o split.o sprintf.o startup.o subassign.o subscript.o subset.o > summary.o sysutils.o unique.o util.o version.o vfonts.o xxxpr.o > ../unix/Rembedded.o ../unix/libunix.a ../appl/libappl.a ../nmath/libnmath.a > ../extra/zlib/libz.a ../extra/bzip2/libbz2.a ../extra/pcre/libpcre.a > ../extra/tre/libtre.a ../extra/xz/liblzma.a -L../../lib -lRblas -lgfortran > -lm -lreadline -lncurses -ldl -lm > /usr/bin/ld: CConverters.o: relocation R_X86_64_32S against `R_FunTab' can > not be used when making a shared object; recompile with -fPIC > CConverters.o: could not read symbols: Bad value > collect2: ld returned 1 exit status > make[3]: *** [libR.so] Error 1 > make[3]: Leaving directory > `/ifs/data/columbia/tm_lab/so2346/R-2.12.1/src/main' > make[2]: *** [R] Error 2 > make[2]: Leaving directory > `/ifs/data/columbia/tm_lab/so2346/R-2.12.1/src/main' > make[1]: *** [R] Error 1 > make[1]: Leaving directory `/ifs/data/columbia/tm_lab/so2346/R-2.12.1/src' > make: *** [R] Error 1 > > > I then added the -fPIC to the CC line in Makeconf and did a new make but no > joy: > > make[3]: Entering directory > `/ifs/data/columbia/tm_lab/so2346/R-2.12.1/src/main' > gcc -std=gnu99 -fPIC -shared -L/usr/local/lib64 -o libR.so CConverters.o > CommandLineArgs.o Rdynload.o Renviron.o RNG.o agrep.o apply.o arithmetic.o > array.o attrib.o base.o bind.o builtin.o character.o coerce.o colors.o > complex.o connections.o context.o cov.o cum.o dcf.o datetime.o debug.o > deparse.o deriv.o devices.o dotcode.o dounzip.o dstruct.o duplicate.o > engine.o envir.o errors.o eval.o format.o fourier.o gevents.o gram.o > gram-ex.o gramLatex.o gramRd.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 model.o names.o objects.o optim.o > optimize.o options.o par.o paste.o platform.o plot.o plot3d.o plotmath.o > print.o printarray.o printvector.o printutils.o qsort.o random.o raw.o > registration.o relop.o rlocale.o saveload.o scan.o seq.o serialize.o size.o > sort.o source.o split.o sprintf.o startup.o subassign.o subscript.o subset.o > summary.o sysutils.o unique.o util.o version.o vfonts.o xxxpr.o > ../unix/Rembedded.o ../unix/libunix.a ../appl/libappl.a ../nmath/libnmath.a > ../extra/zlib/libz.a ../extra/bzip2/libbz2.a ../extra/pcre/libpcre.a > ../extra/tre/libtre.a ../extra/xz/liblzma.a -L../../lib -lRblas -lgfortran > -lm -lreadline -lncurses -ldl -lm > /usr/bin/ld: CConverters.o: relocation R_X86_64_32S against `R_FunTab' can > not be used when making a shared object; recompile with -fPIC > CConverters.o: could not read symbols: Bad value > collect2: ld returned 1 exit status > make[3]: *** [libR.so] Error 1 > > I've checked all the faq's and been googling this with no joy. > I'd be grateful for any help on installing this dependency to get Rapache > installed > > Thanks, > Sean.Sean, Why not just use the RPMs provided by the EPEL: http://fedoraproject.org/wiki/EPEL Config information is available from the above link. R 2.12.1 is available: http://download.fedora.redhat.com/pub/epel/5/x86_64/repoview/R.html The R RPMs are built for shlibs. That will save you the hassle of building from source, unless you have other compelling requirements. HTH, Marc Schwartz
Paul Johnson
2011-Mar-04 00:13 UTC
[R-sig-Fedora] CentOS 5 install won't make with shared libs enabled
On Wed, Mar 2, 2011 at 9:46 AM, Sean O'Keeffe <so2346 at columbia.edu> wrote:> Hi, > I've been trying to get a shared library version of the R package(version > 2.12.1) installed on a CentOS 5 system. (It installs fine without but other > packages demand shared libs - namely Rapache). > I've tried this with yum but don't know of any flags to set to tell it to > installl with shared libs enabled. I then tried a local R install as > non-root with source packages: > > after downloading the latest tarball and unzipping: > ./configure --prefix=/opt --enable-R-shlib > make >Wow. I'm stunned that Rapache shows up as a requirement. I think the other guys are right that you should just use R from Epel, but if you want to be a do-it-yourselfer, I would suggest he following. DO NOT build R from source that way. DO get the SRPM file that is used to build RPMS. Then set your build directory in a file in your home directory (.rpmmacros as I recall), then install the SRPM file, then go read the SPEC file in the rpm tree. The SPEC file shows how the thing is built, and you can rebuild in the command line like $ rpmbuild -ba whatever.spec This will give you an RPM that is exactly matching your system, same as "configure .. make" but more easily managed. If you have trouble getting started, I think I can double-check the instructions. I know I've written them out before. Here's another point. The "default" configure statement for R's RPM is much more elaborate than you think. So trying it from scratch is probably a big mistake. If you look at the SPEC file, you will see what I mean. If you do succeed in building RPMS, it will be then easy for you to take the RPM for Rapache and rebuild that for your system. Or it will be VERY OBVIOUS in the R spec file what you need to do to get rid of the Rapache package requirement. It sounds to me like a very aggressive piece of packaging, there, since most R installations will never need it. Until you posted, I did not know that Rapache had been packaged in Fedora, while running a RedHat system, I built my own. It is a very simple build, actually, it is just an apache module and a apache config file. Next time I have spare time, i will see how their packaging differs from mine. Or you can check and tell me. The installable is http://pj.free.faculty.org/Centos/5/i386/kups/packages/rapache-1.1.13-1.i386.rpm Here's the SRPM, you could rebuild http://pj.free.faculty.org/Centos/5/i386/kups/SRPMS/rapache-1.1.13-1.src.rpm Good luck. I hope this will be an exciting chance for you to join the smart, clever group of RPM building linux users. Advice I got years ago: Never install anything with "make install" because it puts unaccountable damage all over your file system, and if you do that, set the prefix in the configure to be a unique, separate thing. Never manually install into /usr. And if something is worth building by hand, it is worth building in a package so you can remove it! -- Paul E. Johnson Professor, Political Science 1541 Lilac Lane, Room 504 University of Kansas