qinwf/re2r

cran submission?

Opened this issue · 3 comments

Hey @qinwf I would like to teach a class about regular expressions in R, and it would be great if you could put re2r on CRAN, so that windows/mac users without compilers could download the binary package. Do you think you have time to do a CRAN submission some time in the next few weeks?

Ok, I will make an update and submit it to CRAN this week.

thanks for the CRAN submission. That should definitely help students with win/mac. However on my Ubuntu 14.04 machine I was getting the following

> install.packages("re2r")
trying URL 'http://cran.utstat.utoronto.ca/src/contrib/re2r_0.2.0.tar.gz'
Content type 'application/x-gzip' length 894091 bytes (873 KB)
==================================================
downloaded 873 KB

* installing *source* package ‘re2r’ ...
** package ‘re2r’ successfully unpacked and MD5 sums checked
** libs
g++ -std=c++0x -I/home/thocking/lib/R/include -DNDEBUG -I../inst/include -DNDEBUG -I/usr/local/include -I"/home/thocking/lib/R/library/Rcpp/include" -I"/home/thocking/lib/R/library/RcppParallel/include"   -fpic  -g -O2 -c RcppExports.cpp -o RcppExports.o
In file included from ../inst/include/re2r.h:42:0,
                 from RcppExports.cpp:4:
../inst/include/re2/regexp.h:561:32: warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas]
In file included from ../inst/include/re2r.h:58:0,
                 from RcppExports.cpp:4:
../inst/include/optional.hpp:115:2: error: expected unqualified-id before ‘using’
../inst/include/optional.hpp:342:1: error: expected unqualified-id before ‘using’
../inst/include/optional.hpp:351:38: error: expected template-name before ‘<’ token
../inst/include/optional.hpp:351:38: error: expected ‘{’ before ‘<’ token
../inst/include/optional.hpp:351:38: error: expected unqualified-id before ‘<’ token
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘re2r’
* removing ‘/home/thocking/lib/R/library/re2r’
* restoring previous ‘/home/thocking/lib/R/library/re2r’

The downloaded source packages are in
	‘/tmp/RtmpWxjuyp/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("re2r") :
  installation of package ‘re2r’ had non-zero exit status
> 

Eventually I figured out that this could be fixed by upgrading my compiler -- that was not obvious at first. If there is no explicit way to check for the right g++ version, at least I would recommend to document this issue and solution in a FAQ. Maybe add that to the README, or add it on a wiki page?

qinwf commented

Thanks for the report! I am working on it.