[Rcpp-devel] Wierd compilation error

2014-01-29 Thread Alessandro Mammana
Hi all,
I was experimenting with templates and Rcpp and trying to compile this code:


// [[Rcpp::export]]
static void readVector(VectorINTSXP v){
traits::storage_typeINTSXP::type i = v[0];
Rcout  i  std::endl;
}

I got this error:

scratchpad.cpp: In function 'SEXPREC* sourceCpp_3062_readVector(SEXP)':
scratchpad.cpp:337:21: error: variable or field '__result' declared void
scratchpad.cpp:338:9: error: '__result' was not declared in this scope
make: *** [scratchpad.o] Error 1

Also, the line numbers don't make any sense, because the file
scratchpad.cpp is only 250 lines long...

Do you know what could be wrong?

Thanks in advance!
Ale

-- 
Alessandro Mammana, PhD Student
Max Planck Institute for Molecular Genetics
Ihnestraße 63-73
D-14195 Berlin, Germany
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


Re: [Rcpp-devel] Wierd compilation error

2014-01-29 Thread Romain François
The attributes parser does not know how to handle the static keyword. Works for 
me without it. 
You get the line number of the generated file. Use verbose = TRUE to have a 
better clue at what is wrong. 

Romain

Le 29 janv. 2014 à 12:24, Alessandro Mammana mamm...@molgen.mpg.de a écrit :

 Hi all,
 I was experimenting with templates and Rcpp and trying to compile this code:
 
 
 // [[Rcpp::export]]
 static void readVector(VectorINTSXP v){
traits::storage_typeINTSXP::type i = v[0];
Rcout  i  std::endl;
 }
 
 I got this error:
 
 scratchpad.cpp: In function 'SEXPREC* sourceCpp_3062_readVector(SEXP)':
 scratchpad.cpp:337:21: error: variable or field '__result' declared void
 scratchpad.cpp:338:9: error: '__result' was not declared in this scope
 make: *** [scratchpad.o] Error 1
 
 Also, the line numbers don't make any sense, because the file
 scratchpad.cpp is only 250 lines long...
 
 Do you know what could be wrong?
 
 Thanks in advance!
 Ale
 
 -- 
 Alessandro Mammana, PhD Student
 Max Planck Institute for Molecular Genetics
 Ihnestraße 63-73
 D-14195 Berlin, Germany
 ___
 Rcpp-devel mailing list
 Rcpp-devel@lists.r-forge.r-project.org
 https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


Re: [Rcpp-devel] Rcpp and required steps before next release

2014-01-29 Thread Dirk Eddelbuettel

On 28 January 2014 at 22:10, Dan Tenenbaum wrote:
| Thanks. I was actually wondering something slightly different: for the ones 
that need modification, will they still work with the current Rcpp after being 
modified, or are the changes not backwards-compatible? I will investigate and I 
guess I will find out.

Yes of course. 

That is the point of the patches we prepared for CRAN: allow things to work
with current CRAN Rcpp 0.10.6, _and_ allow transition to new (to be released)
one 0.11.0.

We are not trying to intentionally break one or the other, or force things.

But without the suggested changes, Rcpp 0.11.0 will NOT get onto CRAN as it
will break a few packages.

Hope this clarifies.

Dirk

-- 
Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


[Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Jamie Olson
Hi all,
I'm a relative beginner in c/c++ and I'm trying to use c/c++ libraries
in an R package.  I need it to work in Windows, though, and I'm
struggling to get things working.

Environment:
R 3,0,2
Rtools 3.0
cygwin
Native CMake 2.8
cygwin 2.8

The cygwin CMake is convinced that the gcc installed by Rtools doesn't
work, because it's passing cygwin paths in the generated Unix
Makefiles.  The gcc fails the testCCompiler.c check with an error
gcc.exe: fatal error: no input files.  If I try to actually compile
the file manually, it works as long as I use either relative or native
windows paths.

and

The native CMake refuses to use the Rtools gcc with MinGW Makefiles


I have some questions:

1) What would I have to do to be able to use the cygwin mingw compiler
instead of the Rtools version?

