[R] R-2.01 and RSPerl-0.6.2

Duncan Temple Lang duncan at wald.ucdavis.edu
Fri Mar 4 23:06:53 CET 2005


The omega-help mailing list  is more appropriate.
(See http://www.omegahat.org/mailman/listinfo)

One of the things that comes to mind is 
whether you built R via the --enable-R-shlib
entirely from scratch or did you
reconfigure and rebuild from an existing compiled
source.  If it is the latter, and library/stats/lib/stats.so 
was not linked against libR.so, then bad things happen.

Run the command

 ldd /tools/R/current/lib/R/library/stats/libs/stats.so

and see if libR.so is included in the output.
If not, rebuild R with

 make distclean
 ./configure --enable-R-shlib
 make

and try things then.

If this is not the problem, you can send mail directly to me
and I can try to help.

 D.

Zachariah Zachariah wrote:
> Hi,
> 
> I am somewhat new to R and RSPerl, but I think this particular problem
> has to do with RSPerl and so I am not sure if this is the right forum
> to ask for help. Nevertheless I am quite sure that many of you would
> have used RSPerl with R.
> 
> My hardware platform is a Sun/Solaris V440 server running Solaris 9
> operating system I use the gcc-3.4.0 compiler to compile R without any
> problems. My intention is to call R from Perl. So I use the
> --enable-R-shlib option as the document says. My perl version is at
> 5.8.6. I also compiled in RSPerl for dual functionality of calling
> perl from R and R from Perl. Everything seems to get installed
> smoothly as a well oiled machine till I run the tests in the examples
> directory.
> 
> #R CMD INSTALL -c  RSPerl_0.6-2.tar.gz
> #R CMD INSTALL -c --configure-args='with-in-perl' RSPerl_0.6-2.tar.gz
> #cd <install directory>/lib/R/library/RSPerl/examples
> # perl test.pl
> 1..1
> ok 1
> Error in dyn.load(x, as.logical(local), as.logical(now)) : 
>         unable to load shared library
> "/tools/R/current/lib/R/library/stats/libs/stats.so":
>   ld.so.1: perl: fatal: relocation error: file
> /tools/R/current/lib/R/library/stats/libs/stats.so: symbol MAIN__:
> referenced symbol not found
> Loaded RSPerl library
> objects $.PerlReference [.PerlArrayReference [.PerlHashReference
> [<-.PerlArrayReference [<-.PerlHashReference addConverter
> foreignReference getNumPerlConverters getPerlConverterDescriptions
> getPerlHandler getPerlScript names.PerlHashReference parseEval
> perlInitArgs referenceHandlerGenerator removeConverter setPerlHandler
> Testing search path
> installing function name search
>    1db114
> Search path: .GlobalEnv package:RSPerl package:methods
> package:graphics package:grDevices package:utils package:datasets
> Autoloads package:base
> Error in dyn.load(x, as.logical(local), as.logical(now)) : 
>         unable to load shared library
> "/tools/R/current/lib/R/library/stats/libs/stats.so":
>   ld.so.1: perl: fatal: relocation error: file
> /tools/R/current/lib/R/library/stats/libs/stats.so: symbol MAIN__:
> referenced symbol not found
> In addition: Warning message: 
> package stats in options("defaultPackages") was not found 
> Error in library(package = "stats") : package/namespace load failed for 'stats'
> Segmentation fault
> 
> I searched the documents for any clue and I believe that I have
> followed everything specified in the documentation. I had done a
> successful install of R-1.9.1 and RSPerl-0.5.7 on a similar hardware
> platform that I thought had given me some confidence but not so with
> this one. The documentation did not seem to suggest anything new for
> the latest versions of R and RSPerl Thanks in advance for any
> help/pointers/tips/etc. Here are my environment variables if that
> would help.
> 
> # env
> PWD=/tools/R/current/lib/R/library/RSPerl/examples
> GS_FONTPATH=/usr/lib/X11/fonts/Type1Adobe
> TZ=US/Pacific
> ORACLE_SID=prosrv
> TMPDIR=/usr/tmp
> MODULEPATH=/share/init/mod
> GS_LIB=/netopt/gs/6.52/lib/
> PAGER=less
> LOADEDMODULES=sysenv:X11/R6:gnu:sundry:news:perl/current:net:Xmisc:ncbi:gcg/10.3:metamail/current:netscape/current:motif/1.2.3p26:mail:transcript:cap/man:emacs/current:gs/current:acrobat:standard:nsr/current:oracle:R:oraclient/current
> CLASSPATH=/netopt/netscape/4.78/java/classes/java40.jar
> MANPATH=/tools/perl/current/man:/usr/local/man:/usr/man:/usr/java/man:/netopt/man:/netopt/gnu/man:/tools/X11/R6/man:/tools/gnu/man:/local/links/man:/tools/sundry/man:/tools/news/man:/tools/net/man:/tools/Xmisc/man:/tools/metamail/2.6/man:/netopt/netscape/4.78/man:/tools/motif/1.2.3p26/man:/tools/mail/man:/netopt/emacs/21.3/man:/netopt/gs/6.52/man:/tools/R/current/man
> SYS=sparc-sol
> XLOCALEDIR=/tools/X11/R6/lib/X11/locale
> MODULESHOME=/tools/Modules/2.2
> NNTPSERVER=nntp
> USER=root
> MACHTYPE=sparc
> CVS_SERVER=/tools/gnu/bin/cvs
> SSH2_SFTP_LOG_FACILITY=-1
> XFILESEARCHPATH=/share/init/%T/%N%S:/tools/X11/R6/lib/X11/%T/%N%C%S:/tools/X11/R6/lib/X11/%T/%N%S:/tools/Xmisc/lib/%T/%N%S:/tools/motif/1.2.3p26/lib/X11/%T/%N%C%S:/tools/motif/1.2.3p26/lib/X11/%T/%N%S
> LPDEST=NULL
> ORACLE_HOME=/share/ora-homes/9.2.0
> INFOPATH=/tools/gnu/info:/netopt/emacs/local-info:/netopt/emacs/21.3/info
> DISPLAY=sitar:11.0
> NPX_PLUGIN_PATH=/usr/j2se/jre/plugin/sparc/ns4
> LOGNAME=root
> SHLVL=2
> _LMFILES_=/share/init/mod/sysenv:/share/init/mod/X11/R6:/share/init/mod/gnu:/share/init/mod/sundry:/share/init/mod/news:/share/init/mod/perl/current:/share/init/mod/net:/share/init/mod/Xmisc:
> /share/init/mod/ncbi:/share/init/mod/gcg/10.3:/share/init/mod/metamail/current:/share/init/mod/netscape/current:/share/init/mod/motif/1.2.3p26:/share/init/mod/mail:/share/init/mod/transcript:
> /share/init/mod/cap/man:/share/init/mod/emacs/current:/share/init/mod/gs/current:/share/init/mod/acrobat:/share/init/mod/standard:/share/init/mod/nsr/current:/share/init/mod/oracle:/share/init/mod/R:
> /share/init/mod/oraclient/current
> ORAENV_ASK=NO
> SHELL=/bin/bash
> UIDPATH=/tools/Xmisc/lib/uid/%U:/tools/motif/1.2.3p26/lib/X11/uid/%U
> PRINTER=NULL
> HOSTTYPE=sun4
> MYWM=twm
> OSTYPE=solaris
> TERM=xterm
> RAD_LOG_FACILITY=LOG_LOCAL0
> _=/netopt/bin/sudo
> SUDO_COMMAND=/usr/bin/tcsh
> LD_LIBRARY_PATH=/share/guitar/ora-homes/9.2.0/lib32:/usr/local/lib:/tools/X11/R6/lib:/tools/gnu/lib:/tools/Xmisc/lib:/usr/lib:/lib:/usr/local/lib:/netopt/lib:/netopt/gnu/lib:/tools/R/current/lib/R/lib:
> /tools/R/current/lib/R/bin:/tools/R/current/lib/R/library/RSPerl/libs:/tools/R/current/lib/R/library/tools/libs:/tools/R/current/lib/R/library/stats/libs:/tools/R/current/lib/R/library/methods/libs:
> /tools/R/current/lib/R/library/grid/libs:/tools/R/current/lib/R/library/splines/libs:/tools/R/current/lib/R/library/tcltk/libs:/tools/R/current/lib/R/library/MASS/libs:/tools/R/current/lib/R/library/class/libs:
> /tools/R/current/lib/R/library/nnet/libs:/tools/R/current/lib/R/library/spatial/libs:/tools/R/current/lib/R/library/cluster/libs:/tools/R/current/lib/R/library/foreign/libs:/tools/R/current/lib/R/library/KernSmooth/libs:
> /tools/R/current/lib/R/library/lattice/libs:/tools/R/current/lib/R/library/nlme/libs:/tools/R/current/lib/R/library/mgcv/libs:/tools/R/current/lib/R/library/rpart/libs:/tools/R/current/lib/R/library/survival/libs:/tools/R/current/lib/R/library/RSPerl/libs
> MAKE=gmake
> PATH=/share/guitar/ora-homes/9.2.0/bin:/tools/perl/current/bin:/usr/bin:/usr/ucb/bin:/usr/ccs/bin:/usr/local/bin:/tools/gnu/bin:/tools/R/current/bin
> PERLLIB=/tools/R/current/lib/R/library/RSPerl/share/blib/arch:/tools/R/current/lib/R/library/RSPerl/share/blib/lib:/tools/R/current/lib/R/library/RSPerl/scripts
> R_HOME=/tools/R/current/lib/R
> LD_LIBRARY_PATH_64=/share/guitar/ora-homes/9.2.0/lib
> 
> --Zachariah 
> Systems Administrator
> Stanford University
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

-- 
Duncan Temple Lang                duncan at wald.ucdavis.edu
Department of Statistics          work:  (530) 752-4782
371 Kerr Hall                     fax:   (530) 752-7099
One Shields Ave.
University of California at Davis
Davis, CA 95616, USA




More information about the R-help mailing list