Skip to content

[Rcpp-devel] RInside under Windows

19 messages · pasparis at noos.fr, Patrick Burns, Smith, Dale (Norcross) +1 more

#
I'm trying to get the RInside examples to go
under Windows 7.  It is proving to be exceptionally
traumatic.

There are a few glitches that I've got past, but
now I'm getting:

multiple definition of `_imp__ZTUN4Rcpp14not_compatiblE'
multiple definition of `_nm__ZTUN4Rcpp14not_compatiblE'

(with some chance of transcription errors)

This is the same for both 32-bit and 64-bit.

Suggestions?

Pat
#
On 14 February 2012 at 11:08, Patrick Burns wrote:
| I'm trying to get the RInside examples to go
| under Windows 7.  It is proving to be exceptionally
| traumatic.

I am currently not near the Windows XP machine on which I made all the tests
asserting that yes, we're back on Windows. I heard from several users on 32
bit about their success.  I have yet to hear about failure on 64 bit -- but I
currently do not have easy access to one.

It did of course work on Uwe's win-builder, as well as CRAN's build machine.
 
| There are a few glitches that I've got past, but

It would help if you could detail what you did.

| now I'm getting:
| 
| multiple definition of `_imp__ZTUN4Rcpp14not_compatiblE'
| multiple definition of `_nm__ZTUN4Rcpp14not_compatiblE'
| 
| (with some chance of transcription errors)
| 
| This is the same for both 32-bit and 64-bit.
| 
| Suggestions?

Not really.  Which version of Rtools is that?  

Anything unusual on your box?  I used at least one regular XP box, and one
virtual XP instance hosted on my Linux box without any glitches.

Maybe other Windows7 users can pipe in here...

Dirk
#
Pascal,

I don't think trying to use .a files is going
to work on Windows.  That is one of the things
that I changed was to look for DLLs instead.

Dirk,

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/libRInside.dll

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.

It then attempts the g++ command, gives
the multiple definition statements, and:

ld returned 1 exit status

I don't suppose there is a way of doing
this so that output can be cut-and-pasted.

Pat
On 14/02/2012 14:10, pasparis at noos.fr 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/libRInside.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
#
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 need to comment out the command setting
R_HOME and set it in DOS instead.

*)  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)

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

And gets an error on rinside_sample1:

reopening rinside_sample1.exe: Permission denied

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.

This is using Rtools2.14 and R 2.14.1 with
RInside_0.2.6 Rcpp_0.9.9

Pat
On 14/02/2012 17:53, 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?
 
| *)  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?
 
| 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?
 
| 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/libRInside.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
#
On 14 February 2012 at 14:14, Dirk Eddelbuettel wrote:
| | *)  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.

Actually even easier may be to set R_LIBS_USER in the Makefile.win.  Let me
commit a comment-ed out stanza right now.

Dirk
#
On 14/02/2012 20:14, Dirk Eddelbuettel wrote:
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.
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.
That's an interesting idea.  Anyone have
ideas about testing it?

Pat

  
    
#
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:
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.
$(R_HOME)/bin/R $(R_ARCH)
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.
That's an interesting idea.  Anyone have ideas about testing it?

Pat
$(R_HOME)/bin/R $(R_ARCH) --vanilla --slave)
$(R_HOME)/bin/R $(R_ARCH) --vanilla --slave)
Rtools.
--
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
#
(resending with CC to list which I omitted a minute ago --Dirk)
On 14 February 2012 at 20:47, Patrick Burns wrote:
| 
|
| 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

This is R, remember, and these tools come with Rtools by Duncan Murdoch.

| 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.

Got it. Was still present here. Sorry about that, and thanks for catching it.

Next release will fix, now corrected in SVN.
 
| > | *)  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 ?

Does that run?

| > | 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.

Are you talking about RInside or Rcpp?  Did you install from source or via
the prebuilt CRAN binary?

Everything from CRAN should now be multiarch, 32 and 64 bit.

Dirk
 
| > | 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/libRInside.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
#
On 14/02/2012 20:59, Dirk Eddelbuettel wrote:
There is the missing R.dll problem.
Prebuilt from CRAN.  Rcpp is fine,
RInside/lib/x64 went AWOL.

Pat

  
    
#
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:

  
    
#
On 14 February 2012 at 21:05, Patrick Burns wrote:
| On 14/02/2012 20:59, Dirk Eddelbuettel wrote:
| >
| > (resending with CC to list which I omitted a minute ago --Dirk)
| >
| > On 14 February 2012 at 20:47, Patrick Burns wrote:
| > |
| > |
| > | 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
| >
| > This is R, remember, and these tools come with Rtools by Duncan Murdoch.
| >
| > | 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.
| >
| > Got it. Was still present here. Sorry about that, and thanks for catching it.
| >
| > Next release will fix, now corrected in SVN.
| >
| > |>  | *)  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 ?
| >
| > Does that run?
| 
| There is the missing R.dll problem.

That is "just" a PATH problem.  For now, copy this dll (and there will be
four or five more from R, and then possibly from Rcpp and RInside) into a
working (temp) directory and try.

