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

#include_next not working in g++-8 #452

Closed
jeroen opened this issue Mar 31, 2018 · 5 comments
Closed

#include_next not working in g++-8 #452

jeroen opened this issue Mar 31, 2018 · 5 comments

Comments

@jeroen
Copy link

jeroen commented Mar 31, 2018

As a temporary workaround for #450 I was able to build a --static-gcc toolchain using --no-extras. The basic C stuff works well I was able to build my application.

However for C++ I keep getting errors about #include_next in headers:

In file included from libjson/Source/JSONMemory.h:4,
                 from libjson/Source/JSONChildren.h:6,
                 from JSONChildren.cpp:1:
C:/gcc8/mingw32/i686-w64-mingw32/include/c++/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
 #include_next <stdlib.h>
               ^~~~~~~~~~

and

In file included from ../inst/include/Rcpp/platform/compiler.h:100,
                 from ../inst/include/Rcpp/r/headers.h:48,
                 from ../inst/include/RcppCommon.h:38,
                 from ../inst/include/Rcpp.h:27,
                 from Date.cpp:31:
C:/gcc8/mingw32/i686-w64-mingw32/include/c++/cmath:45:15: fatal error: math.h: No such file or directory
 #include_next <math.h>
               ^~~~~~~~

I confirmed that stdlib.h and math.h are definitly installed. Is this perhaps a problem in mingw-w64 or an upstream gcc regression? @mingwandroid

@niXman
Copy link
Owner

niXman commented Mar 31, 2018

I think this is a gcc regression...

Try to rebuild with commented out this line: https://github.com/niXman/mingw-builds/blob/develop/scripts/gcc-trunk.sh#L73

@jeroen
Copy link
Author

jeroen commented Mar 31, 2018

Yes that fixed it! Thank you!

Filed upstream bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85145

@jeroen
Copy link
Author

jeroen commented May 2, 2018

GCC 8 has been released. Maybe we should comment that out by default?

@niXman
Copy link
Owner

niXman commented May 2, 2018

Please explain, what is the relationship between this bug and the release of gcc-8.1?

@jeroen
Copy link
Author

jeroen commented May 2, 2018

As I understand it, the bug still persists in gcc 8.1 release.

@niXman niXman closed this as completed May 5, 2018
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

2 participants