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

Does it work on apple silicon ? #150

Closed
Jac-Zac opened this issue Apr 3, 2023 · 64 comments
Closed

Does it work on apple silicon ? #150

Jac-Zac opened this issue Apr 3, 2023 · 64 comments

Comments

@Jac-Zac
Copy link

Jac-Zac commented Apr 3, 2023

I'm on an M1 macbook and I was wondering if it works on apple silicon too. Because for some reason when I import cppyy I get this error:

>>> import cppyy
(Re-)building pre-compiled headers (options: -O2); this may take a minute ...
ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!
Invoking:
  LC_ALL=C /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++    -xc++ -E -v /dev/null 2>&1 | sed -n -e '/^.*include/,${' -e '/^ \/.*++/p' -e '}'
Results was:
With exit code 0
Warning: sysroot "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" not found (ignoring for now).input_line_1:1:10: fatal error: 'new' file not found
#include <new>
         ^~~~~
Warning in cling::IncrementalParser::CheckABICompatibility():
  Failed to extract C++ standard library version.
In file included from input_line_3:1:
In file included from ./include/RtypesCore.h:23:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stddef.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:32:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:81:2: warning: "Unsupported compiler detected" [-W#warnings]
#warning "Unsupported compiler detected"
 ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:913:2: error: Unsupported architecture
#error Unsupported architecture
 ^
In file included from input_line_3:1:
In file included from ./include/RtypesCore.h:23:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stddef.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:33:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h:36:2: error: architecture not supported
#error architecture not supported
 ^
In file included from input_line_3:1:
In file included from ./include/RtypesCore.h:23:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stddef.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:27:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'
typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'
typedef __int32_t       __darwin_blksize_t;     /* preferred block size */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'
typedef __int32_t       __darwin_dev_t;         /* dev_t */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'
typedef __uint32_t      __darwin_gid_t;         /* [???] process and group IDs */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'
typedef __uint32_t      __darwin_id_t;          /* [XSI] pid_t, uid_t, or gid_t*/
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'
typedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bit inodes */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'
typedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'
typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'
typedef __int32_t       __darwin_pid_t;         /* [???] process and group IDs */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'
typedef __uint32_t      __darwin_sigset_t;      /* [???] signal set */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'
typedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'
typedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'
typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
        ^
In file included from input_line_3:1:
In file included from ./include/RtypesCore.h:23:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stddef.h:69:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ptrdiff_t.h:31:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h:39:2: error: architecture not supported
#error architecture not supported
 ^
In file included from input_line_3:1:
In file included from ./include/RtypesCore.h:23:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stddef.h:69:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ptrdiff_t.h:32:9: error: unknown type name '__darwin_ptrdiff_t'
typedef __darwin_ptrdiff_t ptrdiff_t;
        ^
In file included from input_line_3:1:
In file included from ./include/RtypesCore.h:23:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stddef.h:72:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h:31:9: error: unknown type name '__darwin_size_t'
typedef __darwin_size_t        rsize_t;
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  libCling.so              0x000000010c83a2a4 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1  libCling.so              0x000000010c839354 llvm::sys::RunSignalHandlers() + 72
2  libCling.so              0x000000010c83a8e4 SignalHandler(int) + 304
3  libsystem_platform.dylib 0x0000000190a36a84 _sigtramp + 56
4  libCling.so              0x0000000109d34674 CppyyLegacy::TMetaUtils::TNormalizedCtxtImpl::TNormalizedCtxtImpl(cling::LookupHelper const&) + 112
5  libCling.so              0x0000000109d32db4 CppyyLegacy::TMetaUtils::TNormalizedCtxt::TNormalizedCtxt(cling::LookupHelper const&) + 44
6  libCling.so              0x0000000109de4a18 CppyyLegacy::TCling::TCling(char const*, char const*, char const* const*, void*) + 9396
7  libCling.so              0x0000000109ddee10 CreateInterpreter + 64
8  libCoreLegacy.so         0x0000000105782340 CppyyLegacy::TROOT::InitInterpreter() + 192
9  libCoreLegacy.so         0x0000000105782224 CppyyLegacy::Internal::GetROOT2() + 44
10 libCling.so              0x0000000109dc63a8 TCling__GetInterpreter + 76
11 libCling.so              0x0000000109d909c8 RootClingMain(int, char**, bool) + 15632
12 libCling.so              0x0000000109d9f940 ROOT_rootcling_Driver + 512
13 rootcling                0x0000000104dc7f44 main + 136
14 dyld                     0x00000001906aff28 start + 2236
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0.	Program arguments: ./bin/rootcling -rootbuild -generate-pch -f /var/folders/76/mm0_swqd58q3n62yt3xx20jw0000gn/T/allDict.cxx -noDictSelection -D__CLING__ -DROOT_PCH -I./include -I./etc -I./etc/dictpch -I./etc/cling -I/opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include -cxxflags "-std=c++2a -m64 -pipe -fsigned-char -fno-common -Qunused-arguments -pthread -stdlib=libc++" etc/dictpch/allHeaders.h etc/dictpch/allLinkDefs.h
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)
[/opt/homebrew/lib/python3.11/site-packages/cppyy_backend/lib/libCling.so] CppyyLegacy::TMetaUtils::TNormalizedCtxtImpl::TNormalizedCtxtImpl(cling::LookupHelper const&) (no debug info)
[/opt/homebrew/lib/python3.11/site-packages/cppyy_backend/lib/libCling.so] CppyyLegacy::TMetaUtils::TNormalizedCtxt::TNormalizedCtxt(cling::LookupHelper const&) (no debug info)
[/opt/homebrew/lib/python3.11/site-packages/cppyy_backend/lib/libCling.so] CppyyLegacy::TCling::TCling(char const*, char const*, char const* const*, void*) (no debug info)
[/opt/homebrew/lib/python3.11/site-packages/cppyy_backend/lib/libCling.so] CreateInterpreter (no debug info)
[/opt/homebrew/lib/python3.11/site-packages/cppyy_backend/lib/libCoreLegacy.so] CppyyLegacy::TROOT::InitInterpreter() (no debug info)
[/opt/homebrew/lib/python3.11/site-packages/cppyy_backend/lib/libCoreLegacy.so] CppyyLegacy::Internal::GetROOT2() (no debug info)
[/opt/homebrew/lib/python3.11/site-packages/cppyy_backend/lib/libCling.so] TCling__GetInterpreter (no debug info)
[/opt/homebrew/lib/python3.11/site-packages/cppyy_backend/lib/libCling.so] RootClingMain(int, char**, bool) (no debug info)
[/opt/homebrew/lib/python3.11/site-packages/cppyy_backend/lib/libCling.so] ROOT_rootcling_Driver (no debug info)
[/opt/homebrew/lib/python3.11/site-packages/cppyy_backend/bin/rootcling] main (no debug info)
[/usr/lib/dyld] start (no debug info)
/opt/homebrew/lib/python3.11/site-packages/cppyy_backend/loader.py:139: UserWarning: No precompiled header available (failed to build); this may impact performance.
  warnings.warn('No precompiled header available (%s); this may impact performance.' % msg)
ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!
Invoking:
  LC_ALL=C /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++    -xc++ -E -v /dev/null 2>&1 | sed -n -e '/^.*include/,${' -e '/^ \/.*++/p' -e '}'
Results was:
With exit code 0
Warning: sysroot "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" not found (ignoring for now).input_line_1:1:10: fatal error: 'new' file not found
#include <new>
         ^~~~~
Warning in cling::IncrementalParser::CheckABICompatibility():
  Failed to extract C++ standard library version.
