Couldn't compile using GCC 12
Closed this issue · 3 comments
bakatrouble commented
The project is unable to compile, possibly because I'm using gcc 12.
The issue is in circular includes that happen in stateos/stdc++/bits/gthr-default.h
"hook":
In file included from /usr/arm-none-eabi/include/c++/12.2.0/sstream:38,
from /usr/arm-none-eabi/include/c++/12.2.0/chrono:41,
from /home/user/dev/stm32/keypad_stateos/common/stateos/stdc++/inc/chrono.hh:36,
from /home/user/dev/stm32/keypad_stateos/common/stateos/stdc++/bits/gthr-default.h:40,
from /usr/arm-none-eabi/include/c++/12.2.0/arm-none-eabi/thumb/v7e-m+fp/hard/bits/gthr.h:148,
from /usr/arm-none-eabi/include/c++/12.2.0/ext/atomicity.h:35,
from /usr/arm-none-eabi/include/c++/12.2.0/bits/ios_base.h:39,
from /usr/arm-none-eabi/include/c++/12.2.0/ios:42,
from /usr/arm-none-eabi/include/c++/12.2.0/ostream:38,
from /usr/arm-none-eabi/include/c++/12.2.0/bits/unique_ptr.h:41,
from /usr/arm-none-eabi/include/c++/12.2.0/memory:76,
from /home/user/dev/stm32/keypad_stateos/common/stateos/stdc++/src/thread.cc:28:
/usr/arm-none-eabi/include/c++/12.2.0/istream:602:23: error: 'std::ios_base::seekdir' has not been declared
602 | seekg(off_type, ios_base::seekdir);
| ^~~~~~~~
and a lot of other errors are following.
bakatrouble commented
Adding #include <chrono>
before all other includes in stateos/stdc++/src/thread.cc
seemed to resolve the issue
rajszym commented
Thanks for reporting bugs. The fix has already been committed to the repository. The bug was related to the unnecessary inclusion of the "memory" header file in "thread.cc". Is everything ok now?
bakatrouble commented
yes, it is fixed now