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

clang11 compile failed #13

Closed
2 tasks
RainMark opened this issue Feb 22, 2022 · 3 comments · Fixed by #14
Closed
2 tasks

clang11 compile failed #13

RainMark opened this issue Feb 22, 2022 · 3 comments · Fixed by #14
Assignees

Comments

@RainMark
Copy link
Collaborator

Search before asking

  • I searched the issues and found no similar issues.

What happened + What you expected to happen

/Users/rain/Project/async_simple/async_simple/experimental/coroutine.h:50:10: fatal error: 'version' file not found
#include <version>
         ^~~~~~~~~
In file included from /Users/rain/Project/async_simple/async_simple/uthread/internal/thread.cc:28:
In file included from /Users/rain/Project/async_simple/async_simple/uthread/internal/thread.h:30:
In file included from /Users/rain/Project/async_simple/async_simple/Future.h:19:
In file included from /Users/rain/Project/async_simple/async_simple/Executor.h:20:
/Users/rain/Project/async_simple/async_simple/experimental/coroutine.h:50:10: fatal error: 'version' file not found
#include <version>
         ^~~~~~~~~
1 error generated.
make[2]: *** [async_simple/CMakeFiles/async_simple_static.dir/build.make:78: async_simple/CMakeFiles/async_simple_static.dir/uthread/internal/thread.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:144: async_simple/CMakeFiles/async_simple_static.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Reproduction way

use clang11 build will get the error, the #include <version> file not exist in clang11?
comment the #include <version> can compile

clang version 11.0.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Candidate multilib: .;@m64
Selected multilib: .;@m64

Anything else

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!
@ChuanqiXu9
Copy link
Collaborator

is introduced in C++20. It is possible that older library doesn't support it.

@RainMark
Copy link
Collaborator Author

@ChuanqiXu9 which macro we used in the header ?

@ChuanqiXu9 ChuanqiXu9 linked a pull request Feb 22, 2022 that will close this issue
@ChuanqiXu9
Copy link
Collaborator

@ChuanqiXu9 which macro we used in the header ?

I want to see if __GLIBCXX__ is defined or __LIBCPP_VERSION is defined. The two macros is used to specify the stdlib we use.

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

Successfully merging a pull request may close this issue.

2 participants