Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cran documentation #546

Closed
hermesh2 opened this issue Aug 29, 2016 · 4 comments
Closed

Cran documentation #546

hermesh2 opened this issue Aug 29, 2016 · 4 comments

Comments

@hermesh2
Copy link

hermesh2 commented Aug 29, 2016

I found some problems with Rcpp library. If you want to install in
R version 3.1.2 (2014-10-31)
Platform: x86_64-redhat-linux-gnu (64-bit)

If I try to install and I get the following message

'''

install.packages("Rcpp")
Installing package into ‘/newhome/kajavier/R/x86_64-redhat-linux-gnu-library/3.1’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/Rcpp_0.12.6.tar.gz'
Content type 'application/x-gzip' length 2415707 bytes (2.3 Mb)
opened URL
downloaded 2.3 Mb

  • installing source package ‘Rcpp’ ...
    ** package ‘Rcpp’ successfully unpacked and MD5 sums checked
    ** libs
    g++ -m64 -I/usr/include/R -DNDEBUG -I../inst/include/ -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c Date.cpp -o Date.o
    In file included from ../inst/include/RcppCommon.h:122,
    from ../inst/include/Rcpp.h:27,
    from Date.cpp:31:
    ../inst/include/Rcpp/exceptions.h:267: error: expected initializer before ‘stop’
    ../inst/include/Rcpp/exceptions.h:272: error: expected initializer before ‘stop’
    ../inst/include/Rcpp/exceptions.h:277: error: expected initializer before ‘stop’
    ../inst/include/Rcpp/exceptions.h:282: error: expected initializer before ‘stop’
    ../inst/include/Rcpp/exceptions.h:287: error: expected initializer before ‘stop’
    ../inst/include/Rcpp/exceptions.h:292: error: expected initializer before ‘stop’
    ../inst/include/Rcpp/exceptions.h:297: error: expected initializer before ‘stop’
    ../inst/include/Rcpp/exceptions.h:302: error: expected initializer before ‘stop’
    ../inst/include/Rcpp/exceptions.h:307: error: expected initializer before ‘stop’
    ../inst/include/Rcpp/exceptions.h:312: error: expected initializer before ‘stop’
    ../inst/include/Rcpp/exceptions.h:317: error: expected initializer before ‘stop’
    In file included from ../inst/include/Rcpp/Vector.h:56,
    from ../inst/include/Rcpp.h:38,
    from Date.cpp:31:
    ../inst/include/Rcpp/utils/tinyformat.h: In member function ‘Rcpp::internal::DimNameProxy& Rcpp::internal::DimNameProxy::assign(SEXPREC_)’:
    ../inst/include/Rcpp/utils/tinyformat.h:127: error: too many arguments to function ‘void Rcpp::stop(const std::string&)’
    ../inst/include/Rcpp/vector/DimNameProxy.h:43: error: at this point in file
    In file included from ../inst/include/Rcpp.h:47,
    from Date.cpp:31:
    ../inst/include/Rcpp/utils/tinyformat.h: In constructor ‘Rcpp::Function_Impl::Function_Impl(const std::string&, const std::string&)’:
    ../inst/include/Rcpp/utils/tinyformat.h:127: error: too many arguments to function ‘void Rcpp::stop(const std::string&)’
    ../inst/include/Rcpp/Function.h:72: error: at this point in file
    make: *_* [Date.o] Error 1
    ERROR: compilation failed for package ‘Rcpp’
  • removing ‘/newhome/kajavier/R/x86_64-redhat-linux-gnu-library/3.1/Rcpp’
  • restoring previous ‘/newhome/kajavier/R/x86_64-redhat-linux-gnu-library/3.1/Rcpp’
    Warning in install.packages :
    installation of package ‘Rcpp’ had non-zero exit status
    The downloaded source packages are in
    ‘/tmp/RtmpGGzXba/downloaded_packages’
    '''

The problem doesn't exist in the other machine

'''
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
'''

I solve the problem installing the anterior Rcpp version.

packageurl <- "http://cran.r-project.org/src/contrib/Archive/Rcpp/Rcpp_0.12.5.tar.gz"
install.packages(packageurl, repos=NULL, type="source")

I guess that the source of the problem is the R version. Then the documentation is wrong in the cran.
Following "To add a bit more beef to this: R-devel (aka R 3.4.* to be), R-release (aka R 3.3.1 right now) and R-oldrel (aka R 3.2.5) all work. But if you go back to R 3.1.* or older, it failed. " [1]
The documentation[2] shoud be changed from Depends: R (≥ 3.0.0) to Depends: R (≥ 3.2.0)

Bibliography

[1] http://stackoverflow.com/questions/38566225/not-able-to-compile-rcpp-0-12-6-under-r
[2] https://cran.r-project.org/web/packages/Rcpp/index.html

@eddelbuettel
Copy link
Member

That problem has been reported numerous times. Copying/extending from #539:

For reference, this is discussed in #512 (with reference to the drat repo), #516, #519, #520, #538, #539, and now #546.

You want these two commits if you do it by hand:

My recommendation, however, is to use the Rcpp drat repo to access the interim release 0.12.6.1 which is just the trusted 0.12.6 plus the fix to make it build on outdated R versions such as R 3.0.* or 3.1.*

Or, as you noticed, used a non-outdated version of R such as R 3.3.1 or even R 3.2.*.

We will ship Rcpp 0.12.7 early September which will put a lid on this.

/cc @krlmlr

@krlmlr
Copy link
Contributor

krlmlr commented Aug 29, 2016

I guess the problem that new features introduces breakages with old R versions will reappear. Users of "ancient" R versions might want to consider MRAN.

Perhaps a package as important as Rcpp could be tested with all R versions it offers support for (currently, R >= 3.0.0). One option here is testing on Windows with AppVeyor. Is this something you'd be interested in?

@eddelbuettel
Copy link
Member

eddelbuettel commented Aug 29, 2016

No, I am most certainly not. The test matrix at CRAN is what matters to me. And there we pass on all relevant platforms (modulo the NOTE about large dynamic libraries, a constant with templated libraries). I am open to associated volunteer projects to stress Rcpp against outdated R versions, but that is simply a) neither a concern or interest of mine nor b) something I am willing to wait for on every commit.

@eddelbuettel
Copy link
Member

eddelbuettel commented Aug 29, 2016

I guess the problem that new features introduces breakages with old R versions will reappear.

Conjecture. It hadn't really happened to us before your PR :)

I think we had it once before a long while ago. R itself is usually good enough at signaling this, and our coding standards are sufficiently conservative. A bigger deal, quite frankly is the toolchain and not so much the R version. We are mostly compiled code here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants