wlav / cppyy

Other
401 stars 41 forks source link

Error when installing cppyy on Windows 10 with VS 2022 #50

Closed metab0t closed 2 years ago

metab0t commented 2 years ago

I try to install cppyy on Windows 10 and the following error happened. I have installed Visual Studio 2022 on my machine.

Is there any clue to solve this issue?

``` (playground) PS C:\Users\yangyue> pip install --no-cache-dir cppyy Collecting cppyy Downloading cppyy-2.3.0.tar.gz (19 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Collecting cppyy-cling==6.25.3 Downloading cppyy_cling-6.25.3-py2.py3-none-win_amd64.whl (18.4 MB) ---------------------------------------- 18.4/18.4 MB 6.2 MB/s eta 0:00:00 Collecting cppyy-backend==1.14.8 Downloading cppyy-backend-1.14.8.tar.gz (33 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting CPyCppyy==1.12.9 Downloading CPyCppyy-1.12.9.tar.gz (199 kB) ---------------------------------------- 199.1/199.1 KB 12.6 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: cppyy, cppyy-backend, CPyCppyy Building wheel for cppyy (pyproject.toml) ... done Created wheel for cppyy: filename=cppyy-2.3.0-py3-none-any.whl size=20035 sha256=132cd4c97ce652804c08fc0627965f0b48e19932c4e63474829d481dcf76541f Stored in directory: C:\Users\yangyue\AppData\Local\Temp\pip-ephem-wheel-cache-z8xiphov\wheels\f3\ae\84\b99113a0a70ec5e622e58065ab1481b284b610fd33f176b267 Building wheel for cppyy-backend (pyproject.toml) ... done Created wheel for cppyy-backend: filename=cppyy_backend-1.14.8-py2.py3-none-win_amd64.whl size=85356 sha256=578725e6caf5808584b606fd1c09c6ec521f403a7c31172b3a6aa9e55f036eb0 Stored in directory: C:\Users\yangyue\AppData\Local\Temp\pip-ephem-wheel-cache-z8xiphov\wheels\d9\79\54\b8c2878b4e8c97247ef50b93d3b1c8be0583a70bd0552d5397 Building wheel for CPyCppyy (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for CPyCppyy (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [13 lines of output] running bdist_wheel running build running build_ext building 'libcppyy' extension creating build creating build\temp.win-amd64-3.10 creating build\temp.win-amd64-3.10\Release creating build\temp.win-amd64-3.10\Release\src "D:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Iinclude -ID:\miniforge3\envs\playground\include -ID:\miniforge3\envs\playground\Include "-ID:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\cppwinrt" -IC:\xpressmp\include /EHsc /Tpsrc\API.cxx /Fobuild\temp.win-amd64-3.10\Release\src\API.obj -O2 -Zc:__cplusplus /std:c++17 /GR /EHsc- /MD cl: 命令行 warning D9025 :正在重写“/EHc”(用“/EHc-”) API.cxx C:\Users\yangyue\AppData\Local\Temp\pip-install-zrabrnpi\cpycppyy_a99affbe1670424fa1d8ebafa772bc6e\src\CPPInstance.h(82): error C2061: 语法错误: 标识符“ssize_t” error: command 'D:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.31.31103\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for CPyCppyy Successfully built cppyy cppyy-backend Failed to build CPyCppyy ERROR: Could not build wheels for CPyCppyy, which is required to install pyproject.toml-based projects ```
wlav commented 2 years ago

This is https://github.com/wlav/CPyCppyy/issues/3 . There, however, it was an older VS (2017). It actually worked for the version I used (2019), so I assumed that it would have been fine with more modern VS in general, but I guess not.

I just put out cppyy 2.3.1 patch release with contains just this fix over 2.3.0.

metab0t commented 2 years ago

Now cppyy can be installed but still cannot be imported.

The logs are as follows:

