Skip to content

Don't want compile on MacOS 15.7.3 #2

Description

@axonde

Have a problem when try to compile the project with

mkdir build
cd build
cmake ..
make

Actually, the error happens when the make command is touched:

In file included from /Users/axonde/dev/itmo-script/src/interpreter/memory/memory.cpp:1:
In file included from /Users/axonde/dev/itmo-script/src/interpreter/memory/memory.h:2:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/functional:553:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/function.h:26:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:76:19: error: invalid application of 'sizeof' to an incomplete type 'Memory::ListHolder'
   76 |     static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type");
      |                   ^~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:300:7: note: in instantiation of member function 'std::default_delete<Memory::ListHolder>::operator()' requested here
  300 |       __deleter_(__tmp);
      |       ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:269:71: note: in instantiation of member function 'std::unique_ptr<Memory::ListHolder>::reset' requested here
  269 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 ~unique_ptr() { reset(); }
      |                                                                       ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/variant:660:29: note: in instantiation of member function 'std::unique_ptr<Memory::ListHolder>::~unique_ptr' requested here
  660 | struct _LIBCPP_TEMPLATE_VIS __alt {
      |                             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/variant:787:22: note: in implicit destructor for 'std::__variant_detail::__alt<4, std::unique_ptr<Memory::ListHolder>>' first required here
  787 |               __alt.~__alt_type();
      |                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/invoke.h:176:10: note: in instantiation of function template specialization 'std::__variant_detail::__dtor<std::__variant_detail::__traits<std::monostate, double, bool, std::string, std::unique_ptr<Memory::ListHolder>, std::unique_ptr<Memory::FuncHolder>>>::__destroy()::(anonymous class)::operator()<std::__variant_detail::__alt<4, std::unique_ptr<Memory::ListHolder>>>' requested here
  176 | decltype(std::declval<_Fp>()(std::declval<_Args>()...))
      |          ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/variant:532:14: note: (skipping 12 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
  532 |       return std::__invoke(static_cast<_Fp>(__f), __access::__base::__get_alt<_Is>(static_cast<_Vs>(__vs))...);
      |              ^
/Users/axonde/dev/itmo-script/src/interpreter/memory/memory.h:54:5: note: in instantiation of function template specialization 'std::variant<std::monostate, double, bool, std::string, std::unique_ptr<Memory::ListHolder>, std::unique_ptr<Memory::FuncHolder>>::variant<true, 0>' requested here
   54 |     HolderData(TYPES t) : type(t) {}
      |     ^
/Users/axonde/dev/itmo-script/src/interpreter/memory/memory.h:27:8: note: forward declaration of 'Memory::ListHolder'
   27 | struct ListHolder;
      |        ^
In file included from /Users/axonde/dev/itmo-script/src/interpreter/memory/memory.cpp:1:
In file included from /Users/axonde/dev/itmo-script/src/interpreter/memory/memory.h:2:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/functional:553:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/function.h:26:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:76:19: error: invalid application of 'sizeof' to an incomplete type 'Memory::FuncHolder'
   76 |     static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type");
      |                   ^~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:300:7: note: in instantiation of member function 'std::default_delete<Memory::FuncHolder>::operator()' requested here
  300 |       __deleter_(__tmp);
      |       ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/unique_ptr.h:269:71: note: in instantiation of member function 'std::unique_ptr<Memory::FuncHolder>::reset' requested here
  269 |   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 ~unique_ptr() { reset(); }
      |                                                                       ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/variant:660:29: note: in instantiation of member function 'std::unique_ptr<Memory::FuncHolder>::~unique_ptr' requested here
  660 | struct _LIBCPP_TEMPLATE_VIS __alt {
      |                             ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/variant:787:22: note: in implicit destructor for 'std::__variant_detail::__alt<5, std::unique_ptr<Memory::FuncHolder>>' first required here
  787 |               __alt.~__alt_type();
      |                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/invoke.h:176:10: note: in instantiation of function template specialization 'std::__variant_detail::__dtor<std::__variant_detail::__traits<std::monostate, double, bool, std::string, std::unique_ptr<Memory::ListHolder>, std::unique_ptr<Memory::FuncHolder>>>::__destroy()::(anonymous class)::operator()<std::__variant_detail::__alt<5, std::unique_ptr<Memory::FuncHolder>>>' requested here
  176 | decltype(std::declval<_Fp>()(std::declval<_Args>()...))
      |          ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/variant:532:14: note: (skipping 12 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
  532 |       return std::__invoke(static_cast<_Fp>(__f), __access::__base::__get_alt<_Is>(static_cast<_Vs>(__vs))...);
      |              ^
/Users/axonde/dev/itmo-script/src/interpreter/memory/memory.h:54:5: note: in instantiation of function template specialization 'std::variant<std::monostate, double, bool, std::string, std::unique_ptr<Memory::ListHolder>, std::unique_ptr<Memory::FuncHolder>>::variant<true, 0>' requested here
   54 |     HolderData(TYPES t) : type(t) {}
      |     ^
/Users/axonde/dev/itmo-script/src/interpreter/memory/memory.h:28:8: note: forward declaration of 'Memory::FuncHolder'
   28 | struct FuncHolder;
      |        ^
2 errors generated.
make[2]: *** [src/interpreter/memory/CMakeFiles/memory.dir/memory.cpp.o] Error 1
make[1]: *** [src/interpreter/memory/CMakeFiles/memory.dir/all] Error 2
make: *** [all] Error 2

I'm sure that this is related to new Clang compiler: i used Ventura AppleClang in the past, all works (but no CI was created hwvr to proove that?), and now I suddenly changed version by switching to new macOS (on Sequoia currently).

C++ apple compiler is not legacy-support anymore?
No, i think i've used an old hack which don't work now ;)

Will try to fix that when I'll have time

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions