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

cannot install 0.12.6: problem in exceptions.h #512

Closed
vttrifonov opened this issue Jul 20, 2016 · 18 comments
Closed

cannot install 0.12.6: problem in exceptions.h #512

vttrifonov opened this issue Jul 20, 2016 · 18 comments

Comments

@vttrifonov
Copy link

vttrifonov commented Jul 20, 2016

Just tried 0.12.6 to install and am getting

* installing to library ‘/opt/tools/install/R/3.1.0/lib/R/library’
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** libs
g++ -I/opt/tools/install/R/3.1.0/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include    -fpic  -g -O2  -c Date.cpp -o Date.o
In file included from ../inst/include/RcppCommon.h:122:0,
                 from ../inst/include/Rcpp.h:27,
                 from Date.cpp:31:
../inst/include/Rcpp/exceptions.h:267:23: error: expected initializer before ‘stop’
     inline void NORET stop(const std::string& message) {
                       ^
../inst/include/Rcpp/exceptions.h:272:23: error: expected initializer before ‘stop’
     inline void NORET stop(const char* fmt, const T1& arg1) {
                       ^
../inst/include/Rcpp/exceptions.h:277:23: error: expected initializer before ‘stop’
     inline void NORET stop(const char* fmt, const T1& arg1, const T2& arg2) {
                       ^
../inst/include/Rcpp/exceptions.h:282:23: error: expected initializer before ‘stop’
     inline void NORET stop(const char* fmt, const T1& arg1, const T2& arg2, const T3& arg3) {
                       ^
../inst/include/Rcpp/exceptions.h:287:23: error: expected initializer before ‘stop’
     inline void NORET stop(const char* fmt, const T1& arg1, const T2& arg2, const T3& arg3, const T4& arg4) {
                       ^
../inst/include/Rcpp/exceptions.h:292:23: error: expected initializer before ‘stop’
     inline void NORET stop(const char* fmt, const T1& arg1, const T2& arg2, const T3& arg3, const T4& arg4, const T5& arg5) {
                       ^
../inst/include/Rcpp/exceptions.h:297:23: error: expected initializer before ‘stop’
     inline void NORET stop(const char* fmt, const T1& arg1, const T2& arg2, const T3& arg3, const T4& arg4, const T5& arg5, const T6& arg6) {
                       ^
../inst/include/Rcpp/exceptions.h:302:23: error: expected initializer before ‘stop’
     inline void NORET stop(const char* fmt, const T1& arg1, const T2& arg2, const T3& arg3, const T4& arg4, const T5& arg5, const T6& arg6, const T7& arg7) {
                       ^
../inst/include/Rcpp/exceptions.h:307:23: error: expected initializer before ‘stop’
     inline void NORET stop(const char* fmt, const T1& arg1, const T2& arg2, const T3& arg3, const T4& arg4, const T5& arg5, const T6& arg6, const T7& arg7, const T8& arg8) {
                       ^
../inst/include/Rcpp/exceptions.h:312:23: error: expected initializer before ‘stop’
     inline void NORET stop(const char* fmt, const T1& arg1, const T2& arg2, const T3& arg3, const T4& arg4, const T5& arg5, const T6& arg6, const T7& arg7, const T8& arg8, const T9& arg9) {
                       ^
../inst/include/Rcpp/exceptions.h:317:23: error: expected initializer before ‘stop’
     inline void NORET stop(const char* fmt, const T1& arg1, const T2& arg2, const T3& arg3, const T4& arg4, const T5& arg5, const T6& arg6, const T7& arg7, const T8& arg8, const T9& arg9, const T10& arg10) {
                       ^
In file included from ../inst/include/Rcpp/Vector.h:56:0,
                 from ../inst/include/Rcpp.h:38,
                 from Date.cpp:31:
../inst/include/Rcpp/vector/DimNameProxy.h: In member function ‘Rcpp::internal::DimNameProxy& Rcpp::internal::DimNameProxy::assign(SEXP)’:
../inst/include/Rcpp/vector/DimNameProxy.h:43:121: error: too many arguments to function ‘void Rcpp::stop(const string&)’
                     stop("dimension extent is '%d' while length of names is '%d'", INTEGER(dims)[dim_], Rf_length(other));
                                                                                                                         ^
In file included from ../inst/include/RcppCommon.h:70:0,
                 from ../inst/include/Rcpp.h:27,
                 from Date.cpp:31:
../inst/include/Rcpp/utils/tinyformat.h:127:10: note: declared here
     void stop(const std::string& message);
          ^
In file included from ../inst/include/Rcpp.h:47:0,
                 from Date.cpp:31:
../inst/include/Rcpp/Function.h: In constructor ‘Rcpp::Function_Impl<StoragePolicy>::Function_Impl(const string&, const string&)’:
../inst/include/Rcpp/Function.h:72:63: error: too many arguments to function ‘void Rcpp::stop(const string&)’
                 stop("there is no namespace called \"%s\"", ns);
                                                               ^
In file included from ../inst/include/RcppCommon.h:70:0,
                 from ../inst/include/Rcpp.h:27,
                 from Date.cpp:31:
../inst/include/Rcpp/utils/tinyformat.h:127:10: note: declared here
     void stop(const std::string& message);
          ^
make: *** [Date.o] Error 1
ERROR: compilation failed for package ‘Rcpp’
* removing ‘/opt/tools/install/R/3.1.0/lib/R/library/Rcpp’
@eddelbuettel
Copy link
Member

eddelbuettel commented Jul 20, 2016

What OS?
What version?
What compiler?
What else?

How are we supposed to do anything with a report like this? Also please look up formatting help.

@eddelbuettel
Copy link
Member

For reference CRAN builds are fine across different OSs, as are Debian builds across various hardware platforms.

@vttrifonov
Copy link
Author

Sorry about the formatting. Just copy-pasted the output and did not expect for it to look like this.

Ubuntu 14.04

Attaching the output of the R session

rcpp_install.txt

It might a problem with my configuration, but I looked at exceptions.h where the problem appears to be and it has declarations that look like 'void NORET stop' with NORET nowhere defined (as far as I can tell).

@eddelbuettel
Copy link
Member

eddelbuettel commented Jul 20, 2016

Local issue, closing this.

You are

  • on an OS version no longer supported by its vendor -- 16.04 is current LTS
  • two years out of date on R itself even though we hand you pre-built binaries via CRAN
  • have something non-reproducible here and just re-including the same report does not add anything
  • insist on using a local build of R below /opt we know nothing about.

In short, if you insist on outdated OS and outdated R please stick with the pre-compiled outdated Rcpp you get via sudo apt-get install r-cran-rcpp.

If it breaks under such circumstances, you get to keep the pieces.

@eddelbuettel
Copy link
Member

Ok, reopening. I can replicate on Ubuntu 14.04 using g++ 4.8.4.

You may just need to move to a newer release, sorry.

@jjallaire @kevinushey @thirdwing @krlmlr The narrow culprit may be Kirill's NORET commit on June What would be a sensible way to

  • triage this,
  • avoid the issue on ancient compilers,
  • maybe make Travis more robust by forcing older compilers?

@eddelbuettel
Copy link
Member

In the meantime 0.12.5 still installs on Ubuntu 14.04 with R 3.0.1 and g++ 4.8.4.

@eddelbuettel
Copy link
Member

@vttrifonov As a stop-gap measure, if you edit exceptions.h by hand and either remove NORET and place it inside comments ie `/* NORET */ then you can install fine. We'll take a look at this to address it more systematically.

@vttrifonov
Copy link
Author

Thanks for the commenting. I will stick with 0.2.15 for now.

@eddelbuettel
Copy link
Member

#define NORET

works too. I guess we need to protect / sharpen the original definition here and undefine for ancient g++.

@kevinushey
Copy link
Contributor

The issue here is simply that R only defines NORET in recent-ish versions of R (sorry, should have caught this earlier): wch/r-source@0c43709

We could easily just copy this macro definition into Rcpp; I'll submit a PR doing that.

@kevinushey
Copy link
Contributor

The issue isn't old gcc, it's older R (which don't have the NORET define).

@eddelbuettel
Copy link
Member

Ohhhhhhhhh, I missed that completely.

@eddelbuettel
Copy link
Member

That's easy then.

@eddelbuettel
Copy link
Member

@vttrifonov If you pull from the master branch now, you will be able to build on your older system.

Later or maybe tomorrow I'll prepare a 0.12.6.1 release which I'll put up into this drat repo for use with install.packages(). I will follow up once that is done.

@eddelbuettel
Copy link
Member

A release 0.12.6.1 with the fix is now in the this drat repo from which you can install the source package.

Thanks again for the bug report. None of us work with R versions that old so we never came across the issue, but it was sloppy on our part to assume NORET was always defined.

@vttrifonov
Copy link
Author

This works. Thanks.

@krlmlr
Copy link
Contributor

krlmlr commented Jul 22, 2016

Thanks for looking into it, I'm sorry for the pain my "easy" fix caused.

@eddelbuettel
Copy link
Member

No worries. We were all absent-minded or would have (well: should have) thought about it then.

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

4 participants