The 
documentation[http://cran.r-project.org/doc/manuals/R-admin.html#The-MinGW_002dw64-toolchain]
states:
Users developing packages with Rcpp need to ensure that they use a
version built with exactly the same toolchain as their package: the
recommendation is to build Rcpp from its sources yourself.

Do I simply need to install Rcpp from source using my target compiler?
 Will that effect my ability to use the binary package on other
systems(with CRAN Rcpp)?

2) The RInside package contains several cmake examples.  The windows
examples seem to imply cygwin, but I am unable to run them as
indicated.  I get the same gcc error: no input files.


Thanks for any help you can offer,
--Jamie


Jamie Olson
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Dirk Eddelbuettel

Hi Jamie,

On 29 January 2014 at 10:39, Jamie Olson wrote:
| Hi all,
| I'm a relative beginner in c/c++ and I'm trying to use c/c++ libraries
| in an R package.  I need it to work in Windows, though, and I'm
| struggling to get things working.
| 
| Environment:
| R 3,0,2
| Rtools 3.0
| cygwin
  ^^

Not a good idea, in general, as R is not supported on Cygwin. 

Use Rtools. 

Use something like MSys which gives you bash shell and terminal on top of
MinGW.  But do make sure Rtools comes first in your path.

| Native CMake 2.8
| cygwin 2.8
| 
| The cygwin CMake is convinced that the gcc installed by Rtools doesn't
| work, because it's passing cygwin paths in the generated Unix
| Makefiles.  The gcc fails the testCCompiler.c check with an error
| gcc.exe: fatal error: no input files.  If I try to actually compile
| the file manually, it works as long as I use either relative or native
| windows paths.
| 
| and
| 
| The native CMake refuses to use the Rtools gcc with MinGW Makefiles

CMake should work, outside Cygwin. Folks like Peter (who may chime in) have
used CMake with Rcpp/RInside.
 
| I have some questions:
| 
| 1) What would I have to do to be able to use the cygwin mingw compiler
| instead of the Rtools version?

Port R to Cygwin. Many have tried. Nobody has really succeeded. In short: Don't.
 
| The 
documentation[http://cran.r-project.org/doc/manuals/R-admin.html#The-MinGW_002dw64-toolchain]
| states:
| Users developing packages with Rcpp need to ensure that they use a
| version built with exactly the same toolchain as their package: the
| recommendation is to build Rcpp from its sources yourself.
| 
| Do I simply need to install Rcpp from source using my target compiler?
|  Will that effect my ability to use the binary package on other
| systems(with CRAN Rcpp)?
| 
| 2) The RInside package contains several cmake examples.  The windows
| examples seem to imply cygwin, but I am unable to run them as
| indicated.  I get the same gcc error: no input files.

Yes they do, thanks to Peter. But what makes you think it implies Cygwin?
I'd be happy to adjust / clarify documentation as needed if you can give me a 
pointer.

Thanks,  Dirk
 
| 
| Thanks for any help you can offer,
| --Jamie
| 
| 
| Jamie Olson
| ___
| Rcpp-devel mailing list
| Rcpp-devel@lists.r-forge.r-project.org
| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

-- 
Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Jamie Olson
Thanks Dirk, I'll take a stab with MSys.  Just wondering, though, why
then are the Rtools commands based on cygwin instead of MSys?