installation log ``` (playground) PS C:\Users\yangyue> pip install --no-cache-dir cppyy Collecting cppyy Downloading cppyy-2.3.1.tar.gz (19 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Collecting cppyy-cling==6.25.3 Downloading cppyy_cling-6.25.3-py2.py3-none-win_amd64.whl (18.4 MB) ---------------------------------------- 18.4/18.4 MB 1.5 MB/s eta 0:00:00 Collecting cppyy-backend==1.14.8 Downloading cppyy-backend-1.14.8.tar.gz (33 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting CPyCppyy==1.12.10 Downloading CPyCppyy-1.12.10.tar.gz (199 kB) ---------------------------------------- 199.2/199.2 KB 4.0 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: cppyy, cppyy-backend, CPyCppyy Building wheel for cppyy (pyproject.toml) ... done Created wheel for cppyy: filename=cppyy-2.3.1-py3-none-any.whl size=20033 sha256=fda57535671b936bbec9b34aa2f8e0f83d116dbb971ceba7b97e01bd6f777650 Stored in directory: C:\Users\yangyue\AppData\Local\Temp\pip-ephem-wheel-cache-8i8mr8j6\wheels\aa\ab\23\32f6ab5605ba9b2bf7e4b99c50c510cefdb12ea64e96f99745 Building wheel for cppyy-backend (pyproject.toml) ... done Created wheel for cppyy-backend: filename=cppyy_backend-1.14.8-py2.py3-none-win_amd64.whl size=85355 sha256=083e56a6a9b40797ef1a78d300421c5d1a701282faa3d7cd7dd0174b59f8317f Stored in directory: C:\Users\yangyue\AppData\Local\Temp\pip-ephem-wheel-cache-8i8mr8j6\wheels\d9\79\54\b8c2878b4e8c97247ef50b93d3b1c8be0583a70bd0552d5397 Building wheel for CPyCppyy (pyproject.toml) ... done Created wheel for CPyCppyy: filename=CPyCppyy-1.12.10-cp310-cp310-win_amd64.whl size=236981 sha256=cfc196f6e951bd923a867f2df2d95f9accd7a8a2c2956e2c987b9c8c57255c95 Stored in directory: C:\Users\yangyue\AppData\Local\Temp\pip-ephem-wheel-cache-8i8mr8j6\wheels\98\60\71\c8d2cb2f3307c239d9a2291011c2aa9798b669774d8a0b85ca Successfully built cppyy cppyy-backend CPyCppyy Installing collected packages: cppyy-cling, cppyy-backend, CPyCppyy, cppyy Successfully installed CPyCppyy-1.12.10 cppyy-2.3.1 cppyy-backend-1.14.8 cppyy-cling-6.25.3 ```
import log ``` (playground) PS C:\Users\yangyue> python Python 3.10.4 | packaged by conda-forge | (main, Mar 24 2022, 17:32:50) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import cppyy (Re-)building pre-compiled headers (options: -O2); this may take a minute ... input_line_1:1:10: fatal error: 'new' file not found #include ^~~~~ 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 C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\stddef.h:12: C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt.h:10:10: fatal error: 'vcruntime.h' file not found #include ^~~~~~~~~~~~~ ========================================== =============== STACKTRACE =============== ========================================== ================ Thread 0 ================ libCoreLegacy!CppyyLegacy::TWinNTSystem::DispatchSignals() ucrtbase!seh_filter_exe() rootcling!usedToIdentifyRootClingByDlSym() VCRUNTIME140!_C_specific_handler() ntdll!_chkstk() ntdll!RtlRaiseException() ntdll!KiUserExceptionDispatcher() libCling!CppyyLegacy::TMetaUtils::TNormalizedCtxtImpl::TNormalizedCtxtImpl() libCling!CppyyLegacy::TMetaUtils::TNormalizedCtxt::TNormalizedCtxt() libCling!CppyyLegacy::TCling::TCling() libCling!CreateInterpreter() libCoreLegacy!CppyyLegacy::TROOT::InitInterpreter() libCoreLegacy!CppyyLegacy::Internal::GetROOT2() libCling!TCling__GetInterpreter() libCling!RootClingMain() libCling!ROOT_rootcling_Driver() rootcling!usedToIdentifyRootClingByDlSym() rootcling!usedToIdentifyRootClingByDlSym() KERNEL32!BaseThreadInitThunk() ntdll!RtlUserThreadStart() ================ Thread 1 ================ ntdll!ZwWaitForWorkViaWorkerFactory() ntdll!TpReleaseCleanupGroupMembers() KERNEL32!BaseThreadInitThunk() ntdll!RtlUserThreadStart() ================ Thread 2 ================ ntdll!ZwWaitForWorkViaWorkerFactory() ntdll!TpReleaseCleanupGroupMembers() KERNEL32!BaseThreadInitThunk() ntdll!RtlUserThreadStart() ================ Thread 3 ================ ntdll!ZwWaitForWorkViaWorkerFactory() ntdll!TpReleaseCleanupGroupMembers() KERNEL32!BaseThreadInitThunk() ntdll!RtlUserThreadStart() ========================================== ============= END STACKTRACE ============= ========================================== Stack dump: 0. Program arguments: .\bin\rootcling -rootbuild -generate-pch -f C:\Users\yangyue\AppData\Local\Temp\allDict.cxx -noDictSelection -D__CLING__ -DROOT_PCH -I.\include -I.\etc -I.\etc\dictpch -I.\etc\cling -ID:\miniforge3\envs\playground\lib\site-packages\cppyy_backend\include -cxxflags -IC:/Users/wlav/Test/cppyy-backend/cling/src/build/win -FIw32pragma.h -FIsehmap.h -MD -DNDEBUG -D_WINDOWS -DWIN32 -D_AMD64_ -D_XKEYCHECK_H -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -DNOMINMAX -D_CRT_SECURE_NO_WARNINGS etc\dictpch\allHeaders.h etc\dictpch\allLinkDefs.h #0 0x00007ffc74868d4d cling::runtime::internal::setValueWithAlloc(void *, void *, void *, char) (D:\miniforge3\envs\playground\lib\site-packages\cppyy_backend\bin\libCling.dll+0x18d8d4d) #1 0x00007ffd30171881 (C:\Windows\System32\ucrtbase.dll+0x71881) #2 0x00007ffd30172851 (C:\Windows\System32\ucrtbase.dll+0x72851) #3 0x00007ffcd551d0aa CppyyLegacy::TWinNTSystem::Abort(int) (D:\miniforge3\envs\playground\lib\site-packages\cppyy_backend\bin\libCoreLegacy.dll+0x9d0aa) #4 0x00007ffcd551e2c3 CppyyLegacy::TWinNTSystem::DispatchSignals(enum CppyyLegacy::ESignals) (D:\miniforge3\envs\playground\lib\site-packages\cppyy_backend\bin\libCoreLegacy.dll+0x9e2c3) #5 0x00007ffd30170ef5 (C:\Windows\System32\ucrtbase.dll+0x70ef5) #6 0x00007ff7e98a1c48 usedToIdentifyRootClingByDlSym (D:\miniforge3\envs\playground\lib\site-packages\cppyy_backend\bin\rootcling.exe+0x1c48) #7 0x00007ffd20e7bf10 (D:\miniforge3\envs\playground\lib\site-packages\cppyy_backend\bin\VCRUNTIME140.dll+0xbf10) #8 0x00007ffd327920cf (C:\Windows\SYSTEM32\ntdll.dll+0xa20cf) #9 0x00007ffd32741454 (C:\Windows\SYSTEM32\ntdll.dll+0x51454) #10 0x00007ffd32790bfe (C:\Windows\SYSTEM32\ntdll.dll+0xa0bfe) #11 0x00007ffc72fc522b CppyyLegacy::TMetaUtils::TNormalizedCtxtImpl::TNormalizedCtxtImpl(class cling::LookupHelper const &) (D:\miniforge3\envs\playground\lib\site-packages\cppyy_backend\bin\libCling.dll+0x3522b) #12 0x00007ffc72fc5179 CppyyLegacy::TMetaUtils::TNormalizedCtxt::TNormalizedCtxt(class cling::LookupHelper const &) (D:\miniforge3\envs\playground\lib\site-packages\cppyy_backend\bin\libCling.dll+0x35179) #13 0x00007ffc730686ab CppyyLegacy::TCling::TCling(char const *, char const *, char const *const *const) (D:\miniforge3\envs\playground\lib\site-packages\cppyy_backend\bin\libCling.dll+0xd86ab) #14 0x00007ffc730adb24 CreateInterpreter (D:\miniforge3\envs\playground\lib\site-packages\cppyy_backend\bin\libCling.dll+0x11db24) #15 0x00007ffcd54883cb CppyyLegacy::TROOT::InitInterpreter(void) (D:\miniforge3\envs\playground\lib\site-packages\cppyy_backend\bin\libCoreLegacy.dll+0x83cb) #16 0x00007ffcd5487d2f CppyyLegacy::Internal::GetROOT2(void) (D:\miniforge3\envs\playground\lib\site-packages\cppyy_backend\bin\libCoreLegacy.dll+0x7d2f) #17 0x00007ffc7304b8c0 TCling__GetInterpreter (D:\miniforge3\envs\playground\lib\site-packages\cppyy_backend\bin\libCling.dll+0xbb8c0) #18 0x00007ffc73017ff2 RootClingMain(int, char **, bool) (D:\miniforge3\envs\playground\lib\site-packages\cppyy_backend\bin\libCling.dll+0x87ff2) #19 0x00007ffc7302cb57 ROOT_rootcling_Driver (D:\miniforge3\envs\playground\lib\site-packages\cppyy_backend\bin\libCling.dll+0x9cb57) #20 0x00007ff7e98a10c1 usedToIdentifyRootClingByDlSym (D:\miniforge3\envs\playground\lib\site-packages\cppyy_backend\bin\rootcling.exe+0x10c1) #21 0x00007ff7e98a12ec usedToIdentifyRootClingByDlSym (D:\miniforge3\envs\playground\lib\site-packages\cppyy_backend\bin\rootcling.exe+0x12ec) #22 0x00007ffd31bb7034 (C:\Windows\System32\KERNEL32.DLL+0x17034) #23 0x00007ffd32742651 (C:\Windows\SYSTEM32\ntdll.dll+0x52651) D:\miniforge3\envs\playground\lib\site-packages\cppyy_backend\loader.py:142: UserWarning: No precompiled header available (failed to build); this may impact performance. warnings.warn('No precompiled header available (%s); this may impact performance.' % msg) input_line_1:1:10: fatal error: 'new' file not found #include ^~~~~ Warning in cling::IncrementalParser::CheckABICompatibility(): Failed to extract C++ standard library version. Replaced symbol atexit cannot be found in JIT! Replaced symbol at_quick_exit cannot be found in JIT! Replaced symbol __dllonexit cannot be found in JIT! Replaced symbol _onexit cannot be found in JIT! In file included from input_line_3:1: In file included from D:/miniforge3/envs/playground/lib/site-packages/cppyy_backend\include\Rtypes.h:22: In file included from D:/miniforge3/envs/playground/lib/site-packages/cppyy_backend\include/RtypesCore.h:23: In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\stddef.h:12: C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt.h:10:10: fatal error: 'vcruntime.h' file not found #include ^~~~~~~~~~~~~ Traceback (most recent call last): File "", line 1, in File "D:\miniforge3\envs\playground\lib\site-packages\cppyy\__init__.py", line 80, in from ._cpython_cppyy import * File "D:\miniforge3\envs\playground\lib\site-packages\cppyy\_cpython_cppyy.py", line 20, in c = loader.load_cpp_backend() File "D:\miniforge3\envs\playground\lib\site-packages\cppyy_backend\loader.py", line 85, in load_cpp_backend raise RuntimeError("could not load cppyy_backend library, details:\n%s" % RuntimeError: could not load cppyy_backend library, details: [WinError 1114] 动态链接库(DLL)初始化例程失败。 Could not find module 'libcppyy_backend.cp310-win_amd64.pyd' (or one of its dependencies). Try using the full path with constructor syntax. Could not find module 'libcppyy_backend.dll' (or one of its dependencies). Try using the full path with constructor syntax. Could not find module 'D:\miniforge3\envs\playground\lib\site-packages\cppyy_backend\lib\libcppyy_backend.cp310-win_amd64.pyd' (or one of its dependencies). Try using the full path with constructor syntax. ```
wlav commented 2 years ago

