On Saturday 10 July 2010 23:24:55 Ken Moffat wrote:
> On 10 July 2010 22:38, lI <[email protected]> wrote:
> > I am trying to compile kdeedu-4.4.5 which uses R. The linker requires
> > shared libs with the 'lib' prefix. So all those in the $R_HOME/modules/
> > and $R_HOME/library/ directories need to be 'lib'-ed
> >
> > I symlinked the said libraries to ones with the 'lib' prefix'
> > running make on kdeedu-4.4.5 goes to ~79 prcent ther responded with a
> > barrage of failures like so:-
> >
> > #################################
> > /usr/local/R-2.11.1/lib64/R/library/Matrix/libs/libMatrix.so: undefined
> > reference to `Rf_isLogical'
> > /usr/local/R-2.11.1/lib64/R/library/methods/libs/libmethods.so: undefined
> > reference to `R_primitive_generic'
> > /usr/local/R-2.11.1/lib64/R/library/methods/libs/libmethods.so: undefined
> > reference to `R_DotsSymbol'
> > /usr/local/R-2.11.1/lib64/R/library/grid/libs/libgrid.so: undefined
> > reference to `Rf_defineVar'
>
> [ snipped - I think that was rather more of these error messages than
> we needed ]
>
> > ###########################
> > QUESTIONS:
> > A) can one just symlink the libs say for example cluster.so to
> > libcluster.so ? OR
> > B) does any on list know the SHLIB_LD SHLIB_LDFLAGS SHLIB_CXXLDFLAGS
> > SHLIB_FCD SHLIB_FCLDFLAGS settings for compiling R and do these
> > result in so libs with the lib prefix?
>
> For those two questions, I have no idea. However, a version of R
> is in fedora (e.g. F-13) http://cvs.fedoraproject.org/viewvc/rpms/R/
>
> A quick look at the spec file shows that it seems to depend on its own
> developemt package - probably for bootstrapping. A quick look
> suggests that they don't have any "this is just seriously weird" issues
> with it (compare e.g. older versions of 'boost'), so I think you should
> begin by looking at their specfile - they set R_LIBS_SITE which looks
> particularly relevant, and configure with --enable-R-shlib amongst other
> options.
>
> > C) are the 'undefined references' in the compiler spew above due to
> > failures to detect header files or sonmething else and if so what so?
>
> That one I can answer - they are linkage failures. Probably, a whole
> maze of other R libraries are not being found. Perhaps adding
> directories to ld.so.conf, or passing them in LIBRARY_PATH might
> help (but, kde4 uses cmake, so who knows?), but I think you need
> to rebuild R first - any time a package installs shared objects without
> the 'lib' prefix, it implies the install is defective.
>
> Alternatively, gentoo seem to fiddle with the build for libRmath.so -
> perhaps their ebuild will be easier to follow :
> http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-lang/R/R-2.11.1
> .ebuild?view=markup
>
> ĸen
>
Thanks once again for your help. I found out that the only shared-libs
are $R_HOME/lib{libR.so,libRblas.so,libRlapack.so). The files with the
.so extension in $R_HOME/library/various/subdirectories are not 'libraries'
after all. They are to quote
" not shared libraries - they are shared objects loaded by R dynamically."
I was using a cmake script to 'find' them as libraries. Once they are
omitted kdeedu-4.4.5 now compiles trouble free.
Incidentally I have a symlink of libacml.so (from amd) to libRblas.so (for
enhanced BLAS). I edited $R_HOME/etc/ldpaths with the line
"export LD_LIBRARY_PATH=path/to/acml.so"
and R fails to start. It only starts with the above pointing to $R_HOME/lib
(where lives the duff libRblas.so produced by compiling R.)
any ideas?
One slight problem however, I have a symlink to
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page