Seeing "hello, world" is a good proof. The rest is setup issues, which on
Windows often descend into man-to-machine combat.

Dirk
 
| >
| > |>  | 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.
| >
| > Are you talking about RInside or Rcpp?  Did you install from source or via
| > the prebuilt CRAN binary?
| >
| > Everything from CRAN should now be multiarch, 32 and 64 bit.
| 
| Prebuilt from CRAN.  Rcpp is fine,
| RInside/lib/x64 went AWOL.
| 
| Pat
| 
| >
| > Dirk
| >
| > |>  | 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/libRInside.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
| >
| 
| -- 
| Patrick Burns
| patrick at burns-stat.com
| http://www.burns-stat.com
| http://www.portfolioprobe.com/blog
| twitter: @portfolioprobe
#
Dirk is once again correct.  The "missing R.dll"
is a PATH problem.

One way of solving it is to add the path to the
R DLLs to the end of PATH.  For instance adding:

C:\Program Files\R\R-2.14.1\bin\i386

Once I've arranged those DLLs to be visible, the
new problem is:

Fatal error: unable to open the base package

That seems like it might be a path problem as well
but I'm not seeing how to fix it.

Pat
On 14/02/2012 21:52, Dirk Eddelbuettel wrote:

  
    
#
On 15 February 2012 at 11:14, Patrick Burns wrote:
| Dirk is once again correct.  The "missing R.dll"
| is a PATH problem.
| 
| One way of solving it is to add the path to the
| R DLLs to the end of PATH.  For instance adding:
| 
| C:\Program Files\R\R-2.14.1\bin\i386
| 
| Once I've arranged those DLLs to be visible, the
| new problem is:
| 
| Fatal error: unable to open the base package

If I recall correctly I solved that by setting R_HOME as
your embedded R interpreter doesn't know its location...

Dirk
 
| That seems like it might be a path problem as well
| but I'm not seeing how to fix it.
| 
| Pat
|
| On 14/02/2012 21:52, Dirk Eddelbuettel wrote:
| >
| > On 14 February 2012 at 21:05, Patrick Burns wrote:
| > | On 14/02/2012 20:59, Dirk Eddelbuettel wrote:
| > |>
| > |>  (resending with CC to list which I omitted a minute ago --Dirk)
| > |>
| > |> On 14 February 2012 at 20:47, Patrick Burns wrote:
| > |>  |
| > |>  |
| > |> | 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
| > |>
| > |>  This is R, remember, and these tools come with Rtools by Duncan Murdoch.
| > |>
| > |>  | 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.
| > |>
| > |>  Got it. Was still present here. Sorry about that, and thanks for catching it.
| > |>
| > |>  Next release will fix, now corrected in SVN.
| > |>
| > |>  |>   | *)  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 ?
| > |>
| > |>  Does that run?
| > |
| > | There is the missing R.dll problem.
| >
| > That is "just" a PATH problem.  For now, copy this dll (and there will be
| > four or five more from R, and then possibly from Rcpp and RInside) into a
| > working (temp) directory and try.
| >
| > Seeing "hello, world" is a good proof. The rest is setup issues, which on
| > Windows often descend into man-to-machine combat.
| >
| > Dirk
| >
| > |>
| > |>  |>   | 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.
| > |>
| > |>  Are you talking about RInside or Rcpp?  Did you install from source or via
| > |>  the prebuilt CRAN binary?
| > |>
| > |>  Everything from CRAN should now be multiarch, 32 and 64 bit.
| > |
| > | Prebuilt from CRAN.  Rcpp is fine,
| > | RInside/lib/x64 went AWOL.
| > |
| > | Pat
| > |
| > |>
| > |>  Dirk
| > |>
| > |>  |>   | 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/libRInside.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
| > |>
| > |
| > | --
| > | 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
#
Success.

I'll tentatively offer this summary of the
important things to do.  There are three
environment variables to set:

* PATH needs to include the path to the R DLLs
for example the bin\i386 under your R_HOME.

* R_HOME needs to be set.

