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

Unable to build in C++20 on Mac #607

Open
FellowTraveler opened this issue Jun 17, 2023 · 2 comments
Open

Unable to build in C++20 on Mac #607

FellowTraveler opened this issue Jun 17, 2023 · 2 comments

Comments

@FellowTraveler
Copy link
Contributor

FellowTraveler commented Jun 17, 2023

  • Compiler Used: clang 14.0.3
  • Operating System: MacOS 13.3.1
  • Architecture (ARM/x86/32bit/64bit/etc): x86_64-apple-darwin22.4.0

Expected Behavior

It should compile with C++20 but fails. (It does successfully compile in C++17).

Actual Behavior

Fails to compile using C++20; errors all apparently due to incomplete type: AST_Node_Trace

Minimal Example to Reproduce Behavior

Change C++ version from 17 to 20 in CMakeLists.txt and then see lots of errors like this:

In file included from /Users/au/src/ChaiScript/unittests/boxed_cast_test.cpp:1:
In file included from /Users/au/src/ChaiScript/include/chaiscript/utility/utility.hpp:13:
In file included from /Users/au/src/ChaiScript/include/chaiscript/utility/../language/chaiscript_common.hpp:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/sstream:186:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/istream:165:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/ostream:168:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/bitset:128:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/string:551:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/string_view:223:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/functional:515:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:26:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/vector:540:52: error: arithmetic on a pointer to an incomplete type 'chaiscript::AST_Node_Trace'
{return static_cast<size_type>(__end_cap() - this->_begin);}
~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/vector:760:56: note: in instantiation of member function 'std::vectorchaiscript::AST_Node_Trace::capacity' requested here
__annotate_contiguous_container(data(), data() + capacity(),
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/vector:431:7: note: in instantiation of member function 'std::vectorchaiscript::AST_Node_Trace::__annotate_delete' requested here
__annotate_delete();
^
/Users/au/src/ChaiScript/include/chaiscript/utility/../language/chaiscript_common.hpp:211:7: note: in instantiation of member function 'std::vectorchaiscript::AST_Node_Trace::~vector' requested here
eval_error(const std::string &t_why,
^
/Users/au/src/ChaiScript/include/chaiscript/utility/../language/chaiscript_common.hpp:173:10: note: forward declaration of 'chaiscript::AST_Node_Trace'
struct AST_Node_Trace;
^

@larkwiot
Copy link

Having this issue as well on Linux x64.

@zethon
Copy link

zethon commented Oct 8, 2023

@FellowTraveler Just a guess, did you try a new build folder? I've gotten errors before when I switched CMAKE_CXX_STANDARD from 17 to 20 and then tried to re-use the build folder.

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