Re: [Rcpp-devel] sourceCpp issue: code vs. file

2013-05-24 Thread Rodney Sparapani
On 05/23/2013 03:01 PM, Rodney Sparapani wrote: possibly, just add ".cpp" to any file that does not already have it before copying it to TEMP. Actually, this latter suggestion is rather easy to implement and, I believe, simplifies life for spaces in filenames, etc. It adds 5 lines, but elimina

Re: [Rcpp-devel] sourceCpp issue: code vs. file

2013-05-23 Thread Rodney Sparapani
On 05/23/2013 09:26 AM, Hadley Wickham wrote: You can't catch everything, but can you try ;) Given that people are used to writing C++ with a variety of extensions, it seems like a simple check here would be useful, especially given the otherwise opaque nature of the error. Since Hadley Hi!

Re: [Rcpp-devel] sourceCpp issue: code vs. file

2013-05-23 Thread Hadley Wickham
> | So maybe sourceCpp could provide a warning if the extension is not in that > list? > > Hmpd. I am not exactly sure why you advocate supporting .c or .f, .f90, .f95, > .m and .mm none of which are likely to work _in any way_ with the parsing > done and scaffolding added by sourceCpp. When you

Re: [Rcpp-devel] sourceCpp issue: code vs. file

2013-05-23 Thread Dirk Eddelbuettel
On 23 May 2013 at 09:03, Hadley Wickham wrote: | >> R governs the behaviour of R CMD based on the extension. | >> | >> The .cxx form was /never/ supported by R as far as I know. | > | > Indeed. According to "Package subdirectories" in Writing R Extensions | > (http://cran.r-project.org/doc/manual

Re: [Rcpp-devel] sourceCpp issue: code vs. file

2013-05-23 Thread Hadley Wickham
>> R governs the behaviour of R CMD based on the extension. >> >> The .cxx form was /never/ supported by R as far as I know. > > Indeed. According to "Package subdirectories" in Writing R Extensions > (http://cran.r-project.org/doc/manuals/R-exts.html#Package-subdirectories) > the only supported e

Re: [Rcpp-devel] sourceCpp issue: code vs. file

2013-05-23 Thread Rodney Sparapani
On 05/22/2013 08:41 PM, Dirk Eddelbuettel wrote: R governs the behaviour of R CMD based on the extension. The .cxx form was/never/ supported by R as far as I know. And previously, I had not noticed that Rodney had used this extension; I had repeatedly suggested he create smaller working examp

Re: [Rcpp-devel] sourceCpp issue: code vs. file

2013-05-22 Thread JJ Allaire
On Wed, May 22, 2013 at 6:41 PM, Dirk Eddelbuettel wrote: > R governs the behaviour of R CMD based on the extension. > > The .cxx form was /never/ supported by R as far as I know. > Indeed. According to "Package subdirectories" in Writing R Extensions ( http://cran.r-project.org/doc/manuals/R-e

Re: [Rcpp-devel] sourceCpp issue: code vs. file

2013-05-22 Thread Dirk Eddelbuettel
On 22 May 2013 at 17:59, JJ Allaire wrote: | I also can build successfully on Ubuntu and OSX with the .cpp extension however | the .cxx extension fails. I think the file extension is the likely culprit. R governs the behaviour of R CMD based on the extension. The .cxx form was /never/ supporte

Re: [Rcpp-devel] sourceCpp issue: code vs. file

2013-05-22 Thread JJ Allaire
I also can build successfully on Ubuntu and OSX with the .cpp extension however the .cxx extension fails. I think the file extension is the likely culprit. J.J. On Wed, May 22, 2013 at 5:13 PM, Kevin Ushey wrote: > Hi Rodney, > > I have the same problem as you on Mac OSX. > > I'm able to succe

Re: [Rcpp-devel] sourceCpp issue: code vs. file

2013-05-22 Thread Dirk Eddelbuettel
I had mentioned earlier to you to maybe look into how TMP, TMPDIR, ... are used or set. My working example has `.sourceCpp_44697_DLLInfo` <- dyn.load('/tmp/Rtmpr8HLMP/sourcecpp_38624d1a5d0a/sourceCpp_73760.so') which makes sense -- Rtmp* inside /tmp. Yours shows `.sourceCpp_41979_DLLInfo`

Re: [Rcpp-devel] sourceCpp issue: code vs. file

2013-05-22 Thread Kevin Ushey
Hi Rodney, I have the same problem as you on Mac OSX. I'm able to successfully compile the file through sourceCpp if I use a file extension of .cpp rather than .cxx. Could this somehow be the reason why? Let me know if that works for you. -Kevin On Wed, May 22, 2013 at 4:27 PM, Sparapani, Rod

Re: [Rcpp-devel] sourceCpp issue: code vs. file

2013-05-22 Thread Sparapani, Rodney
And here is the failure on OS X ML... > sourceCpp(verbose=TRUE, rebuild=TRUE, file="~/arma-sp.cxx") Generated extern "C" functions #include RcppExport SEXP sourceCpp_41979_convertSparse(SEXP matSEXP) { BEGIN_RCPP Rcpp::RNGScope __r

Re: [Rcpp-devel] sourceCpp issue: code vs. file

2013-05-22 Thread Rodney Sparapani
On 05/22/2013 12:23 PM, Dirk Eddelbuettel wrote: Methinks there may be something particular to your box. Dirk Possible, but I don't think it is likely. I found this issue on the following OSes: RHEL 5, Oracle 6, CentOS 6 and OS X ML... with various versions of GCC -- Rodney Sparapani, PhD

Re: [Rcpp-devel] sourceCpp issue: code vs. file

2013-05-22 Thread Dirk Eddelbuettel
And for completeness, here is the invocation that fails for Rodney: R> sourceCpp(verbose=TRUE, rebuild=TRUE, file="2012-12-25-armadillo-sparse-matrix.cpp") Generated extern "C" functions #include RcppExport SEXP sourceCpp_44697_conv

Re: [Rcpp-devel] sourceCpp issue: code vs. file

2013-05-22 Thread Rodney Sparapani
Oops! I forgot the version info... > sessionInfo() R version 2.15.3 (2013-03-01) Platform: x86_64-unknown-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.ISO8859-1 LC_NUMERIC=C [3] LC_TIME=en_US.ISO8859-1LC_COLLATE=en_US.ISO8859-1 [5] LC_MONETARY=en_US.ISO8859-1LC_MESSAGES=en

Re: [Rcpp-devel] sourceCpp issue: code vs. file

2013-05-22 Thread Dirk Eddelbuettel
Rodney and I have been over this a bit, without resolution. At my urging, he posted now on the list (as _everybody_ should: more eyeballs are in fact better as you can tell from the fact that we still have not found this). On my side, I just works. The second command is specific to my machine, b