* R_LIBS_USER needs to be set.  (Trying to do it
in .Rprofile didn't work for me.)


There is still a puzzle in my mind.  Setting
R_LIBS_USER was necessary to get:
make -f Makefile.win
to work.  Fine.

But when it is not set and the exe files already
exist, there is strange (to me) behavior.  Double
clicking runs the code, but running it in a
command window does not.  Essentially R_LIBS_USER
is okay in the double click route but the environment
variable is necessary when run in a command window.

Pat
On 15/02/2012 14:03, Dirk Eddelbuettel wrote:

  
    
#
On 16 February 2012 at 11:00, Patrick Burns wrote:
| Success.

Nice.
 
| I'll tentatively offer this summary of the
| important things to do.  There are three
| environment variables to set:

I should document some of this. Maybe in Makefile.win?  Better ideas?
 
| * PATH needs to include the path to the R DLLs
| for example the bin\i386 under your R_HOME.

Right. And I think there is little we can do -- the PATH has to be there for
the dll files to be found so that the executable can run.
 
| * R_HOME needs to be set.

That one is odder. It definitely is found on Linux, and set.  From my build
directory: 

        "R_HOME","/usr/lib64/R",

Is R_HOME set inside your file RInsideEnvVars.h (which we generate during the
build process).   Maybe there is a bug there.
 
| * R_LIBS_USER needs to be set.  (Trying to do it
| in .Rprofile didn't work for me.)

Also not sure why .Rprofile doesn't work. 
 
| There is still a puzzle in my mind.  Setting
| R_LIBS_USER was necessary to get:
| make -f Makefile.win
| to work.  Fine.

Because we query Rcpp and RInside from R about their locations. So the
location must be known.
 
| But when it is not set and the exe files already
| exist, there is strange (to me) behavior.  Double
| clicking runs the code, but running it in a
| command window does not.  Essentially R_LIBS_USER
| is okay in the double click route but the environment
| variable is necessary when run in a command window.

Is that related to setting environment variables, and have it take effect
only for new shells / command windows?

Dirk
 
| Pat
|
| On 15/02/2012 14:03, Dirk Eddelbuettel wrote:
| >
| > On 15 February 2012 at 11:14, Patrick Burns wrote:
| > | Dirk is once again correct.  The "missing R.dll"
| > | is a PATH problem.
| > |
| > | One way of solving it is to add the path to the
| > | R DLLs to the end of PATH.  For instance adding:
| > |
| > | C:\Program Files\R\R-2.14.1\bin\i386
| > |
| > | Once I've arranged those DLLs to be visible, the
| > | new problem is:
| > |
| > | Fatal error: unable to open the base package
| >
| > If I recall correctly I solved that by setting R_HOME as
| > your embedded R interpreter doesn't know its location...
| >
| > Dirk
| >
| > | That seems like it might be a path problem as well
| > | but I'm not seeing how to fix it.
| > |
| > | Pat
| > |
| > | On 14/02/2012 21:52, Dirk Eddelbuettel wrote:
| > |>
| > |> On 14 February 2012 at 21:05, Patrick Burns wrote:
| > |> | On 14/02/2012 20:59, Dirk Eddelbuettel wrote:
| > |>  |>
| > |>  |>   (resending with CC to list which I omitted a minute ago --Dirk)
| > |>  |>
| > |> |> On 14 February 2012 at 20:47, Patrick Burns wrote:
| > |>  |>   |
| > |>  |>   |
| > |> |> | 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
| > |>  |>
| > |>  |>   This is R, remember, and these tools come with Rtools by Duncan Murdoch.
| > |>  |>
| > |>  |>   | 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.
| > |>  |>
| > |>  |>   Got it. Was still present here. Sorry about that, and thanks for catching it.
| > |>  |>
| > |>  |>   Next release will fix, now corrected in SVN.
| > |>  |>
| > |>  |>   |>    | *)  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 ?
| > |>  |>
| > |>  |>   Does that run?
| > |>  |
| > |>  | There is the missing R.dll problem.
| > |>
| > |>  That is "just" a PATH problem.  For now, copy this dll (and there will be
| > |>  four or five more from R, and then possibly from Rcpp and RInside) into a
| > |>  working (temp) directory and try.
| > |>
| > |>  Seeing "hello, world" is a good proof. The rest is setup issues, which on
| > |>  Windows often descend into man-to-machine combat.
| > |>
| > |>  Dirk
| > |>
| > |>  |>
| > |>  |>   |>    | 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.
| > |>  |>
| > |>  |>   Are you talking about RInside or Rcpp?  Did you install from source or via
| > |>  |>   the prebuilt CRAN binary?
| > |>  |>
| > |>  |>   Everything from CRAN should now be multiarch, 32 and 64 bit.
| > |>  |
| > |>  | Prebuilt from CRAN.  Rcpp is fine,
| > |>  | RInside/lib/x64 went AWOL.
| > |>  |
| > |>  | Pat
| > |>  |
| > |>  |>
| > |>  |>   Dirk
| > |>  |>
| > |>  |>   |>    | 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/libRInside.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
| > |>  |>
| > |>  |
| > |>  | --
| > |>  | 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
| >
| 
| -- 
| Patrick Burns
| patrick at burns-stat.com
| http://www.burns-stat.com
| http://www.portfolioprobe.com/blog
| twitter: @portfolioprobe
#
On 16/02/2012 13:38, Dirk Eddelbuettel wrote:
Yes, and I don't see that as being burdensome.
What I have there is:

	"R_HOME","d:/Rcompile/recent/R-214~1.1",

and

	"R_LIBS_USER","C:/Users/CRAN/Documents/R/win-library/2.14",

That R_HOME is certainly not going
to work on my machine.  R_LIBS_USER
would be right for me if my name were
CRAN.
Far be it from me to screw anything up, but
perhaps others will have different results
anyway.
I think the explanation is that I made a
wrong assumption.  I was so happy to have
it not crash that my definition of success
was probably a little weak.  Doing the double
click means that the window disappears before
I can read it.  So instead of having real
output it probably says Rcpp not found.

That is, I think things are fine -- the mystery
was inside my head rather than outside it.

Pat