Replaced symbol at_quick_exit cannot be found in JIT!
In file included from input_line_3:1:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Rtypes.h:22:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/RtypesCore.h:23:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stddef.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:32:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:81:2: warning: "Unsupported compiler detected" [-W#warnings]
#warning "Unsupported compiler detected"
 ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:913:2: error: Unsupported architecture
#error Unsupported architecture
 ^
In file included from input_line_3:1:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Rtypes.h:22:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/RtypesCore.h:23:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stddef.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:33:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h:36:2: error: architecture not supported
#error architecture not supported
 ^
In file included from input_line_3:1:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Rtypes.h:22:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/RtypesCore.h:23:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stddef.h:64:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:27:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'
typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'
typedef __int32_t       __darwin_blksize_t;     /* preferred block size */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'
typedef __int32_t       __darwin_dev_t;         /* dev_t */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'
typedef __uint32_t      __darwin_gid_t;         /* [???] process and group IDs */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'
typedef __uint32_t      __darwin_id_t;          /* [XSI] pid_t, uid_t, or gid_t*/
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'
typedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bit inodes */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'
typedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'
typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'
typedef __int32_t       __darwin_pid_t;         /* [???] process and group IDs */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'
typedef __uint32_t      __darwin_sigset_t;      /* [???] signal set */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'
typedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'
typedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'
typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
        ^
In file included from input_line_3:1:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Rtypes.h:22:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/RtypesCore.h:23:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stddef.h:69:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ptrdiff_t.h:31:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/types.h:39:2: error: architecture not supported
#error architecture not supported
 ^
In file included from input_line_3:1:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Rtypes.h:22:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/RtypesCore.h:23:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stddef.h:69:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ptrdiff_t.h:32:9: error: unknown type name '__darwin_ptrdiff_t'
typedef __darwin_ptrdiff_t ptrdiff_t;
        ^
In file included from input_line_3:1:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Rtypes.h:22:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/RtypesCore.h:23:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stddef.h:72:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h:31:9: error: unknown type name '__darwin_size_t'
typedef __darwin_size_t        rsize_t;
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)
[/opt/homebrew/lib/python3.11/site-packages/cppyy_backend/lib/libCling.so] CppyyLegacy::TMetaUtils::TNormalizedCtxtImpl::TNormalizedCtxtImpl(cling::LookupHelper const&) (no debug info)
[/opt/homebrew/lib/python3.11/site-packages/cppyy_backend/lib/libCling.so] CppyyLegacy::TMetaUtils::TNormalizedCtxt::TNormalizedCtxt(cling::LookupHelper const&) (no debug info)
[/opt/homebrew/lib/python3.11/site-packages/cppyy_backend/lib/libCling.so] CppyyLegacy::TCling::TCling(char const*, char const*, char const* const*, void*) (no debug info)
[/opt/homebrew/lib/python3.11/site-packages/cppyy_backend/lib/libCling.so] CreateInterpreter (no debug info)
[/opt/homebrew/lib/python3.11/site-packages/cppyy_backend/lib/libCoreLegacy.so] CppyyLegacy::TROOT::InitInterpreter() (no debug info)
[/opt/homebrew/lib/python3.11/site-packages/cppyy_backend/lib/libCoreLegacy.so] CppyyLegacy::Internal::GetROOT2() (no debug info)
[/opt/homebrew/lib/python3.11/site-packages/cppyy_backend/lib/libcppyy_backend.so] _GLOBAL__sub_I_clingwrapper.cxx (no debug info)
[/usr/lib/dyld] invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const::$_0::operator()() const (no debug info)
[/usr/lib/dyld] invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const (no debug info)
[/usr/lib/dyld] invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const (no debug info)
[/usr/lib/dyld] dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const (no debug info)
[/usr/lib/dyld] dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const (no debug info)
[/usr/lib/dyld] dyld3::MachOFile::forEachInitializerPointerSection(Diagnostics&, void (unsigned int, unsigned int, bool&) block_pointer) const (no debug info)
[/usr/lib/dyld] dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const (no debug info)
[/usr/lib/dyld] dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const (no debug info)
[/usr/lib/dyld] dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const (no debug info)
[/usr/lib/dyld] dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const::$_1::operator()() const (no debug info)
[/usr/lib/dyld] dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const (no debug info)
[/usr/lib/dyld] dyld4::APIs::dlopen_from(char const*, int, void*) (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/_ctypes.cpython-311-darwin.so] py_dl_open (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] cfunction_call (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] _PyObject_MakeTpCall (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_EvalFrameDefault (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_Vector (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] _PyObject_FastCallDictTstate (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] slot_tp_init (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] type_call (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] _PyObject_MakeTpCall (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_EvalFrameDefault (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] PyEval_EvalCode (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] builtin_exec (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] cfunction_vectorcall_FASTCALL_KEYWORDS (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_EvalFrameDefault (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_Vector (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] object_vacall (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] PyObject_CallMethodObjArgs (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] PyImport_ImportModuleLevelObject (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_EvalFrameDefault (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] PyEval_EvalCode (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] builtin_exec (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] cfunction_vectorcall_FASTCALL_KEYWORDS (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_EvalFrameDefault (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_Vector (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] object_vacall (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] PyObject_CallMethodObjArgs (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] PyImport_ImportModuleLevelObject (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] _PyEval_EvalFrameDefault (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] PyEval_EvalCode (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] run_eval_code_obj (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] run_mod (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] PyRun_InteractiveOneObjectEx (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] _PyRun_InteractiveLoopObject (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] _PyRun_AnyFileObject (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] PyRun_AnyFileExFlags (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] pymain_run_stdin (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] Py_RunMain (no debug info)
[/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Python] Py_BytesMain (no debug info)
[/usr/lib/dyld] start (no debug info)

I tried also installing Xcode but I still get an error. I also tried on another mac that wans't running apple silicon and it worked until I changed to a newer version of python that I installed with brew. Therefore I tried to run it on my mac on a virtual enviroment with the python that comes inlcuded which is Python 3.9.6 but it still didn't work. Maybe I'm missing something. If anyone needs other info I'll provide it. Thanks in advance

@wlav
Copy link
Owner

wlav commented Apr 3, 2023

cppyy requires a compiler, so in the case of MacOS, you need to install Xcode. Alternatively, use the conda port, https://anaconda.org/conda-forge/cppyy, although that's 2.4.0, not 3.0.0.

@Jac-Zac
Copy link
Author

Jac-Zac commented Apr 3, 2023

Oky but as I said I also tried with Xcode instead of just using the command lines tools but that doesn't solve the problems I still miss some libraries. And also an intel mac I managed to still get it to work with just the command lines tools the python that came with that computer, but also on that computer doing it with python3.11 didn't work. And I do not really know why

@wlav
Copy link
Owner

wlav commented Apr 3, 2023

Ah, I didn't read beyond the stack trace...

What does this command give:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++    -xc++ -E -v /dev/null 2>&1 | sed -n -e '/^.*include/,${' -e '/^ \/.*++/p' -e '}'

it should point to the standard C++ header files. For me, Apple M1, it gives:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1

As for Python versions, if you change it, the package needs to be reinstalled since one component, CPyCppyy, depends on the specific Python version it's build for.

@Jac-Zac
Copy link
Author

Jac-Zac commented Apr 3, 2023

Oky I get your same output, and I realized that the last time I installed Xcode I think I didn't reinstall all the dependencies for cppyy, but know when I try to do it I get this:

Collecting cppyy
  Downloading cppyy-3.0.0.tar.gz (27 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install backend dependencies did not run successfully.
  │ exit code: 1
  ╰─> [302 lines of output]
      Collecting cppyy-backend==1.14.11
        Downloading cppyy-backend-1.14.11.tar.gz (34 kB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'done'
      Collecting cppyy-cling==6.28.0
        Using cached cppyy_cling-6.28.0-py2.py3-none-macosx_11_0_arm64.whl (27.9 MB)
      Building wheels for collected packages: cppyy-backend
        Building wheel for cppyy-backend (pyproject.toml): started
        Building wheel for cppyy-backend (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error
      
        × Building wheel for cppyy-backend (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [278 lines of output]
            running bdist_wheel
            running build
            running build_ext
            checking for build/temp.macosx-13-arm64-cpython-311
            creating build/temp.macosx-13-arm64-cpython-311
            creating build/temp.macosx-13-arm64-cpython-311/src
            clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I//Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/private/var/folders/76/mm0_swqd58q3n62yt3xx20jw0000gn/T/pip-build-env-t4l6ito8/overlay/lib/python3.11/site-packages/cppyy_backend/include -I/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c src/clingwrapper.cxx -o build/temp.macosx-13-arm64-cpython-311/src/clingwrapper.o -O2 -stdlib=libc++ -D_REENTRANT -std=c++2a -m64
            In file included from src/clingwrapper.cxx:10:
            In file included from src/cpp_cppyy.h:5:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:474:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__algorithm/equal.h:15:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__iterator/distance.h:14:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__iterator/concepts.h:14:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__iterator/incrementable_traits.h:15:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/concepts:133:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__concepts/arithmetic.h:15:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/type_traits:421:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__functional/invoke.h:15:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__type_traits/apply_cv.h:16:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__type_traits/remove_reference.h:13:
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cstddef:50:9: error: no member named 'nullptr_t' in the global namespace
            using ::nullptr_t;
                  ~~^
            In file included from src/clingwrapper.cxx:10:
            In file included from src/cpp_cppyy.h:5:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:474:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__algorithm/equal.h:15:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__iterator/distance.h:14:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__iterator/concepts.h:14:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__iterator/incrementable_traits.h:15:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/concepts:133:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__concepts/arithmetic.h:15:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/type_traits:452:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__type_traits/is_compound.h:14:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__type_traits/is_fundamental.h:14:
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__type_traits/is_null_pointer.h:24:49: error: use of undeclared identifier 'nullptr_t'; did you mean 'nullptr'?
            template <>          struct __is_nullptr_t_impl<nullptr_t> : public true_type {};
                                                            ^
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__type_traits/is_null_pointer.h:24:49: error: template argument for template type parameter must be a type
            template <>          struct __is_nullptr_t_impl<nullptr_t> : public true_type {};
                                                            ^~~~~~~~~
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__type_traits/is_null_pointer.h:23:17: note: template parameter is declared here
            template <class _Tp> struct __is_nullptr_t_impl       : public false_type {};
                            ^
            In file included from src/clingwrapper.cxx:10:
            In file included from src/cpp_cppyy.h:5:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:848:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/allocator.h:18:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/new:94:
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/exception:149:45: error: field has incomplete type 'std::exception_ptr'
                _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {}
                                                        ^
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/exception:144:24: note: definition of 'std::exception_ptr' is not complete until the closing '}'
            class _LIBCPP_TYPE_VIS exception_ptr
                                   ^
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/exception:149:5: error: '__abi_tag__' attribute only applies to structs, variables, functions, and namespaces
                _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {}
                ^
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__config:689:37: note: expanded from macro '_LIBCPP_INLINE_VISIBILITY'
            #  define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
                                                ^
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__config:673:26: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI'
                      __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_VERSIONED_IDENTIFIER))))
                                     ^
            In file included from src/clingwrapper.cxx:10:
            In file included from src/cpp_cppyy.h:5:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:848:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/allocator.h:18:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/new:94:
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/exception:149:55: error: expected ';' at end of declaration list
                _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {}
                                                                  ^
            In file included from src/clingwrapper.cxx:10:
            In file included from src/cpp_cppyy.h:5:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:853:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/compressed_pair.h:16:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/tuple:227:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/utility:251:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/compare:145:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/compare_partial_order_fallback.h:13:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/partial_order.h:14:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/weak_order.h:14:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/strong_order.h:18:
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cmath:544:5: error: use of undeclared identifier '__promote'
                __promote<_A1, _A2, _A3>
                ^
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cmath:548:22: error: no template named '__promote'
                typedef typename __promote<_A1, _A2, _A3>::type __result_type;
                                 ^
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cmath:552:12: error: call to 'hypot' is ambiguous
                return hypot((__result_type)__lcpp_x, (__result_type)__lcpp_y, (__result_type)__lcpp_z);
                       ^~~~~
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cmath:533:46: note: candidate function
            inline _LIBCPP_INLINE_VISIBILITY float       hypot(       float __x,       float __y,       float __z ) { return sqrt(__x*__x + __y*__y + __z*__z); }
                                                         ^
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cmath:534:46: note: candidate function
            inline _LIBCPP_INLINE_VISIBILITY double      hypot(      double __x,      double __y,      double __z ) { return sqrt(__x*__x + __y*__y + __z*__z); }
                                                         ^
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cmath:535:46: note: candidate function
            inline _LIBCPP_INLINE_VISIBILITY long double hypot( long double __x, long double __y, long double __z ) { return sqrt(__x*__x + __y*__y + __z*__z); }
                                                         ^
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cmath:647:5: error: use of undeclared identifier '__promote'
                __promote<_A1, _A2, _A3>
                ^
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cmath:651:22: error: no template named '__promote'
                typedef typename __promote<_A1, _A2, _A3>::type __result_type;
                                 ^
            In file included from src/clingwrapper.cxx:10:
            In file included from src/cpp_cppyy.h:5:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:853:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/compressed_pair.h:16:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/tuple:227:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/utility:251:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/compare:145:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/compare_partial_order_fallback.h:13:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/partial_order.h:14:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/weak_order.h:14:
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/strong_order.h:68:35: error: expected unqualified-id
                                return _VSTD::signbit(__u) <=> _VSTD::signbit(__t);
                                              ^
            /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/math.h:170:5: note: expanded from macro 'signbit'
                ( sizeof(x) == sizeof(float)  ? __inline_signbitf((float)(x))        \
                ^
            In file included from src/clingwrapper.cxx:10:
            In file included from src/cpp_cppyy.h:5:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:853:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/compressed_pair.h:16:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/tuple:227:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/utility:251:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/compare:145:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/compare_partial_order_fallback.h:13:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/partial_order.h:14:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/weak_order.h:14:
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/strong_order.h:68:59: error: expected unqualified-id
                                return _VSTD::signbit(__u) <=> _VSTD::signbit(__t);
                                                                      ^
            /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/math.h:170:5: note: expanded from macro 'signbit'
                ( sizeof(x) == sizeof(float)  ? __inline_signbitf((float)(x))        \
                ^
            In file included from src/clingwrapper.cxx:10:
            In file included from src/cpp_cppyy.h:5:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:853:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/compressed_pair.h:16:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/tuple:227:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/utility:251:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/compare:145:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/compare_partial_order_fallback.h:13:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/partial_order.h:14:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/weak_order.h:14:
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/strong_order.h:73:44: error: expected unqualified-id
                                if (__t == 0 || _VSTD::isinf(__t)) {
                                                       ^
            /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/math.h:160:5: note: expanded from macro 'isinf'
                ( sizeof(x) == sizeof(float)  ? __inline_isinff((float)(x))          \
                ^
            In file included from src/clingwrapper.cxx:10:
            In file included from src/cpp_cppyy.h:5:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:853:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/compressed_pair.h:16:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/tuple:227:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/utility:251:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/compare:145:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/compare_partial_order_fallback.h:13:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/partial_order.h:14:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/weak_order.h:14:
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/strong_order.h:74:39: error: expected unqualified-id
                                    return _VSTD::signbit(__u) <=> _VSTD::signbit(__t);
                                                  ^
            /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/math.h:170:5: note: expanded from macro 'signbit'
                ( sizeof(x) == sizeof(float)  ? __inline_signbitf((float)(x))        \
                ^
            In file included from src/clingwrapper.cxx:10:
            In file included from src/cpp_cppyy.h:5:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:853:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/compressed_pair.h:16:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/tuple:227:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/utility:251:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/compare:145:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/compare_partial_order_fallback.h:13:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/partial_order.h:14:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/weak_order.h:14:
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/strong_order.h:74:63: error: expected unqualified-id
                                    return _VSTD::signbit(__u) <=> _VSTD::signbit(__t);
                                                                          ^
            /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/math.h:170:5: note: expanded from macro 'signbit'
                ( sizeof(x) == sizeof(float)  ? __inline_signbitf((float)(x))        \
                ^
            In file included from src/clingwrapper.cxx:10:
            In file included from src/cpp_cppyy.h:5:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:853:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/compressed_pair.h:16:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/tuple:227:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/utility:251:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/compare:145:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/compare_partial_order_fallback.h:13:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/partial_order.h:14:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/weak_order.h:14:
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/strong_order.h:85:42: error: expected unqualified-id
                            bool __t_is_nan = _VSTD::isnan(__t);
                                                     ^
            /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/math.h:165:5: note: expanded from macro 'isnan'
                ( sizeof(x) == sizeof(float)  ? __inline_isnanf((float)(x))          \
                ^
            In file included from src/clingwrapper.cxx:10:
            In file included from src/cpp_cppyy.h:5:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:853:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/compressed_pair.h:16:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/tuple:227:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/utility:251:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/compare:145:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/compare_partial_order_fallback.h:13:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/partial_order.h:14:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/weak_order.h:14:
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/strong_order.h:86:42: error: expected unqualified-id
                            bool __u_is_nan = _VSTD::isnan(__u);
                                                     ^
            /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/math.h:165:5: note: expanded from macro 'isnan'
                ( sizeof(x) == sizeof(float)  ? __inline_isnanf((float)(x))          \
                ^
            In file included from src/clingwrapper.cxx:10:
            In file included from src/cpp_cppyy.h:5:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:853:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/compressed_pair.h:16:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/tuple:227:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/utility:251:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/compare:145:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/compare_partial_order_fallback.h:13:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/partial_order.h:14:
            In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/weak_order.h:14:
            /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/strong_order.h:87:47: error: expected unqualified-id
                            bool __t_is_negative = _VSTD::signbit(__t);
                                                          ^
            /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/math.h:170:5: note: expanded from macro 'signbit'
                ( sizeof(x) == sizeof(float)  ? __inline_signbitf((float)(x))        \
                ^
            fatal error: too many errors emitted, stopping now [-ferror-limit=]
            clang: error: unable to execute command: Segmentation fault: 11
            clang: error: clang frontend command failed due to signal (use -v to see invocation)
            Apple clang version 14.0.3 (clang-1403.0.22.14.1)
            Target: arm64-apple-darwin22.4.0
            Thread model: posix
            InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
            clang: note: diagnostic msg:
            ********************
      
            PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
            Preprocessed source(s) and associated run script(s) are located at:
            clang: note: diagnostic msg: /var/folders/76/mm0_swqd58q3n62yt3xx20jw0000gn/T/clingwrapper-48ac6b.cpp
            clang: note: diagnostic msg: /var/folders/76/mm0_swqd58q3n62yt3xx20jw0000gn/T/clingwrapper-48ac6b.sh
            clang: note: diagnostic msg: Crash backtrace is located in
            clang: note: diagnostic msg: /Users/jaczac/Library/Logs/DiagnosticReports/clang_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
            clang: note: diagnostic msg: (choose the .crash file that corresponds to your crash)
            clang: note: diagnostic msg:
      
            ********************
            error: command '/usr/bin/clang' failed with exit code 254
            [end of output]
      
        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for cppyy-backend
      Failed to build cppyy-backend
      ERROR: Could not build wheels for cppyy-backend, which is required to install pyproject.toml-based projects
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install backend dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

Thus I guess I'm doing something wrong at this point but I do not know what

@wlav
Copy link
Owner

wlav commented Apr 3, 2023

Interesting, as it's still doing nothing more than including standard headers, and finding fault with them. Can you roll back the C++ version used for building clingwrapper? Like so:

STDCXX=17 python -m pip install cppyy

Which will build using C++17 rather than C++20.

@Jac-Zac
Copy link
Author

Jac-Zac commented Apr 3, 2023

Yeah I still get this error: ```

STDCXX=17 python3 -m pip install cppyy
Collecting cppyy
Using cached cppyy-3.0.0.tar.gz (27 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... error
error: subprocess-exited-with-error

× pip subprocess to install backend dependencies did not run successfully.
│ exit code: 1
╰─> [219 lines of output]
Collecting cppyy-cling==6.28.0
Using cached cppyy_cling-6.28.0-py2.py3-none-macosx_11_0_arm64.whl (27.9 MB)
Collecting cppyy-backend==1.14.11
Using cached cppyy-backend-1.14.11.tar.gz (34 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: cppyy-backend
Building wheel for cppyy-backend (pyproject.toml): started
Building wheel for cppyy-backend (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error

    × Building wheel for cppyy-backend (pyproject.toml) did not run successfully.
    │ exit code: 1
    ╰─> [195 lines of output]
        running bdist_wheel
        running build
        running build_ext
        checking for build/temp.macosx-13-arm64-cpython-311
        creating build/temp.macosx-13-arm64-cpython-311
        creating build/temp.macosx-13-arm64-cpython-311/src
        clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I//Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/private/var/folders/76/mm0_swqd58q3n62yt3xx20jw0000gn/T/pip-build-env-6ifpegga/overlay/lib/python3.11/site-packages/cppyy_backend/include -I/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c src/clingwrapper.cxx -o build/temp.macosx-13-arm64-cpython-311/src/clingwrapper.o -O2 -stdlib=libc++ -D_REENTRANT --std=c++1z -m64
        In file included from src/clingwrapper.cxx:10:
        In file included from src/cpp_cppyy.h:5:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:474:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__algorithm/equal.h:15:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__iterator/distance.h:14:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__iterator/concepts.h:14:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__iterator/incrementable_traits.h:15:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/concepts:133:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__concepts/arithmetic.h:15:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/type_traits:421:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__functional/invoke.h:15:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__type_traits/apply_cv.h:16:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__type_traits/remove_reference.h:13:
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cstddef:50:9: error: no member named 'nullptr_t' in the global namespace
        using ::nullptr_t;
              ~~^
        In file included from src/clingwrapper.cxx:10:
        In file included from src/cpp_cppyy.h:5:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:474:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__algorithm/equal.h:15:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__iterator/distance.h:14:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__iterator/concepts.h:14:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__iterator/incrementable_traits.h:15:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/concepts:133:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__concepts/arithmetic.h:15:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/type_traits:452:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__type_traits/is_compound.h:14:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__type_traits/is_fundamental.h:14:
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__type_traits/is_null_pointer.h:24:49: error: use of undeclared identifier 'nullptr_t'; did you mean 'nullptr'?
        template <>          struct __is_nullptr_t_impl<nullptr_t> : public true_type {};
                                                        ^
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__type_traits/is_null_pointer.h:24:49: error: template argument for template type parameter must be a type
        template <>          struct __is_nullptr_t_impl<nullptr_t> : public true_type {};
                                                        ^~~~~~~~~
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__type_traits/is_null_pointer.h:23:17: note: template parameter is declared here
        template <class _Tp> struct __is_nullptr_t_impl       : public false_type {};
                        ^
        In file included from src/clingwrapper.cxx:10:
        In file included from src/cpp_cppyy.h:5:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:848:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/allocator.h:18:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/new:94:
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/exception:149:45: error: field has incomplete type 'std::exception_ptr'
            _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {}
                                                    ^
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/exception:144:24: note: definition of 'std::exception_ptr' is not complete until the closing '}'
        class _LIBCPP_TYPE_VIS exception_ptr
                               ^
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/exception:149:5: error: '__abi_tag__' attribute only applies to structs, variables, functions, and namespaces
            _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {}
            ^
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__config:689:37: note: expanded from macro '_LIBCPP_INLINE_VISIBILITY'
        #  define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
                                            ^
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__config:673:26: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI'
                  __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_VERSIONED_IDENTIFIER))))
                                 ^
        In file included from src/clingwrapper.cxx:10:
        In file included from src/cpp_cppyy.h:5:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:848:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/allocator.h:18:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/new:94:
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/exception:149:55: error: expected ';' at end of declaration list
            _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {}
                                                              ^
        In file included from src/clingwrapper.cxx:10:
        In file included from src/cpp_cppyy.h:5:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:853:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/compressed_pair.h:16:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/tuple:227:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/utility:251:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/compare:145:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/compare_partial_order_fallback.h:13:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/partial_order.h:14:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/weak_order.h:14:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/strong_order.h:18:
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cmath:544:5: error: use of undeclared identifier '__promote'
            __promote<_A1, _A2, _A3>
            ^
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cmath:548:22: error: no template named '__promote'
            typedef typename __promote<_A1, _A2, _A3>::type __result_type;
                             ^
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cmath:552:12: error: call to 'hypot' is ambiguous
            return hypot((__result_type)__lcpp_x, (__result_type)__lcpp_y, (__result_type)__lcpp_z);
                   ^~~~~
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cmath:533:46: note: candidate function
        inline _LIBCPP_INLINE_VISIBILITY float       hypot(       float __x,       float __y,       float __z ) { return sqrt(__x*__x + __y*__y + __z*__z); }
                                                     ^
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cmath:534:46: note: candidate function
        inline _LIBCPP_INLINE_VISIBILITY double      hypot(      double __x,      double __y,      double __z ) { return sqrt(__x*__x + __y*__y + __z*__z); }
                                                     ^
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cmath:535:46: note: candidate function
        inline _LIBCPP_INLINE_VISIBILITY long double hypot( long double __x, long double __y, long double __z ) { return sqrt(__x*__x + __y*__y + __z*__z); }
                                                     ^
        In file included from src/clingwrapper.cxx:10:
        In file included from src/cpp_cppyy.h:5:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:860:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/shared_ptr.h:28:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/unique_ptr.h:14:
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__functional/hash.h:646:34: error: use of undeclared identifier 'nullptr_t'; did you mean 'nullptr'?
        struct _LIBCPP_TEMPLATE_VIS hash<nullptr_t>
                                         ^
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__functional/hash.h:646:34: error: template argument for template type parameter must be a type
        struct _LIBCPP_TEMPLATE_VIS hash<nullptr_t>
                                         ^~~~~~~~~
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__functional/hash.h:638:17: note: template parameter is declared here
        template <class _Tp>
                        ^
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__functional/hash.h:647:29: error: use of undeclared identifier 'nullptr_t'; did you mean 'nullptr'?
          : public __unary_function<nullptr_t, size_t>
                                    ^
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__functional/hash.h:647:29: error: template argument for template type parameter must be a type
          : public __unary_function<nullptr_t, size_t>
                                    ^~~~~~~~~
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__functional/unary_function.h:41:17: note: template parameter is declared here
        template <class _Arg, class _Result>
                        ^
        In file included from src/clingwrapper.cxx:10:
        In file included from src/cpp_cppyy.h:5:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:860:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/shared_ptr.h:28:
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/unique_ptr.h:173:3: error: non-static data member cannot be constexpr; did you intend to make it const?
          _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
          ^
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__config:728:31: note: expanded from macro '_LIBCPP_CONSTEXPR'
        #    define _LIBCPP_CONSTEXPR constexpr
                                      ^
        In file included from src/clingwrapper.cxx:10:
        In file included from src/cpp_cppyy.h:5:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:860:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/shared_ptr.h:28:
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/unique_ptr.h:173:32: error: member 'nullptr_t' declared as a template
          _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
                                       ^
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/unique_ptr.h:173:42: error: expected ';' at end of declaration list
          _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
                                                 ^
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/unique_ptr.h:262:25: error: unknown type name 'nullptr_t'
          unique_ptr& operator=(nullptr_t) _NOEXCEPT {
                                ^
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/unique_ptr.h:395:3: error: non-static data member cannot be constexpr; did you intend to make it const?
          _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
          ^
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__config:728:31: note: expanded from macro '_LIBCPP_CONSTEXPR'
        #    define _LIBCPP_CONSTEXPR constexpr
                                      ^
        In file included from src/clingwrapper.cxx:10:
        In file included from src/cpp_cppyy.h:5:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:860:
        In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/shared_ptr.h:28:
        /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/unique_ptr.h:395:32: error: member 'nullptr_t' declared as a template
          _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
                                       ^
        fatal error: too many errors emitted, stopping now [-ferror-limit=]
        clang: error: unable to execute command: Segmentation fault: 11
        clang: error: clang frontend command failed due to signal (use -v to see invocation)
        Apple clang version 14.0.3 (clang-1403.0.22.14.1)
        Target: arm64-apple-darwin22.4.0
        Thread model: posix
        InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
        clang: note: diagnostic msg:
        ********************
  
        PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
        Preprocessed source(s) and associated run script(s) are located at:
        clang: note: diagnostic msg: /var/folders/76/mm0_swqd58q3n62yt3xx20jw0000gn/T/clingwrapper-f090d8.cpp
        clang: note: diagnostic msg: /var/folders/76/mm0_swqd58q3n62yt3xx20jw0000gn/T/clingwrapper-f090d8.sh
        clang: note: diagnostic msg: Crash backtrace is located in
        clang: note: diagnostic msg: /Users/jaczac/Library/Logs/DiagnosticReports/clang_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
        clang: note: diagnostic msg: (choose the .crash file that corresponds to your crash)
        clang: note: diagnostic msg:
  
        ********************
        error: command '/usr/bin/clang' failed with exit code 254
        [end of output]
  
    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for cppyy-backend
  Failed to build cppyy-backend
  ERROR: Could not build wheels for cppyy-backend, which is required to install pyproject.toml-based projects
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install backend dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

@Jac-Zac
Copy link
Author

Jac-Zac commented Apr 3, 2023

what version of python are you using ?

@Jac-Zac
Copy link
Author

Jac-Zac commented Apr 3, 2023

Maybe I should also try to delete the command line tools and re install them, this is the version I'm using btw
Screenshot 2023-04-03 at 18 51 14

@wlav
Copy link
Owner

wlav commented Apr 3, 2023

what version of python are you using ?

I use different versions on different platforms. On my M1 laptop, it defaults to 3.8. However, that has nothing to do with this error: this is purely a C++ build.

Is it possible to compile something simple:

#include <set>          // this include seems to cause the error
std::set<int> gSet;    // make sure the compiler generates code

save the above in a file, test.cxx say, and then:

clang++ -c -fPIC -std=c++2a -stdlib=libc++ test.cxx -o test.o

and if that works, try:

clang++ -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I//Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -c -fPIC -std=c++2a -stdlib=libc++ test.cxx -o test.o

I'm wondering whether there's a mismatch between the version of clang available through $PATH and the standard headers selected with -isysroot. If so, the second command would fail with the first succeeding.

@Jac-Zac
Copy link
Author

Jac-Zac commented Apr 4, 2023

Yes, indeed compiling it like in the first example work and doing it like in the second one gives me this error:

In file included from test.cxx:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:474:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__algorithm/equal.h:15:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__iterator/distance.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__iterator/concepts.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__iterator/incrementable_traits.h:15:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/concepts:133:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__concepts/arithmetic.h:15:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/type_traits:421:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__functional/invoke.h:15:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__type_traits/apply_cv.h:16:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__type_traits/remove_reference.h:13:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cstddef:50:9: error: no member named 'nullptr_t' in the global namespace
using ::nullptr_t;
      ~~^
In file included from test.cxx:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:474:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__algorithm/equal.h:15:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__iterator/distance.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__iterator/concepts.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__iterator/incrementable_traits.h:15:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/concepts:133:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__concepts/arithmetic.h:15:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/type_traits:452:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__type_traits/is_compound.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__type_traits/is_fundamental.h:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__type_traits/is_null_pointer.h:24:49: error: use of undeclared identifier 'nullptr_t'; did you mean 'nullptr'?
template <>          struct __is_nullptr_t_impl<nullptr_t> : public true_type {};
                                                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__type_traits/is_null_pointer.h:24:49: error: template argument for template type parameter must be a type
template <>          struct __is_nullptr_t_impl<nullptr_t> : public true_type {};
                                                ^~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__type_traits/is_null_pointer.h:23:17: note: template parameter is declared here
template <class _Tp> struct __is_nullptr_t_impl       : public false_type {};
                ^
In file included from test.cxx:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:848:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/allocator.h:18:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/new:94:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/exception:149:45: error: field has incomplete type 'std::exception_ptr'
    _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {}
                                            ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/exception:144:24: note: definition of 'std::exception_ptr' is not complete until the closing '}'
class _LIBCPP_TYPE_VIS exception_ptr
                       ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/exception:149:5: error: '__abi_tag__' attribute only applies to structs, variables, functions, and namespaces
    _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {}
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__config:689:37: note: expanded from macro '_LIBCPP_INLINE_VISIBILITY'
#  define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
                                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__config:673:26: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI'
          __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_VERSIONED_IDENTIFIER))))
                         ^
In file included from test.cxx:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:848:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/allocator.h:18:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/new:94:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/exception:149:55: error: expected ';' at end of declaration list
    _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {}
                                                      ^
In file included from test.cxx:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:853:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/compressed_pair.h:16:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/tuple:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/utility:251:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/compare:145:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/compare_partial_order_fallback.h:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/partial_order.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/weak_order.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/strong_order.h:18:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cmath:544:5: error: use of undeclared identifier '__promote'
    __promote<_A1, _A2, _A3>
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cmath:548:22: error: no template named '__promote'
    typedef typename __promote<_A1, _A2, _A3>::type __result_type;
                     ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cmath:552:12: error: call to 'hypot' is ambiguous
    return hypot((__result_type)__lcpp_x, (__result_type)__lcpp_y, (__result_type)__lcpp_z);
           ^~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cmath:533:46: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY float       hypot(       float __x,       float __y,       float __z ) { return sqrt(__x*__x + __y*__y + __z*__z); }
                                             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cmath:534:46: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY double      hypot(      double __x,      double __y,      double __z ) { return sqrt(__x*__x + __y*__y + __z*__z); }
                                             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cmath:535:46: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long double hypot( long double __x, long double __y, long double __z ) { return sqrt(__x*__x + __y*__y + __z*__z); }
                                             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cmath:647:5: error: use of undeclared identifier '__promote'
    __promote<_A1, _A2, _A3>
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/cmath:651:22: error: no template named '__promote'
    typedef typename __promote<_A1, _A2, _A3>::type __result_type;
                     ^
In file included from test.cxx:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:853:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/compressed_pair.h:16:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/tuple:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/utility:251:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/compare:145:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/compare_partial_order_fallback.h:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/partial_order.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/weak_order.h:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/strong_order.h:68:35: error: expected unqualified-id
                    return _VSTD::signbit(__u) <=> _VSTD::signbit(__t);
                                  ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/math.h:170:5: note: expanded from macro 'signbit'
    ( sizeof(x) == sizeof(float)  ? __inline_signbitf((float)(x))        \
    ^
In file included from test.cxx:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:853:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/compressed_pair.h:16:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/tuple:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/utility:251:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/compare:145:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/compare_partial_order_fallback.h:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/partial_order.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/weak_order.h:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/strong_order.h:68:59: error: expected unqualified-id
                    return _VSTD::signbit(__u) <=> _VSTD::signbit(__t);
                                                          ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/math.h:170:5: note: expanded from macro 'signbit'
    ( sizeof(x) == sizeof(float)  ? __inline_signbitf((float)(x))        \
    ^
In file included from test.cxx:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:853:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/compressed_pair.h:16:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/tuple:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/utility:251:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/compare:145:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/compare_partial_order_fallback.h:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/partial_order.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/weak_order.h:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/strong_order.h:73:44: error: expected unqualified-id
                    if (__t == 0 || _VSTD::isinf(__t)) {
                                           ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/math.h:160:5: note: expanded from macro 'isinf'
    ( sizeof(x) == sizeof(float)  ? __inline_isinff((float)(x))          \
    ^
In file included from test.cxx:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:853:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/compressed_pair.h:16:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/tuple:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/utility:251:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/compare:145:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/compare_partial_order_fallback.h:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/partial_order.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/weak_order.h:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/strong_order.h:74:39: error: expected unqualified-id
                        return _VSTD::signbit(__u) <=> _VSTD::signbit(__t);
                                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/math.h:170:5: note: expanded from macro 'signbit'
    ( sizeof(x) == sizeof(float)  ? __inline_signbitf((float)(x))        \
    ^
In file included from test.cxx:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:853:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/compressed_pair.h:16:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/tuple:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/utility:251:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/compare:145:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/compare_partial_order_fallback.h:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/partial_order.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/weak_order.h:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/strong_order.h:74:63: error: expected unqualified-id
                        return _VSTD::signbit(__u) <=> _VSTD::signbit(__t);
                                                              ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/math.h:170:5: note: expanded from macro 'signbit'
    ( sizeof(x) == sizeof(float)  ? __inline_signbitf((float)(x))        \
    ^
In file included from test.cxx:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:853:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/compressed_pair.h:16:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/tuple:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/utility:251:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/compare:145:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/compare_partial_order_fallback.h:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/partial_order.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/weak_order.h:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/strong_order.h:85:42: error: expected unqualified-id
                bool __t_is_nan = _VSTD::isnan(__t);
                                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/math.h:165:5: note: expanded from macro 'isnan'
    ( sizeof(x) == sizeof(float)  ? __inline_isnanf((float)(x))          \
    ^
In file included from test.cxx:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:853:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/compressed_pair.h:16:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/tuple:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/utility:251:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/compare:145:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/compare_partial_order_fallback.h:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/partial_order.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/weak_order.h:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/strong_order.h:86:42: error: expected unqualified-id
                bool __u_is_nan = _VSTD::isnan(__u);
                                         ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/math.h:165:5: note: expanded from macro 'isnan'
    ( sizeof(x) == sizeof(float)  ? __inline_isnanf((float)(x))          \
    ^
In file included from test.cxx:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/set:483:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__node_handle:63:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/memory:853:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__memory/compressed_pair.h:16:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/tuple:227:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/utility:251:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/compare:145:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/compare_partial_order_fallback.h:13:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/partial_order.h:14:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/weak_order.h:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/c++/v1/__compare/strong_order.h:87:47: error: expected unqualified-id
                bool __t_is_negative = _VSTD::signbit(__t);
                                              ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/math.h:170:5: note: expanded from macro 'signbit'
    ( sizeof(x) == sizeof(float)  ? __inline_signbitf((float)(x))        \
    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

@Jac-Zac
Copy link
Author

Jac-Zac commented Apr 4, 2023

Btw If I run xcrun --show-sdk-path I get this:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

And then I can compile it with:

clang++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I//Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -c -fPIC -std=c++2a -stdlib=libc++ test.cxx -o test.o 

which indeed works

@Jac-Zac
Copy link
Author

Jac-Zac commented Apr 4, 2023

Also by doing: sudo rm -rf /Library/Developer/CommandLineTools after having installed xcode then I can run: xcode-select -p and get:

/Applications/Xcode.app/Contents/Developer

If I do this I can compile the code and also compile cppyy but when I import it I get:

>>> import cppyy
(Re-)building pre-compiled headers (options: -O2); this may take a minute ...
In file included from input_line_10:9:
In file included from ./etc/dictpch/allHeaders.h:373:
./include/TClassEdit.h:29:10: fatal error: 'cxxabi.h' file not found
#include <cxxabi.h>
         ^~~~~~~~~~
Error: ./bin/rootcling: compilation failure (/var/folders/76/mm0_swqd58q3n62yt3xx20jw0000gn/T/allDict040962f179_dictUmbrella.h)
/opt/homebrew/lib/python3.11/site-packages/cppyy_backend/loader.py:139: UserWarning: No precompiled header available (failed to build); this may impact performance.
  warnings.warn('No precompiled header available (%s); this may impact performance.' % msg)
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:938:29: error: constructor for 'std::filesystem::path' must explicitly initialize the member '__pn_' which does not have a default constructor
  _LIBCPP_INLINE_VISIBILITY path() noexcept {}
                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1512:15: note: member is declared here
  string_type __pn_;
              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:693:5: note: 'std::string' declared here
    basic_string
    ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1003:11: error: no member named 'clear' in 'std::string'
    __pn_.clear();
    ~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1011:11: error: no member named 'clear' in 'std::string'
    __pn_.clear();
    ~~~~~ ^
In file included from input_line_3:1:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Rtypes.h:179:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/TGenericClassInfo.h:15:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:655:72: error: no member named 'value' in 'std::is_convertible<const char &, std::string_view>'
      is_convertible<const _Tp&, basic_string_view<_CharT, _Traits> >::value &&
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1012:13: note: in instantiation of template class 'std::__can_be_converted_to_string_view<char, std::char_traits<char>, char>' requested here
            __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1060:13: note: while substituting deduced template arguments into function template 'operator+=' [with _Tp = char]
      __pn_ += preferred_separator;
            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1060:13: error: no viable overloaded '+='
      __pn_ += preferred_separator;
      ~~~~~ ^  ~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = char]
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'const std::filesystem::path::value_type' (aka 'const char') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1061:11: error: no viable overloaded '+='
    __pn_ += __p.native();
    ~~~~~ ^  ~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = std::string]: no member named 'value' in 'std::__can_be_converted_to_string_view<char, std::char_traits<char>, std::string>'
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'const std::filesystem::path::string_type' (aka 'const basic_string<char>') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1080:13: error: no member named 'clear' in 'std::string'
      __pn_.clear();
      ~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1082:13: error: no viable overloaded '+='
      __pn_ += preferred_separator;
      ~~~~~ ^  ~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = char]
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'const std::filesystem::path::value_type' (aka 'const char') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1093:13: error: no member named 'clear' in 'std::string'
      __pn_.clear();
      ~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1095:13: error: no viable overloaded '+='
      __pn_ += preferred_separator;
      ~~~~~ ^  ~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = char]
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'const std::filesystem::path::value_type' (aka 'const char') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1104:11: error: no viable overloaded '+='
    __pn_ += __x.__pn_;
    ~~~~~ ^  ~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = std::string]: no member named 'value' in 'std::__can_be_converted_to_string_view<char, std::char_traits<char>, std::string>'
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'const std::filesystem::path::string_type' (aka 'const basic_string<char>') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1110:11: error: no viable overloaded '+='
    __pn_ += __x;
    ~~~~~ ^  ~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = std::string]: no member named 'value' in 'std::__can_be_converted_to_string_view<char, std::char_traits<char>, std::string>'
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'const std::filesystem::path::string_type' (aka 'const basic_string<char>') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:655:72: error: no member named 'value' in 'std::is_convertible<const std::string_view &, std::string_view>'
      is_convertible<const _Tp&, basic_string_view<_CharT, _Traits> >::value &&
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1012:13: note: in instantiation of template class 'std::__can_be_converted_to_string_view<char, std::char_traits<char>, std::string_view>' requested here
            __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1116:11: note: while substituting deduced template arguments into function template 'operator+=' [with _Tp = std::string_view]
    __pn_ += __x;
          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1116:11: error: no viable overloaded '+='
    __pn_ += __x;
    ~~~~~ ^  ~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = std::string_view]
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'std::filesystem::path::__string_view' (aka 'basic_string_view<char>') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1122:11: error: no viable overloaded '+='
    __pn_ += __x;
    ~~~~~ ^  ~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = const char *]: no member named 'value' in 'std::__can_be_converted_to_string_view<char, std::char_traits<char>, const char *>'
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'const std::filesystem::path::value_type *' (aka 'const char *') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1128:11: error: no viable overloaded '+='
    __pn_ += __x;
    ~~~~~ ^  ~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = char]
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'std::filesystem::path::value_type' (aka 'char') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1160:33: error: no member named 'clear' in 'std::string'
  void clear() noexcept { __pn_.clear(); }
                          ~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1172:18: error: no member named 'empty' in 'std::string_view'
    if (!__fname.empty())
         ~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1173:27: error: no member named 'data' in 'std::string_view'
      __pn_.erase(__fname.data() - __pn_.data());
                  ~~~~~~~ ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:938:29: error: constructor for 'std::filesystem::path' must explicitly initialize the member '__pn_' which does not have a default constructor
  _LIBCPP_INLINE_VISIBILITY path() noexcept {}
                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1512:15: note: member is declared here
  string_type __pn_;
              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:693:5: note: 'std::string' declared here
    basic_string
    ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1003:11: error: no member named 'clear' in 'std::string'
    __pn_.clear();
    ~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1011:11: error: no member named 'clear' in 'std::string'
    __pn_.clear();
    ~~~~~ ^
In file included from input_line_3:1:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Rtypes.h:179:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/TGenericClassInfo.h:15:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:655:72: error: no member named 'value' in 'std::is_convertible<const char &, std::string_view>'
      is_convertible<const _Tp&, basic_string_view<_CharT, _Traits> >::value &&
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1012:13: note: in instantiation of template class 'std::__can_be_converted_to_string_view<char, std::char_traits<char>, char>' requested here
            __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1060:13: note: while substituting deduced template arguments into function template 'operator+=' [with _Tp = char]
      __pn_ += preferred_separator;
            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1060:13: error: no viable overloaded '+='
      __pn_ += preferred_separator;
      ~~~~~ ^  ~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = char]
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'const std::filesystem::path::value_type' (aka 'const char') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1061:11: error: no viable overloaded '+='
    __pn_ += __p.native();
    ~~~~~ ^  ~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = std::string]: no member named 'value' in 'std::__can_be_converted_to_string_view<char, std::char_traits<char>, std::string>'
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'const std::filesystem::path::string_type' (aka 'const basic_string<char>') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1080:13: error: no member named 'clear' in 'std::string'
      __pn_.clear();
      ~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1082:13: error: no viable overloaded '+='
      __pn_ += preferred_separator;
      ~~~~~ ^  ~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = char]
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'const std::filesystem::path::value_type' (aka 'const char') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1093:13: error: no member named 'clear' in 'std::string'
      __pn_.clear();
      ~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1095:13: error: no viable overloaded '+='
      __pn_ += preferred_separator;
      ~~~~~ ^  ~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = char]
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'const std::filesystem::path::value_type' (aka 'const char') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1104:11: error: no viable overloaded '+='
    __pn_ += __x.__pn_;
    ~~~~~ ^  ~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = std::string]: no member named 'value' in 'std::__can_be_converted_to_string_view<char, std::char_traits<char>, std::string>'
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'const std::filesystem::path::string_type' (aka 'const basic_string<char>') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1110:11: error: no viable overloaded '+='
    __pn_ += __x;
    ~~~~~ ^  ~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = std::string]: no member named 'value' in 'std::__can_be_converted_to_string_view<char, std::char_traits<char>, std::string>'
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'const std::filesystem::path::string_type' (aka 'const basic_string<char>') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:655:72: error: no member named 'value' in 'std::is_convertible<const std::string_view &, std::string_view>'
      is_convertible<const _Tp&, basic_string_view<_CharT, _Traits> >::value &&
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1012:13: note: in instantiation of template class 'std::__can_be_converted_to_string_view<char, std::char_traits<char>, std::string_view>' requested here
            __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1116:11: note: while substituting deduced template arguments into function template 'operator+=' [with _Tp = std::string_view]
    __pn_ += __x;
          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1116:11: error: no viable overloaded '+='
    __pn_ += __x;
    ~~~~~ ^  ~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = std::string_view]
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'std::filesystem::path::__string_view' (aka 'basic_string_view<char>') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1122:11: error: no viable overloaded '+='
    __pn_ += __x;
    ~~~~~ ^  ~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = const char *]: no member named 'value' in 'std::__can_be_converted_to_string_view<char, std::char_traits<char>, const char *>'
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'const std::filesystem::path::value_type *' (aka 'const char *') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1128:11: error: no viable overloaded '+='
    __pn_ += __x;
    ~~~~~ ^  ~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = char]
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'std::filesystem::path::value_type' (aka 'char') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1160:33: error: no member named 'clear' in 'std::string'
  void clear() noexcept { __pn_.clear(); }
                          ~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1172:18: error: no member named 'empty' in 'std::string_view'
    if (!__fname.empty())
         ~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1173:27: error: no member named 'data' in 'std::string_view'
      __pn_.erase(__fname.data() - __pn_.data());
                  ~~~~~~~ ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:938:29: error: constructor for 'std::filesystem::path' must explicitly initialize the member '__pn_' which does not have a default constructor
  _LIBCPP_INLINE_VISIBILITY path() noexcept {}
                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1512:15: note: member is declared here
  string_type __pn_;
              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:693:5: note: 'std::string' declared here
    basic_string
    ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1003:11: error: no member named 'clear' in 'std::string'
    __pn_.clear();
    ~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1011:11: error: no member named 'clear' in 'std::string'
    __pn_.clear();
    ~~~~~ ^
In file included from input_line_3:1:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Rtypes.h:179:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/TGenericClassInfo.h:15:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:655:72: error: no member named 'value' in 'std::is_convertible<const char &, std::string_view>'
      is_convertible<const _Tp&, basic_string_view<_CharT, _Traits> >::value &&
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1012:13: note: in instantiation of template class 'std::__can_be_converted_to_string_view<char, std::char_traits<char>, char>' requested here
            __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1060:13: note: while substituting deduced template arguments into function template 'operator+=' [with _Tp = char]
      __pn_ += preferred_separator;
            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1060:13: error: no viable overloaded '+='
      __pn_ += preferred_separator;
      ~~~~~ ^  ~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = char]
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'const std::filesystem::path::value_type' (aka 'const char') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1061:11: error: no viable overloaded '+='
    __pn_ += __p.native();
    ~~~~~ ^  ~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = std::string]: no member named 'value' in 'std::__can_be_converted_to_string_view<char, std::char_traits<char>, std::string>'
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'const std::filesystem::path::string_type' (aka 'const basic_string<char>') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1080:13: error: no member named 'clear' in 'std::string'
      __pn_.clear();
      ~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1082:13: error: no viable overloaded '+='
      __pn_ += preferred_separator;
      ~~~~~ ^  ~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = char]
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'const std::filesystem::path::value_type' (aka 'const char') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1093:13: error: no member named 'clear' in 'std::string'
      __pn_.clear();
      ~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1095:13: error: no viable overloaded '+='
      __pn_ += preferred_separator;
      ~~~~~ ^  ~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = char]
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'const std::filesystem::path::value_type' (aka 'const char') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1104:11: error: no viable overloaded '+='
    __pn_ += __x.__pn_;
    ~~~~~ ^  ~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = std::string]: no member named 'value' in 'std::__can_be_converted_to_string_view<char, std::char_traits<char>, std::string>'
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'const std::filesystem::path::string_type' (aka 'const basic_string<char>') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1110:11: error: no viable overloaded '+='
    __pn_ += __x;
    ~~~~~ ^  ~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = std::string]: no member named 'value' in 'std::__can_be_converted_to_string_view<char, std::char_traits<char>, std::string>'
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'const std::filesystem::path::string_type' (aka 'const basic_string<char>') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:655:72: error: no member named 'value' in 'std::is_convertible<const std::string_view &, std::string_view>'
      is_convertible<const _Tp&, basic_string_view<_CharT, _Traits> >::value &&
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1012:13: note: in instantiation of template class 'std::__can_be_converted_to_string_view<char, std::char_traits<char>, std::string_view>' requested here
            __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1116:11: note: while substituting deduced template arguments into function template 'operator+=' [with _Tp = std::string_view]
    __pn_ += __x;
          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1116:11: error: no viable overloaded '+='
    __pn_ += __x;
    ~~~~~ ^  ~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = std::string_view]
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'std::filesystem::path::__string_view' (aka 'basic_string_view<char>') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1122:11: error: no viable overloaded '+='
    __pn_ += __x;
    ~~~~~ ^  ~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = const char *]: no member named 'value' in 'std::__can_be_converted_to_string_view<char, std::char_traits<char>, const char *>'
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'const std::filesystem::path::value_type *' (aka 'const char *') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1128:11: error: no viable overloaded '+='
    __pn_ += __x;
    ~~~~~ ^  ~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1016:45: note: candidate template ignored: substitution failure [with _Tp = char]
                                            operator+=(const _Tp& __t)            {__self_view __sv = __t; return append(__sv);}
                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1020:45: note: candidate function not viable: no known conversion from 'std::filesystem::path::value_type' (aka 'char') to 'initializer_list<char>' for 1st argument
    _LIBCPP_INLINE_VISIBILITY basic_string& operator+=(initializer_list<value_type> __il) {return append(__il);}
                                            ^
In file included from libCoreLegacy dictionary payload:7:
In file included from /opt/homebrew/lib/python3.11/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1160:33: error: no member named 'clear' in 'std::string'
  void clear() noexcept { __pn_.clear(); }
                          ~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1172:18: error: no member named 'empty' in 'std::string_view'
    if (!__fname.empty())
         ~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:1173:27: error: no member named 'data' in 'std::string_view'
      __pn_.erase(__fname.data() - __pn_.data());
                  ~~~~~~~ ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/homebrew/lib/python3.11/site-packages/cppyy/__init__.py", line 80, in <module>
    from ._cpython_cppyy import *
  File "/opt/homebrew/lib/python3.11/site-packages/cppyy/_cpython_cppyy.py", line 181, in <module>
    add_default_paths()
  File "/opt/homebrew/lib/python3.11/site-packages/cppyy/_cpython_cppyy.py", line 159, in add_default_paths
    gSystem = gbl.gSystem
              ^^^^^^^^^^^
AttributeError: <namespace cppyy.gbl at 0x12cfd4060> has no attribute 'gSystem'. Full details:
  type object '' has no attribute 'gSystem'
  'gSystem' is not a known C++ class
  'gSystem' is not a known C++ template
  'gSystem' is not a known C++ enum

@Jac-Zac
Copy link
Author

Jac-Zac commented Apr 6, 2023

If anyone can help me or give me suggestions of things to try It would be really appreciated

@limjcst
Copy link

limjcst commented Apr 7, 2023

I encounter a similar situation.
cppyy invokes /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++, which does not exist.
In my case, /Library/Developer/CommandLineTools/usr/bin/c++ is available.

The first path above presents in venv/lib/python3.10/site-packages/cppyy_backend/include/compiledata.h.
Hence, I try to reinstall cppyy-cling from source, after which, I can successfully import cppyy.

@Jac-Zac
Copy link
Author

Jac-Zac commented Apr 7, 2023

How did you compile it from source I try running this: STDCXX=17 MAKE_NPROCS=32 pip3 install --verbose cppyy --no-binary=cppyy-cling but I got an error and also when I tried from the cling backhand directory I got an error. This is the end of the error I got from the former:

              1 warning generated.
              19 warnings generated.
              [ 98%] Built target ClingUtils
              1 warning generated.
              1 warning generated.
              [ 98%] Built target Dictgen
              [ 98%] Building CXX object core/rootcling_stage1/CMakeFiles/rootcling_stage1.dir/src/rootcling_stage1.cxx.o
              [ 98%] Linking CXX executable src/rootcling_stage1
              [ 98%] Built target rootcling_stage1
              [ 98%] Generating G__CoreLegacy.cxx, ../lib/libCoreLegacy.rootmap
              In file included from input_line_8:58:
              /private/var/folders/76/mm0_swqd58q3n62yt3xx20jw0000gn/T/pip-install-6jidj38k/cppyy-cling_bddd1e65e2c84954a4019db963204873/builddir/include/TClassEdit.h:29:10: fatal error: 'cxxabi.h' file not found
              #include <cxxabi.h>
                       ^~~~~~~~~~
              Error: /private/var/folders/76/mm0_swqd58q3n62yt3xx20jw0000gn/T/pip-install-6jidj38k/cppyy-cling_bddd1e65e2c84954a4019db963204873/builddir/core/rootcling_stage1/src/rootcling_stage1: compilation failure (/private/var/folders/76/mm0_swqd58q3n62yt3xx20jw0000gn/T/pip-install-6jidj38k/cppyy-cling_bddd1e65e2c84954a4019db963204873/builddir/lib/libCoreLegacy0f2b2b13da_dictUmbrella.h)
              gmake[2]: *** [core/CMakeFiles/G__CoreLegacy.dir/build.make:267: core/G__CoreLegacy.cxx] Error 1
              gmake[1]: *** [CMakeFiles/Makefile2:28898: core/CMakeFiles/G__CoreLegacy.dir/all] Error 2
              gmake[1]: *** Waiting for unfinished jobs....
              17 warnings generated.
              [ 98%] Built target MetaCling
              gmake: *** [Makefile:156: all] Error 2
              error: Failed to build cppyy-cling
              [end of output]
              In file included from /private/var/folders/76/mm0_swqd58q3n62yt3xx20jw0000gn/T/pip
          note: This error originates from a subprocess, and is likely not a problem with pip.
          ERROR: Failed building wheel for cppyy-cling
        Failed to build cppyy-cling
        ERROR: Could not build wheels for cppyy-cling, which is required to install pyproject.toml-based projects
        [end of output]
CppyyLegacy::TObject *&>' is deprecated [-Wdeprecated-declarations]
    note: This error originates from a subprocess, and is likely not a problem with pip.
  error: subprocess-exited-with-error
              /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDK
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
              struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 iterator
  note: This error originates from a subprocess, and is likely not a problem with pip.
  error: subprocess-exited-with-error
  
  × pip subprocess to install backend dependencies did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /Users/jaczac/Github/micrograd_cpp/env/bin/python3.11 /Users/jaczac/Github/micrograd_cpp/env/lib/python3.11/site-packages/pip/__pip-runner__.py install --ignore-installed --no-user --prefix /private/var/folders/76/mm0_swqd58q3n62yt3xx20jw0000gn/T/pip-build-env-yonef46_/normal --no-warn-script-location --no-binary cppyy-cling --only-binary :none: -i https://pypi.org/simple -- cppyy-cling==6.28.0 cppyy-backend==1.14.11
  cwd: [inherit]
  Installing backend dependencies ... error
error: subprocess-exited-with-error

× pip subprocess to install backend dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.```

@Jac-Zac
Copy link
Author

Jac-Zac commented Apr 7, 2023

Inside this directory: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1 I have the cxxabi.h file btw

@limjcst
Copy link

limjcst commented Apr 8, 2023

How did you compile it from source

To reinstall cppyy-cling from source, I just execute pip install --no-binary cppyy-cling cppyy within a virtual environment.

I have no idea about your situation. :(
Following is part of my environment for reference.

limjcst@BendeMacBook-Air ~ % xcrun --show-sdk-path
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
limjcst@BendeMacBook-Air ~ % xcode-select -p
/Library/Developer/CommandLineTools
limjcst@BendeMacBook-Air ~ % clang --version
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: arm64-apple-darwin22.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
limjcst@BendeMacBook-Air ~ % c++ --version
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: arm64-apple-darwin22.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
limjcst@BendeMacBook-Air ~ % /Library/Developer/CommandLineTools/usr/bin/c++ --version
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: arm64-apple-darwin22.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

@Jac-Zac
Copy link
Author

Jac-Zac commented Apr 8, 2023

Oky no problem I get the same output but corresponding to the Xcode innstallation directory:

xcrun --show-sdk-path     
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

xcode-select -p
/Applications/Xcode.app/Contents/Developer

clang --version
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

c++ --version
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ --version 
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

@Jac-Zac
Copy link
Author

Jac-Zac commented Apr 10, 2023

This is the error I'm getting btw if anyone knows how to solve it please let me know: ```
pip3 install --no-binary cppyy-cling cppyy --no-cache-dir

DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at pypa/pip#11453
Collecting cppyy
Downloading cppyy-3.0.0.tar.gz (27 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... error
error: subprocess-exited-with-error

× pip subprocess to install backend dependencies did not run successfully.
│ exit code: 1
╰─> [2185 lines of output]
DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at pypa/pip#11453
Collecting cppyy-cling==6.28.0
Using cached cppyy-cling-6.28.0.tar.gz (56.9 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting cppyy-backend==1.14.11
Using cached cppyy-backend-1.14.11.tar.gz (34 kB)
Installing build dependencies: started
Installing build dependencies: still running...
Installing build dependencies: finished with status 'error'
error: subprocess-exited-with-error

    × pip subprocess to install build dependencies did not run successfully.
    │ exit code: 1
    ╰─> [2156 lines of output]
        DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at https://github.com/pypa/pip/issues/11453
        Collecting cppyy-cling==6.28.0
          Using cached cppyy-cling-6.28.0.tar.gz (56.9 MB)
          Installing build dependencies: started
          Installing build dependencies: finished with status 'done'
          Getting requirements to build wheel: started
          Getting requirements to build wheel: finished with status 'done'
          Preparing metadata (pyproject.toml): started
          Preparing metadata (pyproject.toml): finished with status 'done'
        Collecting setuptools
          Using cached setuptools-67.6.1-py3-none-any.whl (1.1 MB)
        Collecting wheel
          Using cached wheel-0.40.0-py3-none-any.whl (64 kB)
        Building wheels for collected packages: cppyy-cling
          Building wheel for cppyy-cling (pyproject.toml): started
          Building wheel for cppyy-cling (pyproject.toml): still running...
          Building wheel for cppyy-cling (pyproject.toml): finished with status 'error'
          error: subprocess-exited-with-error
  
          × Building wheel for cppyy-cling (pyproject.toml) did not run successfully.
          │ exit code: 1
          ╰─> [2128 lines of output]
              running bdist_wheel
              running build
              running build_py
              creating build
              creating build/lib
              creating build/lib/cppyy_backend
              copying python/cppyy_backend/bindings_utils.py -> build/lib/cppyy_backend
              copying python/cppyy_backend/_version.py -> build/lib/cppyy_backend
              copying python/cppyy_backend/_cppyy_generator.py -> build/lib/cppyy_backend
              copying python/cppyy_backend/_get_cppflags.py -> build/lib/cppyy_backend
              copying python/cppyy_backend/_cling_config.py -> build/lib/cppyy_backend
              copying python/cppyy_backend/__init__.py -> build/lib/cppyy_backend
              copying python/cppyy_backend/loader.py -> build/lib/cppyy_backend
              copying python/cppyy_backend/_genreflex.py -> build/lib/cppyy_backend
              copying python/cppyy_backend/_rootcling.py -> build/lib/cppyy_backend
              creating build/lib/cppyy_backend/cmake
              copying python/cppyy_backend/cmake/FindLibClang.cmake -> build/lib/cppyy_backend/cmake
              copying python/cppyy_backend/cmake/FindCppyy.cmake -> build/lib/cppyy_backend/cmake
              creating build/lib/cppyy_backend/pkg_templates
              copying python/cppyy_backend/pkg_templates/test_bindings.py.in -> build/lib/cppyy_backend/pkg_templates
              copying python/cppyy_backend/pkg_templates/MANIFEST.in.in -> build/lib/cppyy_backend/pkg_templates
              copying python/cppyy_backend/pkg_templates/__init__.py.in -> build/lib/cppyy_backend/pkg_templates
              copying python/cppyy_backend/pkg_templates/setup.cfg.in -> build/lib/cppyy_backend/pkg_templates
              copying python/cppyy_backend/pkg_templates/setup.py.in -> build/lib/cppyy_backend/pkg_templates
              copying python/cppyy_backend/pkg_templates/initializor.py -> build/lib/cppyy_backend/pkg_templates
              Now building cppyy-cling
              Creating build directory /private/var/folders/76/mm0_swqd58q3n62yt3xx20jw0000gn/T/pip-install-cl4ukwdd/cppyy-cling_9985743c5cf446b99cc030ff0f3322f0/builddir ...
              Running cmake for cppyy-cling: cmake /private/var/folders/76/mm0_swqd58q3n62yt3xx20jw0000gn/T/pip-install-cl4ukwdd/cppyy-cling_9985743c5cf446b99cc030ff0f3322f0/src -Wno-dev -DCMAKE_CXX_STANDARD=20 -DLLVM_ENABLE_TERMINFO=0 -DLLVM_ENABLE_ASSERTIONS=0 -Dminimal=ON -Dbuiltin_cling=ON -Druntime_cxxmodules=OFF -Dbuiltin_zlib=ON -Dlibcxx=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_TARGETS_TO_BUILD=ARM;AArch64;NVPTX -DCMAKE_INSTALL_PREFIX=/private/var/folders/76/mm0_swqd58q3n62yt3xx20jw0000gn/T/pip-install-cl4ukwdd/cppyy-cling_9985743c5cf446b99cc030ff0f3322f0/builddir/install/cppyy_backend
              -- The C compiler identification is AppleClang 14.0.3.14030022
              -- The CXX compiler identification is AppleClang 14.0.3.14030022
              -- Detecting C compiler ABI info
              -- Detecting C compiler ABI info - done
              -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
              -- Detecting C compile features
              -- Detecting C compile features - done
              -- Detecting CXX compiler ABI info
              -- Detecting CXX compiler ABI info - done
              -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
              -- Detecting CXX compile features
              -- Detecting CXX compile features - done
              -- Found Git: /opt/homebrew/bin/git (found version "2.40.0")
              -- Looking for Python
              -- Found Python3: /Users/jaczac/Github/micrograd_cpp/env/bin/python3.11 (found version "3.11.2") found components: Interpreter Development NumPy Development.Module Development.Embed
              -- Could NOT find Python2 (missing: Python2_EXECUTABLE Python2_INCLUDE_DIRS Python2_LIBRARIES Python2_NumPy_INCLUDE_DIRS Interpreter Development NumPy Development.Module Development.Embed)
                  Reason given by package:
                      Interpreter: Wrong major version for the interpreter "/Users/jaczac/Github/micrograd_cpp/env/bin/python"
  
              -- ROOT default compression algorithm: zlib
              -- Performing Test HAS_LIBCXX11
              -- Performing Test HAS_LIBCXX11 - Success
              -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
              -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
              -- Found Threads: TRUE
              -- Found a Mac OS X System 13.3
              -- Found a 64bit system
              -- Found LLVM compiler collection
              -- Performing Test GLIBCXX_USE_CXX11_ABI
              -- Performing Test GLIBCXX_USE_CXX11_ABI - Failed
              -- Build Platform: macosx
              -- Build Compiler: AppleClang 14.0.3.14030022
              -- Build Processor: arm64
              -- Build Architecture: macosx64
              -- Build Type: 'RelWithDebInfo' (flags = '-O2 -g -DNDEBUG')
              -- Compiler Flags:  -std=c++20 -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size -Wloop-analysis -Wbool-conversion -m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -pthread -stdlib=libc++ -O2 -g -DNDEBUG
              -- Performing Test ROOT_HAVE_CXX_ATOMICS_WITHOUT_LIB
              -- Performing Test ROOT_HAVE_CXX_ATOMICS_WITHOUT_LIB - Success
              -- Building LLVM in 'Release' mode.
              -- The ASM compiler identification is Clang with GNU-like command-line
              -- Found assembler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
              -- Found libtool - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool
              -- Found LibXml2: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/lib/libxml2.tbd (found version "2.9.13")
              -- Looking for backtrace
              -- Looking for backtrace - found
              -- backtrace facility detected in default set of libraries
              -- Found Backtrace: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include
              -- Native target architecture is AArch64
              -- Threads disabled.
              -- Doxygen disabled.
              -- Go bindings disabled.
              -- Found ld64 - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
              -- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
              -- OCaml bindings disabled.
              -- Could NOT find Python module pygments
              -- Could NOT find Python module pygments.lexers.c_cpp
              -- Could NOT find Python module yaml
              -- LLVM host triple: arm64-apple-darwin22.4.0
              -- LLVM default target triple: arm64-apple-darwin22.4.0
              -- Building with -fPIC
              -- Found Python3: /Users/jaczac/Github/micrograd_cpp/env/bin/python3.11 (found suitable version "3.11.2", minimum required is "3.0") found components: Interpreter
              -- Linker detection: ld64
              -- Targeting ARM
              -- Targeting AArch64
              -- Targeting NVPTX
              -- Clang version: 13.0.0
              -- Host linker version: 857.1
              -- Not building amdgpu-arch: hsa-runtime64 not found
              -- Cling version (from VERSION file): ROOT_1.0~dev
              -- Cling will look for C++ headers in '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1' at runtime.
              -- And if not found, will invoke: '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ ' for them.
              -- Performing Test __result
              -- Performing Test __result - Failed
              -- Performing Test CXX_HAS_fno_rtti
              -- Performing Test CXX_HAS_fno_rtti - Success
              -- Performing Test CXX_HAS_Wno_conditional_uninitialized
              -- Performing Test CXX_HAS_Wno_conditional_uninitialized - Success
              -- Performing Test found_setresuid
              -- Performing Test found_setresuid - Failed
              -- Performing Test found_stdstringview
              -- Performing Test found_stdstringview - Success
              -- Performing Test found_stod_stringview
              -- Performing Test found_stod_stringview - Failed
              -- Performing Test found_opplusequal_stringview
              -- Performing Test found_opplusequal_stringview - Success
              -- Performing Test found_stdapply
              -- Performing Test found_stdapply - Success
              -- Performing Test found_stdinvoke
              -- Performing Test found_stdinvoke - Success
              -- Performing Test found_stdindexsequence
              -- Performing Test found_stdindexsequence - Success
              -- Performing Test found_attribute_always_inline
              -- Performing Test found_attribute_always_inline - Success
              -- Performing Test has_found_attribute_noinline
              -- Performing Test has_found_attribute_noinline - Success
              Running /private/var/folders/76/mm0_swqd58q3n62yt3xx20jw0000gn/T/pip-install-cl4ukwdd/cppyy-cling_9985743c5cf446b99cc030ff0f3322f0/src/build/unix/compiledata.sh
              Making /private/var/folders/76/mm0_swqd58q3n62yt3xx20jw0000gn/T/pip-install-cl4ukwdd/cppyy-cling_9985743c5cf446b99cc030ff0f3322f0/builddir/include/compiledata.h
              -- Configuring done (17.0s)
              -- Generating done (2.0s)

@wlav
Copy link
Owner

wlav commented Apr 10, 2023

Sorry, a lot to catch up; I've been out of it for a bit.

I'm not sure whether compiling from scratch is a good idea, since although yes, the build paths are also saved, it's the system compiler that's still queried for the system paths to set sysroot.

The missing #include <cxxabi.h> may be due to Cling not seeing it, rather than the compiler (Clang) not seeing the file, which would go back to the original error of sysroot not pointing to the correct place.

The problem with cmake looking for Python2 is something that crept into the update from upstream. It has since been removed from repo master (and 3.0.1, once it gets released).

Rather than building from scratch, can you add the necessary paths to the EXTRA_CLING_ARGS envar? So something like:

$ export EXTRA_CLING_ARGS='-O2 -isysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk'

Or add any necessary paths with -I<path>?

@Jac-Zac
Copy link
Author

Jac-Zac commented Apr 10, 2023

Ah no worry. I tried exporting what you said but it still didn't work and also doing this:

Python 3.11.2 (main, Feb 16 2023, 02:55:59) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cppyy
(Re-)building pre-compiled headers (options:-O2 -isysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1); this may take a minute ...
In file included from input_line_10:9:
In file included from ./etc/dictpch/allHeaders.h:373:
./include/TClassEdit.h:29:10: fatal error: 'cxxabi.h' file not found
#include <cxxabi.h>
         ^~~~~~~~~~

I keep on getting this error even though the file is litteraly in that directory:

file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cxxabi.h 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cxxabi.h: C++ source text, ASCII text

@wlav
Copy link
Owner

wlav commented Apr 10, 2023

If pointing to the exact directory, use -I, not -sysroot.

@Jac-Zac
Copy link
Author

Jac-Zac commented Apr 10, 2023

Ah sorry my fault indeed if I: export EXTRA_CLING_ARGS='-O2 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1'

It finds the file but I get a different error:

python3
Python 3.11.2 (main, Feb 16 2023, 02:55:59) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cppyy
(Re-)building pre-compiled headers (options:-O2  -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1); this may take a minute ...
In file included from input_line_1:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/new:93:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cstdlib:86:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/stdlib.h:148:34: error: unknown type name 'ldiv_t'
inline _LIBCPP_INLINE_VISIBILITY ldiv_t div(long __x, long __y) _NOEXCEPT {
                                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/stdlib.h:149:12: error: no member named 'ldiv' in the global namespace
  return ::ldiv(__x, __y);
         ~~^

@brizzbuzz
Copy link

hey 👋 running up against the same problems, anyone have a solution?

@brizzbuzz
Copy link

btw nprocs=32 ate the cpu (on my pretty beefy m1 mac), so everyone be careful w/ the copy pasta ;)

Screenshot 2023-05-17 at 3 21 56 PM

@wlav
Copy link
Owner

wlav commented May 17, 2023

Yes, nprocs=32 is just an example. :) By default, it will use all cores, making nprocs superfluous.

As for a solution, no: without a reproducer, I can't think of any. I use my Mac M1 as a development platform and I haven't encountered this problem yet ...

There must be something fundamentally different, maybe multiple SDKs installed or some version differences or other, but I have no clue on how to start debugging that.

@yanedge
Copy link

yanedge commented May 31, 2023

Fails on m2 for me with this

./include/TClassEdit.h:29:10: fatal error: 'cxxabi.h' file not found
#include <cxxabi.h>

then

  File "/Users/y/.pyenv/versions/3.9.13/lib/python3.9/site-packages/cppyy/__init__.py", line 80, in <module>
    from ._cpython_cppyy import *
  File "/Users/y/.pyenv/versions/3.9.13/lib/python3.9/site-packages/cppyy/_cpython_cppyy.py", line 181, in <module>
    add_default_paths()
  File "/Users/y/.pyenv/versions/3.9.13/lib/python3.9/site-packages/cppyy/_cpython_cppyy.py", line 159, in add_default_paths
    gSystem = gbl.gSystem
AttributeError: <namespace cppyy.gbl at 0x11a1c9300> has no attribute 'gSystem'. Full details:
  type object '' has no attribute 'gSystem'
  'gSystem' is not a known C++ class
  'gSystem' is not a known C++ template
  'gSystem' is not a known C++ enum

@mouse07410
Copy link

Fails for me too, om Apple Silicon M2.

Any idea how to fix it, or any workaround?

@wlav
Copy link
Owner

wlav commented Jul 19, 2023

A possible workaround is to set the SDKROOT envar to point to the SDK in use. For example:

export SDKROOT=`xcrun --show-sdk-path`

For an actual fix, I'd need to be able to reproduce it first, which so far, I've been unable to. :(

@ZelnickB
Copy link

ZelnickB commented Aug 2, 2023

I think that it's related (or at least worth looking at in the context of the other comments), especially since the title of the issue explicitly asks if it works on ARM.

@wlav
Copy link
Owner

wlav commented Aug 2, 2023

It does work on ARM: I'm developing on an M1. :) Works fine, except for exception thrown from JITed code.

Both issues reported here are something with the build environment, and the two build environments are different. The Ubuntu case fails to compile the code; the X-code one fails to find the location of the headers at run-time (but builds fine).

I can't reproduce the problem on M1; haven't tried yet on Ubuntu.

@vincyty
Copy link

vincyty commented Aug 2, 2023

Tried many different things, and finally this works on my M1:

STDCXX=17 python -m pip install --no-binary cppyy-cling cppyy --no-cache-dir

@yanedge
Copy link

yanedge commented Aug 3, 2023

got the error fatal error: 'cxxabi.h' file not found during pip.

If I just do pip install cppyy, it installs fine, but hits the cxxabi.h error during import.

Tried many different things, and finally this works on my M1:

STDCXX=17 python -m pip install --no-binary cppyy-cling cppyy --no-cache-dir

@vincyty
Copy link

vincyty commented Aug 4, 2023

in my case, I tried to install cppyy then realized it needs xcode.
So i downloaded xcode and tried pip install cppyy again, which didn't show me error and I ran into same error 'cxxabi.h' file not found.

I also tried setting EXTRA_CLING_ARGS to different things, and xcode-select --switch to different path, then ran into different errors.
Finally I removed cppyy-cling and cppyy with pip then installed again with mentioned command, and that did the magic.

Current config is:

$ xcrun --show-sdk-path
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
$ xcode-select -p
/Library/Developer/CommandLineTools
$ python --version
Python 3.10.12

and I am using venv

@wlav
Copy link
Owner

wlav commented Aug 4, 2023

Thank you, that's an interesting one:

$ xcrun --show-sdk-path
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk

is a completely different location than what I have:

$ xcrun --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

The point being that this portion ".app/Contents/Developer" is hard-coded in Clang: https://github.com/apple/llvm-project/blob/next/clang/lib/Driver/ToolChains/Darwin.cpp#L1342

That still doesn't explain why setting SDKROOT doesn't work, of course (https://github.com/apple/llvm-project/blob/next/clang/lib/Driver/ToolChains/Darwin.cpp#L2331), but this is the first time I think I've got a lead.

@vincyty
Copy link

vincyty commented Aug 11, 2023

got the error fatal error: 'cxxabi.h' file not found during pip.

If I just do pip install cppyy, it installs fine, but hits the cxxabi.h error during import.

Tried many different things, and finally this works on my M1:
STDCXX=17 python -m pip install --no-binary cppyy-cling cppyy --no-cache-dir

Try $sudo xcode-select --switch /Library/Developer/CommandLineTools then pip install using the said command again, that's more likely to help

@mouse07410
Copy link

No good. On either x86_64 or Silicon.

$ xcrun --show-sdk-path
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
$ 
$ pip install -U cppyy
Defaulting to user installation because normal site-packages is not writeable
Collecting cppyy
  Downloading cppyy-3.0.0.tar.gz (27 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting CPyCppyy==1.12.13 (from cppyy)
  Downloading CPyCppyy-1.12.13.tar.gz (207 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 207.1/207.1 kB 988.0 kB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting cppyy-backend==1.14.11 (from cppyy)
  Using cached cppyy_backend-1.14.11-py2.py3-none-macosx_13_0_x86_64.whl
Collecting cppyy-cling==6.28.0 (from cppyy)
  Using cached cppyy_cling-6.28.0-py2.py3-none-macosx_10_12_x86_64.whl (30.0 MB)
Building wheels for collected packages: cppyy, CPyCppyy
  Building wheel for cppyy (pyproject.toml) ... done
  Created wheel for cppyy: filename=cppyy-3.0.0-py3-none-any.whl size=26135 sha256=a82b6795b489541400eee8c6ec50147f66314015fa5471040020e6e467adb01e
  Stored in directory: /Users/ur20980/Library/Caches/pip/wheels/3a/c0/45/9d1c8a1ee38b178e7e14d591c1dd8ac97e01229fdff31fce5c
  Building wheel for CPyCppyy (pyproject.toml) ... done
  Created wheel for CPyCppyy: filename=CPyCppyy-1.12.13-cp311-cp311-macosx_13_0_x86_64.whl size=376007 sha256=0a5c0debd43cb8253a46ed47fbf18815a486248f3b2378500163771caa6a5d7e
  Stored in directory: /Users/ur20980/Library/Caches/pip/wheels/fd/23/41/b7ac4b000e7c7a41a24e76a1b9e76f8fb5297694ebdd744e58
Successfully built cppyy CPyCppyy
Installing collected packages: cppyy-cling, cppyy-backend, CPyCppyy, cppyy
Successfully installed CPyCppyy-1.12.13 cppyy-3.0.0 cppyy-backend-1.14.11 cppyy-cling-6.28.0
$ python
Python 3.11.4 (main, Jun 10 2023, 10:30:46) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cppyy
(Re-)building pre-compiled headers (options: -O2 -march=native); this may take a minute ...
In file included from input_line_10:9:
In file included from ./etc/dictpch/allHeaders.h:373:
./include/TClassEdit.h:29:10: fatal error: 'cxxabi.h' file not found
#include <cxxabi.h>
         ^~~~~~~~~~
Error: ./bin/rootcling: compilation failure (/var/folders/_l/4q83bg9j5ysb7qd1n9xpnb4h0000gn/T/allDict544a6929bb_dictUmbrella.h)
/Users/ur20980/Library/Python/3.11/lib/python/site-packages/cppyy_backend/loader.py:139: UserWarning: No precompiled header available (failed to build); this may impact performance.
  warnings.warn('No precompiled header available (%s); this may impact performance.' % msg)
In file included from libCoreLegacy dictionary payload:7:
In file included from /Users/ur20980/Library/Python/3.11/lib/python/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:938:29: error: constructor for 'std::filesystem::path' must explicitly initialize the member '__pn_' which does not have a default constructor
.  .  .

@vincyty
Copy link

vincyty commented Aug 23, 2023

No good. On either x86_64 or Silicon.

$ xcrun --show-sdk-path
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
$ 
$ pip install -U cppyy
Defaulting to user installation because normal site-packages is not writeable
Collecting cppyy
  Downloading cppyy-3.0.0.tar.gz (27 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting CPyCppyy==1.12.13 (from cppyy)
  Downloading CPyCppyy-1.12.13.tar.gz (207 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 207.1/207.1 kB 988.0 kB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting cppyy-backend==1.14.11 (from cppyy)
  Using cached cppyy_backend-1.14.11-py2.py3-none-macosx_13_0_x86_64.whl
Collecting cppyy-cling==6.28.0 (from cppyy)
  Using cached cppyy_cling-6.28.0-py2.py3-none-macosx_10_12_x86_64.whl (30.0 MB)
Building wheels for collected packages: cppyy, CPyCppyy
  Building wheel for cppyy (pyproject.toml) ... done
  Created wheel for cppyy: filename=cppyy-3.0.0-py3-none-any.whl size=26135 sha256=a82b6795b489541400eee8c6ec50147f66314015fa5471040020e6e467adb01e
  Stored in directory: /Users/ur20980/Library/Caches/pip/wheels/3a/c0/45/9d1c8a1ee38b178e7e14d591c1dd8ac97e01229fdff31fce5c
  Building wheel for CPyCppyy (pyproject.toml) ... done
  Created wheel for CPyCppyy: filename=CPyCppyy-1.12.13-cp311-cp311-macosx_13_0_x86_64.whl size=376007 sha256=0a5c0debd43cb8253a46ed47fbf18815a486248f3b2378500163771caa6a5d7e
  Stored in directory: /Users/ur20980/Library/Caches/pip/wheels/fd/23/41/b7ac4b000e7c7a41a24e76a1b9e76f8fb5297694ebdd744e58
Successfully built cppyy CPyCppyy
Installing collected packages: cppyy-cling, cppyy-backend, CPyCppyy, cppyy
Successfully installed CPyCppyy-1.12.13 cppyy-3.0.0 cppyy-backend-1.14.11 cppyy-cling-6.28.0
$ python
Python 3.11.4 (main, Jun 10 2023, 10:30:46) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cppyy
(Re-)building pre-compiled headers (options: -O2 -march=native); this may take a minute ...
In file included from input_line_10:9:
In file included from ./etc/dictpch/allHeaders.h:373:
./include/TClassEdit.h:29:10: fatal error: 'cxxabi.h' file not found
#include <cxxabi.h>
         ^~~~~~~~~~
Error: ./bin/rootcling: compilation failure (/var/folders/_l/4q83bg9j5ysb7qd1n9xpnb4h0000gn/T/allDict544a6929bb_dictUmbrella.h)
/Users/ur20980/Library/Python/3.11/lib/python/site-packages/cppyy_backend/loader.py:139: UserWarning: No precompiled header available (failed to build); this may impact performance.
  warnings.warn('No precompiled header available (%s); this may impact performance.' % msg)
In file included from libCoreLegacy dictionary payload:7:
In file included from /Users/ur20980/Library/Python/3.11/lib/python/site-packages/cppyy_backend/include/Riostream.h:24:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/fstream:192:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/filesystem:938:29: error: constructor for 'std::filesystem::path' must explicitly initialize the member '__pn_' which does not have a default constructor
.  .  .

Did you try pip install using the said command:
STDCXX=17 python -m pip install --no-binary cppyy-cling cppyy --no-cache-dir

@mouse07410
Copy link

Did you try pip install using the said command:

STDCXX=17 python -m pip install --no-binary cppyy-cling cppyy --no-cache-dir
$ STDCXX=17 python -m pip install --no-binary cppyy-cling cppyy --no-cache-dir
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: cppyy in /Users/ur20980/Library/Python/3.11/lib/python/site-packages (3.0.0)
Requirement already satisfied: CPyCppyy==1.12.13 in /Users/ur20980/Library/Python/3.11/lib/python/site-packages (from cppyy) (1.12.13)
Requirement already satisfied: cppyy-backend==1.14.11 in /Users/ur20980/Library/Python/3.11/lib/python/site-packages (from cppyy) (1.14.11)
Requirement already satisfied: cppyy-cling==6.28.0 in /Users/ur20980/Library/Python/3.11/lib/python/site-packages (from cppyy) (6.28.0)
$ STDCXX=17 python -m pip install -U --no-binary cppyy-cling cppyy --no-cache-dir
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: cppyy in /Users/ur20980/Library/Python/3.11/lib/python/site-packages (3.0.0)
Requirement already satisfied: CPyCppyy==1.12.13 in /Users/ur20980/Library/Python/3.11/lib/python/site-packages (from cppyy) (1.12.13)
Requirement already satisfied: cppyy-backend==1.14.11 in /Users/ur20980/Library/Python/3.11/lib/python/site-packages (from cppyy) (1.14.11)
Requirement already satisfied: cppyy-cling==6.28.0 in /Users/ur20980/Library/Python/3.11/lib/python/site-packages (from cppyy) (6.28.0)
$ 

@marktsuchida
Copy link
Contributor

marktsuchida commented Sep 24, 2023

On an Apple M1 laptop (Ventura 13.4) on which cppyy previously worked, I started getting the same error as the OP (it was a few months since it last worked, so not sure what changed). The suggestion to install cppyy-cling from source and with STDCXX=17 did not work: the build itself failed with missing cxxabi.h.

After upgrading Xcode from 14.3.1 to 15.0 (and starting Xcode to allow it to install components; also Ventura was upgraded to 13.6), however, I get a much shorter error containing only the first part (in fresh venv and after pip cache purge and successful pip install cppyy):

$ python
Python 3.11.5 (main, Aug 24 2023, 15:09:45) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cppyy
ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!
Invoking:
  LC_ALL=C /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++    -xc++ -E -v /dev/null 2>&1 | sed -n -e '/^.*include/,${' -e '/^ \/.*++/p' -e '}'
Results was:
With exit code 0
>>> 

I note that this lacks the (Re-)building pre-compiled headers message but presumably the root cause of the error has not changed.

I get the exact same error regardless of whether xcode-select -p is pointing to /Library/Developer/CommandLineTools or /Applications/Xcode.app/Contents/Developer (this is what determines which of the 2 outputs from xcrun --show-sdk-path (discussed above) is obtained). This was after also updating to the latest CommandLineTools via Software Update. This seems to confirm that the Xcode.app path is hard-coded.

Further examining the error upon import, the output of

LC_ALL=C /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++    -xc++ -E -v /dev/null 2>&1 | sed -n -e '/^.*include/,${' -e '/^ \/.*++/p' -e '}'

is indeed empty. Removing the sed filter, the output of

LC_ALL=C /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++    -xc++ -E -v /dev/null

is the following:

Apple clang version 15.0.0 (clang-1500.0.40.1)
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
ignoring nonexistent directory "/usr/include/c++/v1"
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1"
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple arm64-apple-macosx13.0.0 -Wundef-prefix=TARGET_OS_ -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -E -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name null -mrelocation-model pic -pic-level 2 -mframe-pointer=non-leaf -fno-strict-return -ffp-contract=on -fno-rounding-math -funwind-tables=1 -fobjc-msgsend-selector-stubs -fcompatibility-qualified-id-block-type-checking -fvisibility-inlines-hidden-static-local-var -target-cpu apple-m1 -target-feature +v8.5a -target-feature +crc -target-feature +lse -target-feature +rdm -target-feature +crypto -target-feature +dotprod -target-feature +fp-armv8 -target-feature +neon -target-feature +fp16fml -target-feature +ras -target-feature +rcpc -target-feature +zcm -target-feature +zcz -target-feature +fullfp16 -target-feature +sm4 -target-feature +sha3 -target-feature +sha2 -target-feature +aes -target-abi darwinpcs -debugger-tuning=lldb -target-linker-version 1015.6 -v -fcoverage-compilation-dir=/Users/mark/tmp -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0 -internal-isystem /usr/local/include -internal-isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include -internal-externc-isystem /usr/include -internal-externc-isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-elaborated-enum-base -Wno-reserved-identifier -Wno-gnu-folding-constant -fdeprecated-macro -fdebug-compilation-dir=/Users/mark/tmp -ferror-limit 19 -stack-protector 1 -fstack-check -mdarwin-stkchk-strong-link -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fno-cxx-modules -fcxx-exceptions -fexceptions -fmax-type-align=16 -fcommon -clang-vendor-feature=+disableNonDependentMemberExprInCurrentInstantiation -fno-odr-hash-protocols -clang-vendor-feature=+enableAggressiveVLAFolding -clang-vendor-feature=+revert09abecef7bbf -clang-vendor-feature=+thisNoAlignAttr -clang-vendor-feature=+thisNoNullAttr -mllvm -disable-aligned-alloc-awareness=1 -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o - -x c++ /dev/null
clang -cc1 version 15.0.0 (clang-1500.0.40.1) default target arm64-apple-darwin22.6.0
ignoring nonexistent directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
 /System/Library/Frameworks (framework directory)
 /Library/Frameworks (framework directory)
End of search list.
# 1 "/dev/null"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 433 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "/dev/null" 2

I note the absence of an include directory ending in c++/v1.

Importantly, if I run the equivalent command through xcrun, it changes the set of include directories:

$ LC_ALL=C xcrun c++    -xc++ -E -v /dev/null
Apple clang version 15.0.0 (clang-1500.0.40.1)
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple arm64-apple-macosx13.0.0 -Wundef-prefix=TARGET_OS_ -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -E -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name null -mrelocation-model pic -pic-level 2 -mframe-pointer=non-leaf -fno-strict-return -ffp-contract=on -fno-rounding-math -funwind-tables=1 -fobjc-msgsend-selector-stubs -target-sdk-version=14.0 -fvisibility-inlines-hidden-static-local-var -target-cpu apple-m1 -target-feature +v8.5a -target-feature +crc -target-feature +lse -target-feature +rdm -target-feature +crypto -target-feature +dotprod -target-feature +fp-armv8 -target-feature +neon -target-feature +fp16fml -target-feature +ras -target-feature +rcpc -target-feature +zcm -target-feature +zcz -target-feature +fullfp16 -target-feature +sm4 -target-feature +sha3 -target-feature +sha2 -target-feature +aes -target-abi darwinpcs -debugger-tuning=lldb -target-linker-version 1015.6 -v -fcoverage-compilation-dir=/Users/mark/tmp -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -I/usr/local/include -internal-isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1 -internal-isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/local/include -internal-isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include -internal-externc-isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -internal-externc-isystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-elaborated-enum-base -Wno-reserved-identifier -Wno-gnu-folding-constant -fdeprecated-macro -fdebug-compilation-dir=/Users/mark/tmp -ferror-limit 19 -stack-protector 1 -fstack-check -mdarwin-stkchk-strong-link -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fno-cxx-modules -fcxx-exceptions -fexceptions -fmax-type-align=16 -fcommon -clang-vendor-feature=+disableNonDependentMemberExprInCurrentInstantiation -fno-odr-hash-protocols -clang-vendor-feature=+enableAggressiveVLAFolding -clang-vendor-feature=+revert09abecef7bbf -clang-vendor-feature=+thisNoAlignAttr -clang-vendor-feature=+thisNoNullAttr -mllvm -disable-aligned-alloc-awareness=1 -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o - -x c++ /dev/null
clang -cc1 version 15.0.0 (clang-1500.0.40.1) default target arm64-apple-darwin22.6.0
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/local/include"
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include
 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory)
End of search list.
# 1 "/dev/null"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 433 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "/dev/null" 2

This is despite the fact that xcrun --find c++ returns /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++.

With this output, adding back the sed filter successfully results in the single line:

 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1

Finally, for reference, the same command produces the following when xcode-select points to CommandLineTools:

(EDIT: Previously I mistakenly repeated the output for the Xcode.app case here.)

$ LC_ALL=C xcrun c++ -xc++ -E -v /dev/null
Apple clang version 15.0.0 (clang-1500.0.40.1)
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
 "/Library/Developer/CommandLineTools/usr/bin/clang" -cc1 -triple arm64-apple-macosx13.0.0 -Wundef-prefix=TARGET_OS_ -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -Werror=implicit-function-declaration -E -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name null -mrelocation-model pic -pic-level 2 -mframe-pointer=non-leaf -fno-strict-return -ffp-contract=on -fno-rounding-math -funwind-tables=1 -fobjc-msgsend-selector-stubs -target-sdk-version=14.0 -fvisibility-inlines-hidden-static-local-var -target-cpu apple-m1 -target-feature +v8.5a -target-feature +crc -target-feature +lse -target-feature +rdm -target-feature +crypto -target-feature +dotprod -target-feature +fp-armv8 -target-feature +neon -target-feature +fp16fml -target-feature +ras -target-feature +rcpc -target-feature +zcm -target-feature +zcz -target-feature +fullfp16 -target-feature +sm4 -target-feature +sha3 -target-feature +sha2 -target-feature +aes -target-abi darwinpcs -debugger-tuning=lldb -target-linker-version 1015.6 -v -fcoverage-compilation-dir=/Users/mark -resource-dir /Library/Developer/CommandLineTools/usr/lib/clang/15.0.0 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -internal-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1 -internal-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/local/include -internal-isystem /Library/Developer/CommandLineTools/usr/lib/clang/15.0.0/include -internal-externc-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -internal-externc-isystem /Library/Developer/CommandLineTools/usr/include -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-c99-designator -Wno-final-dtor-non-final-class -Wno-extra-semi-stmt -Wno-misleading-indentation -Wno-quoted-include-in-framework-header -Wno-implicit-fallthrough -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-elaborated-enum-base -Wno-reserved-identifier -Wno-gnu-folding-constant -fdeprecated-macro -fdebug-compilation-dir=/Users/mark -ferror-limit 19 -stack-protector 1 -fstack-check -mdarwin-stkchk-strong-link -fblocks -fencode-extended-block-signature -fregister-global-dtors-with-atexit -fgnuc-version=4.2.1 -fno-cxx-modules -fcxx-exceptions -fexceptions -fmax-type-align=16 -fcommon -clang-vendor-feature=+disableNonDependentMemberExprInCurrentInstantiation -fno-odr-hash-protocols -clang-vendor-feature=+enableAggressiveVLAFolding -clang-vendor-feature=+revert09abecef7bbf -clang-vendor-feature=+thisNoAlignAttr -clang-vendor-feature=+thisNoNullAttr -mllvm -disable-aligned-alloc-awareness=1 -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o - -x c++ /dev/null
clang -cc1 version 15.0.0 (clang-1500.0.40.1) default target arm64-apple-darwin22.6.0
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/local/include"
ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1
 /Library/Developer/CommandLineTools/usr/lib/clang/15.0.0/include
 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
 /Library/Developer/CommandLineTools/usr/include
 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory)
End of search list.
# 1 "/dev/null"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 433 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "/dev/null" 2

And the sed filter works on this output, too:

 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1

So I'm wondering if the header directory detection could be fixed so that it goes through xcrun, which seems to add some environment settings (resulting in different clang arguments) before running c++.

(And if that is a viable fix, it might allow cppyy to work with just CommandLineTools in the absence of Xcode, which would be a very nice thing.)

@marktsuchida
Copy link
Contributor

According to man xcrun, one of xcrun's jobs is to set SDKROOT. So I was able to come up with the following workaround to get cppyy to import successfully:

  • In a fresh venv, install cppyy as normal (pip install cppyy, but I purged the pip cache first to ensure I'm testing what I think I'm testing; --no-cache-dir should also work for this).
  • export SDKROOT=$(xcrun --show-sdk-path)
  • Now start Python, and import cppyy succeeds with no output.

It should be noted that setting SDKROOT in turn affects the output of xcrun --show-sdk-path, so care should be taken when testing different xcode-select settings (unset SDKROOT between tests). The above workaround worked regardless of whether xcode-select pointed to Xcode.app or CommandLineTools, presumably because either setting provides a valid c++/v1 directory.

@wlav
Copy link
Owner

wlav commented Oct 9, 2023

Thanks @marktsuchida! Using xcrun in this way gets me further with the CI built wheels in that the C++ headers are now found, but the C headers are not. Still puzzling.

@marktsuchida
Copy link
Contributor

@wlav What is the symptom when the C headers are not found? (In my case, cppyy.include("stdio.h") seems to work fine when SDKROOT is set).

BTW I corrected a copy-paste error in my long post above (noted inline).

@wlav
Copy link
Owner

wlav commented Oct 11, 2023

Yes, it's a problem still will SDKROOT. Incidentally, it's now fixed (for me anyway) in repo. I'm still having trouble with the wheels from the CI, though: even as it's build for Mac ARM, the binaries are the wrong architecture.

I kind of like the idea of having the CI build the wheels as the environment doesn't risk being polluted by any development setup I may have, but none of the wheels thus produced yet work on any platform (I still have to test the Windows' ones, maybe I get lucky). I'm wondering whether I should simply give up on that. :/

@marktsuchida
Copy link
Contributor

Ah, so the PyPI wheels are manually built? I feel your pain....

@wlav
Copy link
Owner

wlav commented Oct 11, 2023

I always did so far, but then a CI recipe was contributed, so I thought that would be great. However, I'm finding the CI to be far more unwieldy than building manually. :(

The problem with Cling is that it will bake in the local build paths as an additional way to find things like include headers etc. I.e., when building and running on my own machines, the result is guaranteed to work more often when I test it locally than on any other, different setup. I.e. a clean, alternate, build environment that doesn't favor my own would be preferable to guarantee portability. But the github CI build runners are all over the place.

@wlav
Copy link
Owner

wlav commented Oct 11, 2023

All that said, I really do hope that this particular issue itself is solved now that I patched cling to use xcrun and changed the way it looks for sysroot. :)

@marktsuchida
Copy link
Contributor

All that said, I really do hope that this particular issue itself is solved now that I patched cling to use xcrun and changed the way it looks for sysroot. :)

Awesome, thanks so much! Let me know if there is a good way for me to test now, or I'll look forward to the next release.

Hopefully the run-time discovery (xcrun, etc.) would help somewhat with CI builds. I can see that the multiple Xcode versions on GitHub runners could be a problem, for one thing. I'm sure there are other complications, though.

@Alex-EEE
Copy link

is that fix live? if not, please let us know when it is, can't wait to try it! we switched to pybind11 for one project, b/c of this issue, and ugh it was painful. would really love to stick with cppyy

@wlav
Copy link
Owner

wlav commented Oct 11, 2023

@Alex-EEE: it's in the repo. I'm fighting the CI ... one other thing that would be great if that were functional, is that I could just point you to the artifacts to download.

I'm currently re-writing the workflow using the scikit-learn one as an example.

@wlav
Copy link
Owner

wlav commented Oct 17, 2023

The CI path isn't going to work out: the ARM target is a cross-compilation, but the build process creates small helper executables. Presumably, it's possible to compile the latter for the host, while compiling the rest for ARM, but I'm giving up for now. The build process will be simplified once the move to Clang-REPL is complete.

For now, here's a wheel that should work, however. Appreciate feedback:
http://cern.ch/wlav/cppyy_cling-6.28.6-py2.py3-none-macosx_11_0_arm64.whl

If confirmed, I can finally cut a new release...

(Edit just to say not to worry about pip complaining about version numbers when installing the above wheel. It's ABI compatible.)

@marktsuchida
Copy link
Contributor

Looks like this works for me!

With the latest cppyy installed normally from PyPI (showing failure case first, then the workaround, then the new cppyy-cling),

$ pip list
Package       Version
------------- -------
cppyy         3.0.0
cppyy-backend 1.14.11
cppyy-cling   6.28.0
CPyCppyy      1.12.13
pip           23.3
setuptools    68.2.2
$ python
Python 3.11.5 (main, Aug 24 2023, 15:09:45) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cppyy
ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!
Invoking:
  LC_ALL=C /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++    -xc++ -E -v /dev/null 2>&1 | sed -n -e '/^.*include/,${' -e '/^ \/.*++/p' -e '}'
Results was:
With exit code 0
>>> ^D
$ SDKROOT=$(xcrun --show-sdk-path) python
Python 3.11.5 (main, Aug 24 2023, 15:09:45) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cppyy
>>> ^D
$ pip install https://cern.ch/wlav/cppyy_cling-6.28.6-py2.py3-none-macosx_11_0_arm64.whl
Collecting cppyy-cling==6.28.6
  Using cached https://cern.ch/wlav/cppyy_cling-6.28.6-py2.py3-none-macosx_11_0_arm64.whl (27.9 MB)
Installing collected packages: cppyy-cling
  Attempting uninstall: cppyy-cling
    Found existing installation: cppyy-cling 6.28.0
    Uninstalling cppyy-cling-6.28.0:
      Successfully uninstalled cppyy-cling-6.28.0
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
cppyy-backend 1.14.11 requires cppyy-cling==6.28.0, but you have cppyy-cling 6.28.6 which is incompatible.
cpycppyy 1.12.13 requires cppyy-cling==6.28.0, but you have cppyy-cling 6.28.6 which is incompatible.
cppyy 3.0.0 requires cppyy-cling==6.28.0, but you have cppyy-cling 6.28.6 which is incompatible.
Successfully installed cppyy-cling-6.28.6
$ python
Python 3.11.5 (main, Aug 24 2023, 15:09:45) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cppyy
(Re-)building pre-compiled headers (options: -O2); this may take a minute ...
>>> 

I got the same result with xcode-select pointing to either Xcode.app or CommandLineTools.

@wlav
Copy link
Owner

wlav commented Nov 13, 2023

Should all be good now with release 3.1.0. Feel free to reopen if you find otherwise.

@wlav wlav closed this as completed Nov 13, 2023
@PouyaEsmaili
Copy link

PouyaEsmaili commented May 8, 2024

@wlav
I have the same problem. Release 3 is not good for me because of a known issue of ns3 with it (#156, #175). Can you fix this on top of 2.4.2 and release a new patch for cppyy 2?

@Gabrielcarvfer
Copy link

Gabrielcarvfer commented May 11, 2024

@wlav I have the same problem. Release 3 is not good for me because of a known issue of ns3 with it (#156, #175). Can you fix this on top of 2.4.2 and release a new patch for cppyy 2?

As the ns-3 maintainer for build/python/platform-specific stuff:

  1. Unable to pass python callback to C++ #175 has been fixed a long time ago for all of our test suites;
  2. Failed to materialize symbols #156 issues are still a problem, but a workaround has been merged making ns-3 compatible with cppyy3 (ns-3 needs to be built from source, e.g. cc51f7a, until ns-3.42 gets released at the end of the month);
  3. ns-3 does not test nor claim compatibility with MacOS for the python bindings. I suggest using docker instead;
  4. ns-3 now depends on C++20 features only available on cppyy3. In my opinion, it would be a waste of Wim's time to backport this kind of stuff to support older releases.

@PouyaEsmaili
Copy link

About 2, I built from master and still had the issue running first.py
About 3, I think being able to debug inside an IDE is a feature we lose.
Also, I suggest mentioning this in the installation documentation. I had to dig deep to come across these issues and find out what is the problem.

@Gabrielcarvfer
Copy link

About 2, I built from master and still had the issue running first.py About 3, I think being able to debug inside an IDE is a feature we lose. Also, I suggest mentioning this in the installation documentation. I had to dig deep to come across these issues and find out what is the problem.

You can report these issues in https://groups.google.com/u/0/g/ns-3-users, or https://gitlab.com/nsnam/ns-3-dev/-/issues, not to pollute the cppyy tracker. The intended way for people that are not really sure what they are doing to consume the ns-3 bindings is via pip. :)

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