Looks like Cling can't find the C++ standard headers. Did you run python within an MSVC environment? This is needed to build the PCH. Second time around, with the PCH available, it can be run without. Aside, I would have expected a PCH to have been build during installation time, so a bit surprised it builds again on first import (it compares the time stamp of the cppyy_backend\include directory to that of the PCH).

Access to the standard headers is something on Windows that is not an issue on Linux/Mac: if the sources can be build, standard headers are available in easy to find locations. It's on my wish list to improve but upstream (and Clang/LLVM for that matter) always put Windows support last (if at all), so it's a lot of work.

metab0t commented 2 years ago

Thank you for your explanation! I run Python now in MSVC x64 shell and cppyy is imported without issues, but it seems that it always fails when it is not run in MSVC x64 shell. Does it mean that PCH is not built successfully?

``` (playground) PS C:\Users\yangyue> python Python 3.10.4 | packaged by conda-forge | (main, Mar 24 2022, 17:32:50) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import cppyy input_line_1:1:10: fatal error: 'new' file not found #include ^~~~~ Replaced symbol atexit cannot be found in JIT! Replaced symbol at_quick_exit cannot be found in JIT! Replaced symbol __dllonexit cannot be found in JIT! Replaced symbol _onexit cannot be found in JIT! input_line_3:37:10: fatal error: 'string' file not found #include ^~~~~~~~ input_line_6:3:10: fatal error: 'functional' file not found #include ^~~~~~~~~~~~ ========================================== =============== STACKTRACE =============== ========================================== ================ Thread 0 ================ libCoreLegacy!CppyyLegacy::DefaultErrorHandler() libCoreLegacy!ErrorHandler() libCoreLegacy!CppyyLegacy::TObject::Fatal() libCoreLegacy!CppyyLegacy::TROOT::GetListOfGlobalFunctions() libCling!CppyyLegacy::TCling::UpdateListsOnUnloaded() libCling!cling::runtime::internal::EvaluateDynamicExpression() libCling!cling::runtime::internal::EvaluateDynamicExpression() libCling!cling::Value::print() libCling!cling::Value::print() libCling!CppyyLegacy::TClingValue::ToTypeAndValueString() libCling!cling::runtime::internal::EvaluateDynamicExpression() libCling!CppyyLegacy::TCling::TCling() libCling!CreateInterpreter() libCoreLegacy!CppyyLegacy::TROOT::InitInterpreter() libCoreLegacy!CppyyLegacy::Internal::GetROOT2() libcppyy_backend!?? libcppyy_backend!?? ucrtbase!initterm() libcppyy_backend!cppyy_vectorbool_setitem() libcppyy_backend!cppyy_vectorbool_setitem() ntdll!RtlActivateActivationContextUnsafeFast() ntdll!LdrGetProcedureAddressEx() ntdll!LdrGetProcedureAddressEx() ntdll!RtlSwitchedVVI() ntdll!RtlGetFullPathName_UstrEx() ntdll!RtlDosPathNameToNtPathName_U() ntdll!LdrLoadDll() KERNELBASE!LoadLibraryExW() _ctypes!DllCanUnloadNow() python310!PyCFunction_GetFlags() python310!PyObject_MakeTpCall() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyObject_FastCallDictTstate() python310!PyObject_Call_Prepend() python310!PyType_Ready() python310!PyType_Name() python310!PyObject_MakeTpCall() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyOS_URandomNonblock() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyOS_URandomNonblock() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalCode() python310!PyWarnings_Init() python310!PyCFunction_GetFlags() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyOS_URandomNonblock() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyOS_URandomNonblock() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyOS_URandomNonblock() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyOS_URandomNonblock() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyBytesWriter_WriteBytes() python310!PyObject_CallMethodIdObjArgs() python310!PyImport_ImportModuleNoBlock() python310!PyImport_ImportModuleLevelObject() python310!PyEval_SliceIndexNotNone() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalCode() python310!PyWarnings_Init() python310!PyCFunction_GetFlags() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyOS_URandomNonblock() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyOS_URandomNonblock() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyOS_URandomNonblock() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyOS_URandomNonblock() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyBytesWriter_WriteBytes() python310!PyObject_CallMethodIdObjArgs() python310!PyImport_ImportModuleNoBlock() python310!PyImport_ImportModuleLevelObject() python310!PyEval_SliceIndexNotNone() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyRun_FileExFlags() python310!PyRun_FileExFlags() python310!PyRun_InteractiveLoopFlags() python310!PyRun_InteractiveLoopObject() python310!PyObject_GC_IsFinalized() python310!PyObject_GC_IsFinalized() python310!Py_RunMain() python310!Py_Main() python!OPENSSL_Applink() KERNEL32!BaseThreadInitThunk() ntdll!RtlUserThreadStart() ================ Thread 1 ================ ntdll!ZwWaitForWorkViaWorkerFactory() ntdll!TpReleaseCleanupGroupMembers() KERNEL32!BaseThreadInitThunk() ntdll!RtlUserThreadStart() ================ Thread 2 ================ ntdll!ZwWaitForWorkViaWorkerFactory() ntdll!TpReleaseCleanupGroupMembers() KERNEL32!BaseThreadInitThunk() ntdll!RtlUserThreadStart() ================ Thread 3 ================ ntdll!ZwWaitForWorkViaWorkerFactory() ntdll!TpReleaseCleanupGroupMembers() KERNEL32!BaseThreadInitThunk() ntdll!RtlUserThreadStart() ================ Thread 4 ================ ntdll!ZwWaitForMultipleObjects() KERNELBASE!WaitForMultipleObjectsEx() KERNELBASE!WaitForMultipleObjects() ConEmuHk64!RequestLocalServer() ConEmuHk64!RequestLocalServer() ConEmuHk64!GetRealConsoleWindow() ConEmuHk64!RequestLocalServer() ConEmuHk64!SetLoadLibraryCallback() KERNEL32!BaseThreadInitThunk() ntdll!RtlUserThreadStart() ========================================== ============= END STACKTRACE ============= ========================================== ========================================== =============== STACKTRACE =============== ========================================== ================ Thread 0 ================ libCoreLegacy!CppyyLegacy::TWinNTSystem::DispatchSignals() ucrtbase!raise() ucrtbase!abort() libCoreLegacy!CppyyLegacy::TWinNTSystem::Abort() libCoreLegacy!CppyyLegacy::DefaultErrorHandler() libCoreLegacy!ErrorHandler() libCoreLegacy!CppyyLegacy::TObject::Fatal() libCoreLegacy!CppyyLegacy::TROOT::GetListOfGlobalFunctions() libCling!CppyyLegacy::TCling::UpdateListsOnUnloaded() libCling!cling::runtime::internal::EvaluateDynamicExpression() libCling!cling::runtime::internal::EvaluateDynamicExpression() libCling!cling::Value::print() libCling!cling::Value::print() libCling!CppyyLegacy::TClingValue::ToTypeAndValueString() libCling!cling::runtime::internal::EvaluateDynamicExpression() libCling!CppyyLegacy::TCling::TCling() libCling!CreateInterpreter() libCoreLegacy!CppyyLegacy::TROOT::InitInterpreter() libCoreLegacy!CppyyLegacy::Internal::GetROOT2() libcppyy_backend!?? libcppyy_backend!?? ucrtbase!initterm() libcppyy_backend!cppyy_vectorbool_setitem() libcppyy_backend!cppyy_vectorbool_setitem() ntdll!RtlActivateActivationContextUnsafeFast() ntdll!LdrGetProcedureAddressEx() ntdll!LdrGetProcedureAddressEx() ntdll!RtlSwitchedVVI() ntdll!RtlGetFullPathName_UstrEx() ntdll!RtlDosPathNameToNtPathName_U() ntdll!LdrLoadDll() KERNELBASE!LoadLibraryExW() _ctypes!DllCanUnloadNow() python310!PyCFunction_GetFlags() python310!PyObject_MakeTpCall() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyObject_FastCallDictTstate() python310!PyObject_Call_Prepend() python310!PyType_Ready() python310!PyType_Name() python310!PyObject_MakeTpCall() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyOS_URandomNonblock() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyOS_URandomNonblock() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalCode() python310!PyWarnings_Init() python310!PyCFunction_GetFlags() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyOS_URandomNonblock() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyOS_URandomNonblock() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyOS_URandomNonblock() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyOS_URandomNonblock() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyBytesWriter_WriteBytes() python310!PyObject_CallMethodIdObjArgs() python310!PyImport_ImportModuleNoBlock() python310!PyImport_ImportModuleLevelObject() python310!PyEval_SliceIndexNotNone() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalCode() python310!PyWarnings_Init() python310!PyCFunction_GetFlags() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyOS_URandomNonblock() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyOS_URandomNonblock() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyOS_URandomNonblock() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyOS_URandomNonblock() python310!PyEval_GetFuncDesc() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyFunction_Vectorcall() python310!PyBytesWriter_WriteBytes() python310!PyObject_CallMethodIdObjArgs() python310!PyImport_ImportModuleNoBlock() python310!PyImport_ImportModuleLevelObject() python310!PyEval_SliceIndexNotNone() python310!PyEval_EvalFrameDefault() python310!PyEval_EvalFrameDefault() python310!PyRun_FileExFlags() python310!PyRun_FileExFlags() python310!PyRun_InteractiveLoopFlags() python310!PyRun_InteractiveLoopObject() python310!PyObject_GC_IsFinalized() python310!PyObject_GC_IsFinalized() python310!Py_RunMain() python310!Py_Main() python!OPENSSL_Applink() KERNEL32!BaseThreadInitThunk() ntdll!RtlUserThreadStart() ================ Thread 1 ================ ntdll!ZwWaitForWorkViaWorkerFactory() ntdll!TpReleaseCleanupGroupMembers() KERNEL32!BaseThreadInitThunk() ntdll!RtlUserThreadStart() ================ Thread 2 ================ ntdll!ZwWaitForWorkViaWorkerFactory() ntdll!TpReleaseCleanupGroupMembers() KERNEL32!BaseThreadInitThunk() ntdll!RtlUserThreadStart() ================ Thread 3 ================ ntdll!ZwWaitForWorkViaWorkerFactory() ntdll!TpReleaseCleanupGroupMembers() KERNEL32!BaseThreadInitThunk() ntdll!RtlUserThreadStart() ================ Thread 4 ================ ntdll!ZwWaitForMultipleObjects() KERNELBASE!WaitForMultipleObjectsEx() KERNELBASE!WaitForMultipleObjects() ConEmuHk64!RequestLocalServer() ConEmuHk64!RequestLocalServer() ConEmuHk64!GetRealConsoleWindow() ConEmuHk64!RequestLocalServer() ConEmuHk64!SetLoadLibraryCallback() KERNEL32!BaseThreadInitThunk() ntdll!RtlUserThreadStart() ========================================== ============= END STACKTRACE ============= ========================================== ```
metab0t commented 2 years ago

BTW, maybe we should add some reminders in documentation for users on Windows to run Python within an MSVC environment?

wlav commented 2 years ago

Yes, but I'll first try VS 2022, see what is different (I've been using 2019 so far, and last time I checked using the PCH worked w/o further access to standard header files).

wlav commented 2 years ago

This was fixed with patch release 2.3.1 and its dependencies.