I thought that the RInside examples were to be built using Cygwin
because they use the Unix Makefiles generator.  I hadn't yet seen
anything to indicate that was possible on windows without cygwin.
From the CMake 
wiki[http://www.cmake.org/Wiki/CMake_Generator_Specific_Information#Makefile_generators]:

This generator generates Makefiles for make under Unix and also for
cygwin (i.e. with Unix paths)


Do Unix Makefiles work on MSys, too, or should I use MinGW Makefiles?


Thanks,
--Jamie
Jamie Olson


On Wed, Jan 29, 2014 at 10:56 AM, Dirk Eddelbuettel e...@debian.org wrote:

 Hi Jamie,

 On 29 January 2014 at 10:39, Jamie Olson wrote:
 | Hi all,
 | I'm a relative beginner in c/c++ and I'm trying to use c/c++ libraries
 | in an R package.  I need it to work in Windows, though, and I'm
 | struggling to get things working.
 |
 | Environment:
 | R 3,0,2
 | Rtools 3.0
 | cygwin
   ^^

 Not a good idea, in general, as R is not supported on Cygwin.

 Use Rtools.

 Use something like MSys which gives you bash shell and terminal on top of
 MinGW.  But do make sure Rtools comes first in your path.

 | Native CMake 2.8
 | cygwin 2.8
 |
 | The cygwin CMake is convinced that the gcc installed by Rtools doesn't
 | work, because it's passing cygwin paths in the generated Unix
 | Makefiles.  The gcc fails the testCCompiler.c check with an error
 | gcc.exe: fatal error: no input files.  If I try to actually compile
 | the file manually, it works as long as I use either relative or native
 | windows paths.
 |
 | and
 |
 | The native CMake refuses to use the Rtools gcc with MinGW Makefiles

 CMake should work, outside Cygwin. Folks like Peter (who may chime in) have
 used CMake with Rcpp/RInside.

 | I have some questions:
 |
 | 1) What would I have to do to be able to use the cygwin mingw compiler
 | instead of the Rtools version?

 Port R to Cygwin. Many have tried. Nobody has really succeeded. In short: 
 Don't.

 | The 
 documentation[http://cran.r-project.org/doc/manuals/R-admin.html#The-MinGW_002dw64-toolchain]
 | states:
 | Users developing packages with Rcpp need to ensure that they use a
 | version built with exactly the same toolchain as their package: the
 | recommendation is to build Rcpp from its sources yourself.
 |
 | Do I simply need to install Rcpp from source using my target compiler?
 |  Will that effect my ability to use the binary package on other
 | systems(with CRAN Rcpp)?
 |
 | 2) The RInside package contains several cmake examples.  The windows
 | examples seem to imply cygwin, but I am unable to run them as
 | indicated.  I get the same gcc error: no input files.

 Yes they do, thanks to Peter. But what makes you think it implies Cygwin?
 I'd be happy to adjust / clarify documentation as needed if you can give me a 
 pointer.

 Thanks,  Dirk

 |
 | Thanks for any help you can offer,
 | --Jamie
 |
 |
 | Jamie Olson
 | ___
 | Rcpp-devel mailing list
 | Rcpp-devel@lists.r-forge.r-project.org
 | https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

 --
 Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Dirk Eddelbuettel

