[Rd] (PR#11161) Incorrect @INC: Rcmd SHLIB error under Windows

ripley at stats.ox.ac.uk ripley at stats.ox.ac.uk
Mon Apr 14 09:20:17 CEST 2008


The bug is yours: you are using Cygwin Perl, not a Windows Perl.

This is specifically warned about in the manual:

   @strong{Beware}: you do need a @emph{Windows} port and not the Cygwin
   one.  Users of 64-bit Windows can use a Win64 Perl (such as that from
   ActiveState) if they prefer.

You can't expect to use tools from a different operating system (Cygwin is 
effectively a guest OS) with different conventions.

You also missed

   @emph{This section contains a lot of prescriptive comments.  They are
   here as a result of bitter experience.  Please do not report problems
   to R-help unless you have followed all the prescriptions.}

Do we need to say 'do not report problems to R-help, let alone as bugs 
...'?



On Sun, 13 Apr 2008, wolpert at stat.duke.edu wrote:

> Hi, R team.
>
> I'm trying to build a dll from a c program to be invoked within R using
> the .C() functionality.
>
> Everything works like a charm on my Linux (Centos 5) (also 2.6.2) machines---
> but under windows (Vista Ultimate) upon running (in either the windows 'Cmd'
> command window or a Bash window) the command
>
> Rcmd SHLIB myfun.c
>
> I receive the error:
>
> Can't locate R/Utils.pm in
> @INC (@INC contains: c \PROGRA~1\R\R-26~1.2\share\perl;
> /usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8
> /usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8
> /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin
> /usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) at
> c:\PROGRA~1\R\R-26~1.2/bin/SHLIB line 22.
> BEGIN failed--compilation aborted at c:\PROGRA~1\R\R-26~1.2/bin/SHLIB line
> 22.
>
> -------------- -------------- -------------- -------------- --------------
>
> Notice the first entry in @INC is incorrect---  the item
>
>   c \PROGRA~1\R\R-26~1.2\share\perl;

That is two entries, not one.

> SHOULD be
>
>   c:\PROGRA~1\R\R-26~1.2\share\perl;
>
> but a space appears where the colon should be.
>
> The neeeded file 'R/Utils.pm' is in fact located where it should be,
> below 'c:\PROGRA~1\R\R-26~1.2\share\perl', but perl can't find it because
> INC is set incorrectly.
>
> Any suggestions?  Where IS 'INC' set?  Cheers,                -R
>
> ----------------------------------------------------------------------
> Prof. Robert L. Wolpert : <wolpert at stat.Duke.edu>  : +1-919-684-3275
> Duke Univ. Dept. of Statistical Science  :  211c Old Chem, Box 90251
> & Nicholas School of the Environment     :   www.stat.Duke.edu/~rlw/
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list