[R] RSPerl

Duncan Temple Lang duncan at research.bell-labs.com
Thu Dec 18 14:00:05 CET 2003


Hi Andrea.

   When we run Perl from within R, any Perl module that has associated
C code (such as modperl) needs a special piece of bootstrapping code
to be used within this embedded case.  Now in your case, you might
only be calling R from within Perl, but neverthless, we put this
bootstrapping code in as one can call Perl from within the embedded R
because it is bidirectional.

  The modperl module is for running Perl embedded within the Apache
Web server.  So you don't need this for running R in Perl as a
stand-alone.  So we need to tell the RSPerl package not to include
bootstrapping code for modperl (and other modules that cause problems
in this way).

  To create this bootstrapping code for Perl modules with C code, the
installation script for RSPerl looks through all the Perl modules and
finds the ones that have C code (i.e. an associated shared library).
In this case, you need to tell the RSPerl installation explicitly
which modules to provide the boostrapping code.  The easiest
way for me to describe is the following.

  unzip and untar the RSPerl.tar.gz file

  cd RSPerl

  Run the command 
     perl -s modules.pl -modules
  to get a list of all the modules with C code.

  Take this list and set the environment variable
 
    PERL_MODULES

   to the subset of these module names that you actually need/want.
  In your case, just remove modperl.
  You might do someting like

    setenv PERL_MODULES "`perl -s modules.pl -modules | sed s/modperl//`"

   (if you are using the csh or tcsh shell. Use export for bash/sh.)


   You can eliminate any of the modules that cause problems using this
approach.

   Hope this helps.

    D.


Andrea wrote:
> If anyone can help it would be very much apreciated...
> 
> System RedHat 9
> 
> R installed as
> 
> 
> # ./configure --enable-R-shlib
> # make
> # make install
> 
> and R seems to work fine ...
> 
> Then I do 
> 
> # R INSTALL --clean --configure-args='--with-in-perl'
> RSPerl_0.5-7.tar.gz
> 
> # export R_HOME=/usr/local/lib/R
> 
> # cd /usr/local/lib/R/library/RSPerl/examples/
> 
> # perl -I /usr/local/lib/R/library/RSPerl/share/blib/arch -I
> /usr/local/lib/R/library/RSPerl/share/blib/lib ./test.pl
> 
> 
> and I get 
> 
> 
> 1..1
> Can't load '/usr/local/lib/R/library/RSPerl/share/blib/arch/auto/R/R.so'
> for module R:
> /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/ModPerl/Global/Global.so: undefined symbol: modperl_perl_global_avcv_call at /usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 229.
>  at ./test.pl line 11
> Compilation failed in require at ./test.pl line 11.
> BEGIN failed--compilation aborted at ./test.pl line 11.
> not ok 1
> 
> 
> and I get completelly lost ...
> 
> Thanks in advance for your help
> 
> 
> Andrea
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help

-- 
_______________________________________________________________

Duncan Temple Lang                duncan at research.bell-labs.com
Bell Labs, Lucent Technologies    office: (908)582-3217
700 Mountain Avenue, Room 2C-259  fax:    (908)582-3340
Murray Hill, NJ  07974-2070       
         http://cm.bell-labs.com/stat/duncan




More information about the R-help mailing list