[Rcpp-devel] RInside under Windows
Dale, Thanks, but running as administrator doesn't seem to be the answer. There was hope in that it first asked if I really wanted to do that before it gave the missing R.dll message. Pat
On 14/02/2012 20:55, Smith, Dale wrote:
My experience is that any odd error you get with Windows 7 is definitely related to security. Right-click the exe in Explorer and select Run as Administrator. Try to start a Cygwin terminal as Administrator to do command line work (assuming you are using Cygwin). I have no choice but to run RStudio and R via Run as Administrator; they just won't work otherwise. I set up shortcuts to do this and pinned them to my toolbar. Ditto with Visual Studio. Thanks, Dale Smith, Ph.D. Senior Financial Quantitative Analyst Risk& Compliance Fiserv. 107 Technology Park Norcross, GA 30092 Office: 678-375-5315 Mobile: 678-982-6599 Mail: dale.smith at fiserv.com www.fiserv.com -----Original Message----- From: rcpp-devel-bounces at r-forge.wu-wien.ac.at [mailto:rcpp-devel-bounces at r-forge.wu-wien.ac.at] On Behalf Of Patrick Burns Sent: Tuesday, February 14, 2012 3:47 PM To: Dirk Eddelbuettel Cc: rcpp-devel at r-forge.wu-wien.ac.at Subject: Re: [Rcpp-devel] RInside under Windows On 14/02/2012 20:14, Dirk Eddelbuettel wrote:
On 14 February 2012 at 20:04, Patrick Burns wrote: | Obviously I don't *really* know what I'm doing, or even *sort of* | know what I'm doing. But that never stopped me before. | | Here is hopefully enough breadcrumbs to help someone, or even all of
| us. | | | I've reinstalled RInside so that I am starting with the original | Makefile.win | | *) There is an extraneous "n" on the first line (first character) | of Makefile.win -- 'make' | doesn't like that. I don't know for sure what your are talking about. A common fix would be to send a diff. Could you do that?
This is Windows, remember -- perhaps there is a way of doing a diff, I don't know it. But the start of Makefile.win that I see out of the box is: n## -*- mode: makefile; tab-width: 8; -*- ## ## Simple Makefile for Windows Note the bizarre first character.
| *) I need to comment out the command setting R_HOME and set it in | DOS instead. Works for me in the Makefile.win | *) The next problem is two instances each of: | | there is no package called [Rcpp, RInside] | | This is because .libPaths() is only finding the main library and not
| the one where the installed packages go. | | This is diagnosed by adding a line to Makefile.win: | | Rlibpaths := $(shell echo '.libPaths()' |
$(R_HOME)/bin/R $(R_ARCH)
| --vanilla --slave)
I would recommend using ~/.Rprofile which strikes me as easier.
| Adding a line to the checkR task:
|
| echo $(Rlibpaths)
|
| And then doing:
|
| make checkR -f Makefile.win
|
| This is the same in 32-bit and 64-bit.
|
| This problem can be remedied by setting the R_LIBS_USER environment
| variable. You can see what that is with the R command:
|
| Sys.getenv('R_LIBS_USER')
|
|
| *) Now there is some progress, but not much.
|
| It compiles:
| rinside_callbacks0
| rinside_module_sample0
| rinside_sample0
Can you run rinside_sample0.exe ?
| And gets an error on rinside_sample1:
|
| reopening rinside_sample1.exe: Permission denied
Huh?
Agreed. That is the only indication of it being upset. But I renamed that file to try to make it do it last. Running it again there was no error -- everything compiled. Compiled for 32-bit. There is not an x64 subdirectory to 'lib' (as there is with 'libs') so nothing compiles.
| However the three that did compile don't run. They all have the | error message: | | The program can't start because R.dll is missing from your computer.
| Try reinstalling the program to fix this problem. Could that be a Win7 security setting or something like it?
That's an interesting idea. Anyone have ideas about testing it? Pat
| This is using Rtools2.14 and R 2.14.1 with | RInside_0.2.6 Rcpp_0.9.9 I think I used the same combination with success. Dirk | Pat | | On 14/02/2012 17:53, Dirk Eddelbuettel wrote: |> |> Hi Pat, |> |> On 14 February 2012 at 17:43, Patrick Burns wrote: |> | Good point about the Rtools version. I started | with 2.13, |> but I get the same thing with 2.14. |> | |> | Here are the key changes that I made to Makefile.win: |> | |> | RCPPINCL := |> -IC:/Users/pat/Documents/R/win-library/2.14/Rcpp/include |> | RCPPLIBS := |> | |> C:/Users/pat/Documents/R/win-library/2.14/Rcpp/libs/i386/Rcpp.dll |> | |> | RINSIDEINCL := |> -IC:/Users/pat/Documents/R/win-library/2.14/RInside/include |> | RINSIDELIBS := |> | |> C:/Users/pat/Documents/R/win-library/2.14/RInside/libs/i386/libRIns |> ide.dll |> |> That's not quite right, is it? What do (quoting from |> examples/standard/Makefile.win) these do: |> |> ## include headers and libraries for RInside embedding classes |> RINSIDEINCL := $(shell echo 'RInside:::CxxFlags()' |
$(R_HOME)/bin/R $(R_ARCH) --vanilla --slave)
|> RINSIDELIBS := $(shell echo 'RInside:::LdFlags()' |
$(R_HOME)/bin/R $(R_ARCH) --vanilla --slave)
|> |> | I then do: |> | |> | make -f Makefile.win |> | |> | I seem to have failed in my attempt to | tell it where R lives |> -- I get a cygwin | warning about MS-DOS style path, but I | |> don't think that is really a problem. |> |> R_HOME must be defined. You can get it from R, or hardcode it. |> |> The single best start is to try |> |> cd examples/standard |> make -f Makefile.win |> |> which should create 10+ executable. And you can borrow freely from
|> that Makefile.win which should work. |> |> Lastly, the Cygwin thing is line noise which you can suppress by |> setting an env var appropriately. This comes from the newer
Rtools.
|> |> | It then attempts the g++ command, gives | the multiple |> definition statements, and: |> |> Linking is still wrong then. |> |> Dirk |> |> | | -- | Patrick Burns | patrick at burns-stat.com | http://www.burns-stat.com | http://www.portfolioprobe.com/blog | twitter: @portfolioprobe
-- Patrick Burns patrick at burns-stat.com http://www.burns-stat.com http://www.portfolioprobe.com/blog twitter: @portfolioprobe
_______________________________________________ Rcpp-devel mailing list Rcpp-devel at lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
Patrick Burns patrick at burns-stat.com http://www.burns-stat.com http://www.portfolioprobe.com/blog twitter: @portfolioprobe