On 29 January 2014 at 11:05, Jamie Olson wrote:
| Thanks Dirk, I'll take a stab with MSys.  Just wondering, though, why
| then are the Rtools commands based on cygwin instead of MSys?
| 
| I thought that the RInside examples were to be built using Cygwin
| because they use the Unix Makefiles generator.  I hadn't yet seen
| anything to indicate that was possible on windows without cygwin.
| From the CMake 
wiki[http://www.cmake.org/Wiki/CMake_Generator_Specific_Information#Makefile_generators]:
| 
| This generator generates Makefiles for make under Unix and also for
| cygwin (i.e. with Unix paths)
| 
| 
| Do Unix Makefiles work on MSys, too, or should I use MinGW Makefiles?

Ok, let me speak to the Makefiles shipped with RInside: there is src/Makefile
for Linux and OS X, and there is src/Makefile.win for the other OS.  

Ditto in each of the six inst/examples/* subdirectories. That is what is
shipped and supported -- using make and your g++/clang++/... compiler on
Linux or OS X, and using make (built for Windows) and your g++ from Rtools.

In short, no 'Unix Makefiles' generator anywhere. Maybe this comes from
contributed CMake examples.  But it seems that this is between you and CMake,
and the CMake examples, why useful to those using RIinside with IDEs
deploying CMake, are not the documented use case.

Maybe get the basic stuff working first.  Say 'make -f Makefile.win' in one
of the examples directoies. Take it from there. 

Hope this helps,  Dirk

-- 
Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Jamie Olson
Three more things:

1) Is the WIN.readme.txt in examples/eigen/cmake incorrect, then?

2)  The Rtools documentation specifies that the Rtools paths should
come BEFORE cygwin paths.  Is there a similar rule for MSys?

3) Should I continue to just used the MinGW installed with Rtools or
should I/can I use a fresh install of MinGW?


Thanks,
--Jamie

Jamie Olson


On Wed, Jan 29, 2014 at 11:19 AM, Dirk Eddelbuettel e...@debian.org wrote:

 On 29 January 2014 at 11:05, Jamie Olson wrote:
 | Thanks Dirk, I'll take a stab with MSys.  Just wondering, though, why
 | then are the Rtools commands based on cygwin instead of MSys?
 |
 | I thought that the RInside examples were to be built using Cygwin
 | because they use the Unix Makefiles generator.  I hadn't yet seen
 | anything to indicate that was possible on windows without cygwin.
 | From the CMake 
 wiki[http://www.cmake.org/Wiki/CMake_Generator_Specific_Information#Makefile_generators]:
 |
 | This generator generates Makefiles for make under Unix and also for
 | cygwin (i.e. with Unix paths)
 |
 |
 | Do Unix Makefiles work on MSys, too, or should I use MinGW Makefiles?

 Ok, let me speak to the Makefiles shipped with RInside: there is src/Makefile
 for Linux and OS X, and there is src/Makefile.win for the other OS.

 Ditto in each of the six inst/examples/* subdirectories. That is what is
 shipped and supported -- using make and your g++/clang++/... compiler on
 Linux or OS X, and using make (built for Windows) and your g++ from Rtools.

 In short, no 'Unix Makefiles' generator anywhere. Maybe this comes from
 contributed CMake examples.  But it seems that this is between you and CMake,
 and the CMake examples, why useful to those using RIinside with IDEs
 deploying CMake, are not the documented use case.

 Maybe get the basic stuff working first.  Say 'make -f Makefile.win' in one
 of the examples directoies. Take it from there.

 Hope this helps,  Dirk

 --
 Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Dirk Eddelbuettel

On 29 January 2014 at 11:42, Jamie Olson wrote:
| Three more things:
| 
| 1) Is the WIN.readme.txt in examples/eigen/cmake incorrect, then?

What part?  

Setting the CYGWIN env var is to just shut a noisy warning from Rtools
off. It does not suggest you should use Cygwin.

The rest seems correct to me.
 
| 2)  The Rtools documentation specifies that the Rtools paths should
| come BEFORE cygwin paths.  Is there a similar rule for MSys?

MSys is not needed, it is just for you convenience. But yes, I place its part
before Cygwin too.
 
| 3) Should I continue to just used the MinGW installed with Rtools or
| should I/can I use a fresh install of MinGW?

As it stated repeatedly in several places, use the same compiler that R was
built on for Windows to build your add-ons such as Rcpp or RInside code.

If you know what you're doing you can swap other compilers.  One guys
apparently happily plugged in a newer MinGW:
http://stackoverflow.com/questions/21355022/how-to-use-rcpp-with-tdm-gcc-4-8-1/
I would not recommend that you start there.  

Keep it simple. Follow the documentation. Things tend to work if you do.
Once you know the ropes, do whatever :)

Dirk

-- 
Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Jamie Olson
Thanks!

The WIN.readme.txt instructs you to run

cmake -G Unix Makefiles ..

It seems that the only cmake on windows that supports Unix Makefiles
is the cygwin version, and from what you've said it sounds like that
can't be used with the native MinGW required for Rcpp.

--Jamie


Jamie Olson


On Wed, Jan 29, 2014 at 12:08 PM, Dirk Eddelbuettel e...@debian.org wrote:

 On 29 January 2014 at 11:42, Jamie Olson wrote:
 | Three more things:
 |
 | 1) Is the WIN.readme.txt in examples/eigen/cmake incorrect, then?

 What part?

 Setting the CYGWIN env var is to just shut a noisy warning from Rtools
 off. It does not suggest you should use Cygwin.

 The rest seems correct to me.

 | 2)  The Rtools documentation specifies that the Rtools paths should
 | come BEFORE cygwin paths.  Is there a similar rule for MSys?

 MSys is not needed, it is just for you convenience. But yes, I place its part
 before Cygwin too.

 | 3) Should I continue to just used the MinGW installed with Rtools or
 | should I/can I use a fresh install of MinGW?

 As it stated repeatedly in several places, use the same compiler that R was
 built on for Windows to build your add-ons such as Rcpp or RInside code.

 If you know what you're doing you can swap other compilers.  One guys
 apparently happily plugged in a newer MinGW:
 http://stackoverflow.com/questions/21355022/how-to-use-rcpp-with-tdm-gcc-4-8-1/
 I would not recommend that you start there.

 Keep it simple. Follow the documentation. Things tend to work if you do.
 Once you know the ropes, do whatever :)

 Dirk

 --
 Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Dirk Eddelbuettel

On 29 January 2014 at 13:03, Jamie Olson wrote:
| Thanks!
| 
| The WIN.readme.txt instructs you to run
| 
| cmake -G Unix Makefiles ..
| 
| It seems that the only cmake on windows that supports Unix Makefiles
| is the cygwin version, and from what you've said it sounds like that
| can't be used with the native MinGW required for Rcpp.

Oh. Now I see. 

Well, you may have to talk to Peter who wrote the README.

Dirk

-- 
Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Thell Fowler
On Wed, Jan 29, 2014 at 9:39 AM, Jamie Olson jamie.f.ol...@gmail.comwrote:

 Hi all,
 I'm a relative beginner in c/c++ and I'm trying to use c/c++ libraries
 in an R package.  I need it to work in Windows, though, and I'm
 struggling to get things working.

 --- 8---


It might help to state what c/c++ libraries you're trying to get up and
running.   There is some documentation in RTools (IIRC) on setting up an
RTOOLS_LOCAL encironment that was pretty straight forward.  I had success
building the libraries for GMP, MPFR, and such using mingw-64 then placing
the resulting files in an RToolsLocal directory.  If you go that route you
should be able to use cmake to build and then install into your LOCAL path.

Or, are you trying to have this cmake be part of a package that you are
creating?


The native CMake refuses to use the Rtools gcc with MinGW Makefiles


This doesn't surprise me at all, as the RTools toolchain requires that the
environment is setup, which it is when calling _from_ R.  You'd have to
figure out how to do that manually if you want to use that g++ from else
where (say msys).  It can be done, but as you mention...

---8---

 The documentation[
 http://cran.r-project.org/doc/manuals/R-admin.html#The-MinGW_002dw64-toolchain
 ]
 states:
 Users developing packages with Rcpp need to ensure that they use a
 version built with exactly the same toolchain as their package: the
 recommendation is to build Rcpp from its sources yourself.

 Do I simply need to install Rcpp from source using my target compiler?
  Will that effect my ability to use the binary package on other
 systems(with CRAN Rcpp)?


You _can_ install Rcpp from source on windows using a recent msys
environment with a recent g++ ( I did last December ).  But there be
dragons down that road!  You have to make sure that you get all of the
settings correct and all of that jazz, which is a major pain; and then you
are still going to have problems unless you can figure out the proper
procedure for getting the unwinding info correct, and the cross boundary
communication between libraries correct or you will end up freezing R with
every error your code produces.  I would've kept with a g++ 4.8.2 or clang
3.4 if it wasn't for the fact that I couldn't get any graceful exception
handling.

I know I make it sound bad.  That is on purpose!  You said you are a
relative beginner...  I'm someone who likes to 'just dive in'; and I can
tell you that I dove in right where you are standing and you're gonna your
head if you do it that way.


---8---

 Thanks for any help you can offer,
 --Jamie


 Jamie Olson
 ___
 Rcpp-devel mailing list
 Rcpp-devel@lists.r-forge.r-project.org
 https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel




-- 
Sincerely,
Thell
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Jamie Olson
I'm trying to build the Avro-C
library[http://avro.apache.org/docs/1.7.5/api/c/index.html].  There is
a README for building in
windows[http://svn.apache.org/repos/asf/avro/trunk/lang/c/README.maintaining_win32.txt]
but it only has instructions for Visual Studio.  I've recently been
wondering if that was intentional, since now cmake-generated MSYS
Makefiles are giving errors.

Are you suggesting that I build the library with MinGW(in
cygwin/linux?) and then just copy it to link to when building the
package with Rcpp?
Jamie Olson


On Wed, Jan 29, 2014 at 2:07 PM, Thell Fowler tbfowl...@gmail.com wrote:



 On Wed, Jan 29, 2014 at 9:39 AM, Jamie Olson jamie.f.ol...@gmail.com
 wrote:

 Hi all,
 I'm a relative beginner in c/c++ and I'm trying to use c/c++ libraries
 in an R package.  I need it to work in Windows, though, and I'm
 struggling to get things working.

 --- 8---


 It might help to state what c/c++ libraries you're trying to get up and
 running.   There is some documentation in RTools (IIRC) on setting up an
 RTOOLS_LOCAL encironment that was pretty straight forward.  I had success
 building the libraries for GMP, MPFR, and such using mingw-64 then placing
 the resulting files in an RToolsLocal directory.  If you go that route you
 should be able to use cmake to build and then install into your LOCAL path.

 Or, are you trying to have this cmake be part of a package that you are
 creating?


 The native CMake refuses to use the Rtools gcc with MinGW Makefiles


 This doesn't surprise me at all, as the RTools toolchain requires that the
 environment is setup, which it is when calling _from_ R.  You'd have to
 figure out how to do that manually if you want to use that g++ from else
 where (say msys).  It can be done, but as you mention...

 ---8---


 The
 documentation[http://cran.r-project.org/doc/manuals/R-admin.html#The-MinGW_002dw64-toolchain]
 states:
 Users developing packages with Rcpp need to ensure that they use a
 version built with exactly the same toolchain as their package: the
 recommendation is to build Rcpp from its sources yourself.

 Do I simply need to install Rcpp from source using my target compiler?
  Will that effect my ability to use the binary package on other
 systems(with CRAN Rcpp)?


 You _can_ install Rcpp from source on windows using a recent msys
 environment with a recent g++ ( I did last December ).  But there be dragons
 down that road!  You have to make sure that you get all of the settings
 correct and all of that jazz, which is a major pain; and then you are still
 going to have problems unless you can figure out the proper procedure for
 getting the unwinding info correct, and the cross boundary communication
 between libraries correct or you will end up freezing R with every error
 your code produces.  I would've kept with a g++ 4.8.2 or clang 3.4 if it
 wasn't for the fact that I couldn't get any graceful exception handling.

 I know I make it sound bad.  That is on purpose!  You said you are a
 relative beginner...  I'm someone who likes to 'just dive in'; and I can
 tell you that I dove in right where you are standing and you're gonna your
 head if you do it that way.


 ---8---


 Thanks for any help you can offer,
 --Jamie


 Jamie Olson

 ___
 Rcpp-devel mailing list
 Rcpp-devel@lists.r-forge.r-project.org
 https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel




 --
 Sincerely,
 Thell
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Dirk Eddelbuettel

On 29 January 2014 at 15:07, Jamie Olson wrote:
| I'm trying to build the Avro-C
| library[http://avro.apache.org/docs/1.7.5/api/c/index.html].  There is
| a README for building in
| 
windows[http://svn.apache.org/repos/asf/avro/trunk/lang/c/README.maintaining_win32.txt]
| but it only has instructions for Visual Studio.  I've recently been
| wondering if that was intentional, since now cmake-generated MSYS
| Makefiles are giving errors.
| 
| Are you suggesting that I build the library with MinGW(in
| cygwin/linux?) and then just copy it to link to when building the
| package with Rcpp?

In a nutshell, yes.  

If you want to / need to package Avro as a library it may be trickier. At a
first pass try to build a static library, then link your Rcpp package to that. 

Dirk

-- 
Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


Re: [Rcpp-devel] Rcpp and required steps before next release

2014-01-29 Thread Dirk Eddelbuettel

On 29 January 2014 at 12:06, Dan Tenenbaum wrote:
| Yes, thanks. I took a look at https://github.com/kevinushey/RcppBiocChecks 
and it looks like Bioconductor packages are in good shape. Thanks Kevin for 
checking this, and Steffen for fixing mzR and Rdisop. 
| 
| That document does refer to several packages that are not Bioconductor 
packages:
| 
| CDM
| sirt
| TAM
| geiger

Note the date. Kevin's page is a little dusty (~ 5 days).  

I am trying to keep

   https://github.com/RcppCore/rcpp-logs/blob/master/status/status-20140129.txt

more current (which includes changing the url which may be bad style -- but I
am keeping the url of all other files in that repo).

CDM, sirt, and TAM are indeed on the list of the now 12 packages still
needing a patch.  The other one, geiger, morphed to works as-is with some
other work.

And Kevin also confirmed to me that the four CRAN packages I didn't touch (as
they depended on BioC packages) also test fine -- so we are now in the clear
for all of BioC.  

I still need to reflect that update from Kevin.  But we're getting there --
and it is really excellent how folks are helping.  Four patched packages are
already on CRAN, plus three which got there late last week, plus the handful
I was involved with, ...

| Anyway, I don't think I need to take further action on this, but if anyone 
needs me to do or test anything, just let me know.

Noted, thanks.

Dirk

-- 
Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Jamie Olson
1) When doing that, there won't be any problem using a different
version of MinGW?

2) I'm guessing I'd want to do this in linux, to avoid including the
cygwin dlls?

--Jamie

Jamie Olson


On Wed, Jan 29, 2014 at 3:13 PM, Dirk Eddelbuettel e...@debian.org wrote:

 On 29 January 2014 at 15:07, Jamie Olson wrote:
 | I'm trying to build the Avro-C
 | library[http://avro.apache.org/docs/1.7.5/api/c/index.html].  There is
 | a README for building in
 | 
 windows[http://svn.apache.org/repos/asf/avro/trunk/lang/c/README.maintaining_win32.txt]
 | but it only has instructions for Visual Studio.  I've recently been
 | wondering if that was intentional, since now cmake-generated MSYS
 | Makefiles are giving errors.
 |
 | Are you suggesting that I build the library with MinGW(in
 | cygwin/linux?) and then just copy it to link to when building the
 | package with Rcpp?

 In a nutshell, yes.

 If you want to / need to package Avro as a library it may be trickier. At a
 first pass try to build a static library, then link your Rcpp package to that.

 Dirk

 --
 Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Dirk Eddelbuettel

On 29 January 2014 at 15:22, Jamie Olson wrote:
| 1) When doing that, there won't be any problem using a different
| version of MinGW?

I thought we had been over this before:  yes, mixing is a problem, so no, do
not do this.  Build R and Rcpp and your preferred libraries with the same
version.  

I even built Qt and what not that way years ago.
 
| 2) I'm guessing I'd want to do this in linux, to avoid including the
| cygwin dlls?

I am not following. Were you not constrained by being on Windows? 

Dirk

-- 
Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Jamie Olson
Sorry, I think I just got confused.  I meant cross-compiling from
linux with mingw since cygwin's cmake is giving me trouble, but it's
probably more effort than it's worth to get the same compiler.

Thanks for all your help!

--Jamie
Jamie Olson


On Wed, Jan 29, 2014 at 3:44 PM, Dirk Eddelbuettel e...@debian.org wrote:

 On 29 January 2014 at 15:22, Jamie Olson wrote:
 | 1) When doing that, there won't be any problem using a different
 | version of MinGW?

 I thought we had been over this before:  yes, mixing is a problem, so no, do
 not do this.  Build R and Rcpp and your preferred libraries with the same
 version.

 I even built Qt and what not that way years ago.

 | 2) I'm guessing I'd want to do this in linux, to avoid including the
 | cygwin dlls?

 I am not following. Were you not constrained by being on Windows?

 Dirk

 --
 Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


Re: [Rcpp-devel] Rcpp, Windows and CMake

2014-01-29 Thread Dirk Eddelbuettel

On 29 January 2014 at 16:18, Jamie Olson wrote:
| Sorry, I think I just got confused.  I meant cross-compiling from
| linux with mingw since cygwin's cmake is giving me trouble, but it's
| probably more effort than it's worth to get the same compiler.

Yes. 

Cross-compiling can work, but some of the version of gcc are more finicky
than other.  Eg Jeroen used the different mingw cross-compiler version on
Ubuntu to build a Windows library of Protocol Buffers which he then made
available to CRAN / win-builder.  So now we have Windows builds of RProtoBuf
too.  

But he had to try three different ones. As I recall the 4.7.* variant worked,
the others lead to errors once used on Windows. But you'd have to ask him.

We are a little off-topic now as far as 'how do I use Rcpp' goes.
 
| Thanks for all your help!

My pleasure.

Dirk

-- 
Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com
___
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel