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

Build error on Windows 10 #254

Open
vanotuvanov opened this issue Sep 2, 2024 · 10 comments
Open

Build error on Windows 10 #254

vanotuvanov opened this issue Sep 2, 2024 · 10 comments

Comments

@vanotuvanov
Copy link

Hello, when building from the source codes of your library with the command pip install cppyy --no-binary=cppyy-cling --force-reinstall --verbose, the build crashes with , the log is presented below.
The build takes place in Windows 10, using the MSVC compiler, python 3.11.5.

Build log with errors Building wheels for collected packages: cppyy-backend, cppyy-cling
Building wheel for cppyy-backend (pyproject.toml): started
Running command Building wheel for cppyy-backend (pyproject.toml)
running bdist_wheel
running build
running build_ext
checking for build\temp.win32-cpython-311\Release
creating build\temp.win32-cpython-311\Release
creating build\temp.win32-cpython-311\Release\src
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\TEMP\pip-build-env-kijlmn05\overlay\Lib\site-packages\cppyy_backend\include -IC:\Users\tumanov\AppData\Local\Programs\Python\Python311\include -IC:\Users\tumanov\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-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:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-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" /EHsc /Tpsrc\clingwrapper.cxx /Fobuild\temp.win32-cpython-311\Release\src\clingwrapper.obj -O2 -Zc:__cplusplus /std:c++latest /GR /EHsc- /MD
cl: Є®¬ ­¤­ п бва®Є  warning D9025: ЇҐаҐ®ЇаҐ¤Ґ«Ґ­ЁҐ "/EHc" ­  "/EHc-"
clingwrapper.cxx
now building libcppyy_backend.dll
creating C:\TEMP\pip-install-hzqqolkh\cppyy-backend_05bfc0ed0867423aa35acf6f0f653bac\build\lib.win32-cpython-311
creating C:\TEMP\pip-install-hzqqolkh\cppyy-backend_05bfc0ed0867423aa35acf6f0f653bac\build\lib.win32-cpython-311\cppyy_backend
creating C:\TEMP\pip-install-hzqqolkh\cppyy-backend_05bfc0ed0867423aa35acf6f0f653bac\build\lib.win32-cpython-311\cppyy_backend\lib
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX86\x86\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\TEMP\pip-build-env-kijlmn05\overlay\Lib\site-packages\cppyy_backend\lib /LIBPATH:C:\Users\tumanov\AppData\Local\Programs\Python\Python311\libs /LIBPATH:C:\Users\tumanov\AppData\Local\Programs\Python\Python311 /LIBPATH:C:\Users\tumanov\AppData\Local\Programs\Python\Python311\PCbuild\win32 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\ATLMFC\lib\x86" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\lib\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x86" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\ATLMFC\lib\x86" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\lib\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x86" libCoreLegacy.lib libThreadLegacy.lib libRIOLegacy.lib libCling.lib build\temp.win32-cpython-311\Release\src\clingwrapper.obj /OUT:build\lib.win32-cpython-311\cppyy_backend\lib\libcppyy_backend.dll /IMPLIB:build\lib.win32-cpython-311\cppyy_backend\lib\libcppyy_backend.lib /EXPORT:?__type_info_root_node@@3U__type_info_node@@A
   ‘®§¤ Ґвбп ЎЁЎ«Ё®вҐЄ  build\lib.win32-cpython-311\cppyy_backend\lib\libcppyy_backend.lib Ё ®ЎкҐЄв build\lib.win32-cpython-311\cppyy_backend\lib\libcppyy_backend.exp
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "__declspec(dllimport) class CppyyLegacy::TInterpreter * gCling" (__imp_?gCling@@3PAVTInterpreter@CppyyLegacy@@A).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "__declspec(dllimport) class CppyyLegacy::TSystem * gSystem" (__imp_?gSystem@@3PAVTSystem@CppyyLegacy@@A).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "__declspec(dllimport) struct CppyyLegacy::ExceptionContext_t * gException" (__imp_?gException@@3PAUExceptionContext_t@CppyyLegacy@@A).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class CppyyLegacy::TDictionary * __thiscall CppyyLegacy::TListOfDataMembers::Get(class CppyyLegacy::DataMemberInfo_t *,bool)" (?Get@TListOfDataMembers@CppyyLegacy@@QAEPAVTDictionary@2@PAVDataMemberInfo_t@2@_N@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: static bool __cdecl CppyyLegacy::TROOT::Initialized(void)" (?Initialized@TROOT@CppyyLegacy@@SA_NXZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class CppyyLegacy::TFunction * __thiscall CppyyLegacy::TROOT::GetGlobalFunctionWithPrototype(char const *,char const *,bool)" (?GetGlobalFunctionWithPrototype@TROOT@CppyyLegacy@@QAEPAVTFunction@2@PBD0_N@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class CppyyLegacy::TFunctionTemplate * __thiscall CppyyLegacy::TROOT::GetFunctionTemplate(char const *)" (?GetFunctionTemplate@TROOT@CppyyLegacy@@QAEPAVTFunctionTemplate@2@PBD@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class CppyyLegacy::TDataType * __thiscall CppyyLegacy::TROOT::GetType(char const *,bool)const " (?GetType@TROOT@CppyyLegacy@@QBEPAVTDataType@2@PBD_N@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class CppyyLegacy::TCollection * __thiscall CppyyLegacy::TROOT::GetListOfFunctionTemplates(void)" (?GetListOfFunctionTemplates@TROOT@CppyyLegacy@@QAEPAVTCollection@2@XZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class CppyyLegacy::TCollection * __thiscall CppyyLegacy::TROOT::GetListOfEnums(bool)" (?GetListOfEnums@TROOT@CppyyLegacy@@QAEPAVTCollection@2@_N@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class CppyyLegacy::TCollection * __thiscall CppyyLegacy::TROOT::GetListOfGlobalFunctions(bool)" (?GetListOfGlobalFunctions@TROOT@CppyyLegacy@@QAEPAVTCollection@2@_N@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class CppyyLegacy::TCollection * __thiscall CppyyLegacy::TROOT::GetListOfGlobals(bool)" (?GetListOfGlobals@TROOT@CppyyLegacy@@QAEPAVTCollection@2@_N@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class CppyyLegacy::TCollection * __thiscall CppyyLegacy::TROOT::GetListOfTypes(bool)" (?GetListOfTypes@TROOT@CppyyLegacy@@QAEPAVTCollection@2@_N@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "void __cdecl CppyyLegacy::Class_ShowMembers(class CppyyLegacy::TClass *,void const *,class CppyyLegacy::TMemberInspector &)" (?Class_ShowMembers@CppyyLegacy@@YAXPAVTClass@1@PBXAAVTMemberInspector@1@@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "__declspec(dllimport) int CppyyLegacy::gErrorIgnoreLevel" (__imp_?gErrorIgnoreLevel@CppyyLegacy@@3HA).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: virtual void __thiscall CppyyLegacy::TIter::Streamer(class CppyyLegacy::TBuffer &)" (?Streamer@TIter@CppyyLegacy@@UAEXAAVTBuffer@2@@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: static class CppyyLegacy::TClass * __cdecl CppyyLegacy::TIter::Class(void)" (?Class@TIter@CppyyLegacy@@SAPAVTClass@2@XZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: static void __cdecl CppyyLegacy::TObject::operator delete(void *)" (??3TObject@CppyyLegacy@@SAXPAX@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: static void * __cdecl CppyyLegacy::TStorage::ObjectAlloc(unsigned int)" (?ObjectAlloc@TStorage@CppyyLegacy@@SAPAXI@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: static void __cdecl CppyyLegacy::TThread::Initialize(void)" (?Initialize@TThread@CppyyLegacy@@SAXXZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class CppyyLegacy::TypeInfo_t * __thiscall CppyyLegacy::TMethodArg::GetTypeInfo(void)const " (?GetTypeInfo@TMethodArg@CppyyLegacy@@QBEPAVTypeInfo_t@2@XZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall CppyyLegacy::TMethodArg::GetTypeNormalizedName(void)const " (?GetTypeNormalizedName@TMethodArg@CppyyLegacy@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: char const * __thiscall CppyyLegacy::TMethodArg::GetFullTypeName(void)const " (?GetFullTypeName@TMethodArg@CppyyLegacy@@QBEPBDXZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: char const * __thiscall CppyyLegacy::TMethodArg::GetDefault(void)const " (?GetDefault@TMethodArg@CppyyLegacy@@QBEPBDXZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "class CppyyLegacy::TROOT * __cdecl CppyyLegacy::GetROOT(void)" (?GetROOT@CppyyLegacy@@YAPAVTROOT@1@XZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "__declspec(dllimport) class CppyyLegacy::TExceptionHandler * CppyyLegacy::gExceptionHandler" (__imp_?gExceptionHandler@CppyyLegacy@@3PAVTExceptionHandler@1@A).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: static char const * __cdecl CppyyLegacy::TDataType::GetTypeName(enum CppyyLegacy::EDataType)" (?GetTypeName@TDataType@CppyyLegacy@@SAPBDW4EDataType@2@@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: int __thiscall CppyyLegacy::TDataType::Size(void)const " (?Size@TDataType@CppyyLegacy@@QBEHXZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl CppyyLegacy::TClassEdit::CleanType(char const *,int,char const * *)" (?CleanType@TClassEdit@CppyyLegacy@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBDHPAPBD@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl CppyyLegacy::TClassEdit::ResolveTypedef(char const *,bool)" (?ResolveTypedef@TClassEdit@CppyyLegacy@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBD_N@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl CppyyLegacy::TClassEdit::ShortType(char const *,int)" (?ShortType@TClassEdit@CppyyLegacy@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBDH@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "bool __cdecl CppyyLegacy::Internal::HasConsistentHashMember(class CppyyLegacy::TClass &)" (?HasConsistentHashMember@Internal@CppyyLegacy@@YA_NAAVTClass@2@@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "bool __cdecl CppyyLegacy::Internal::HasConsistentHashMember(char const *)" (?HasConsistentHashMember@Internal@CppyyLegacy@@YA_NPBD@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: static class CppyyLegacy::TInterpreter * __cdecl CppyyLegacy::TInterpreter::Instance(void)" (?Instance@TInterpreter@CppyyLegacy@@SAPAV12@XZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "__declspec(dllimport) class CppyyLegacy::TVirtualMutex * CppyyLegacy::gInterpreterMutex" (__imp_?gInterpreterMutex@CppyyLegacy@@3PAVTVirtualMutex@1@A).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: char const * __thiscall CppyyLegacy::TDataMember::GetTrueTypeName(void)const " (?GetTrueTypeName@TDataMember@CppyyLegacy@@QBEPBDXZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: char const * __thiscall CppyyLegacy::TDataMember::GetFullTypeName(void)const " (?GetFullTypeName@TDataMember@CppyyLegacy@@QBEPBDXZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: char const * __thiscall CppyyLegacy::TDataMember::GetTypeName(void)const " (?GetTypeName@TDataMember@CppyyLegacy@@QBEPBDXZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: int __thiscall CppyyLegacy::TDataMember::GetOffsetCint(void)const " (?GetOffsetCint@TDataMember@CppyyLegacy@@QBEHXZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: int __thiscall CppyyLegacy::TDataMember::GetMaxIndex(int)const " (?GetMaxIndex@TDataMember@CppyyLegacy@@QBEHH@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: void const * __thiscall CppyyLegacy::TDataMember::GetTagDeclId(void)const " (?GetTagDeclId@TDataMember@CppyyLegacy@@QBEPBXXZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: int __thiscall CppyyLegacy::TDataMember::GetArrayDim(void)const " (?GetArrayDim@TDataMember@CppyyLegacy@@QBEHXZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: long __thiscall CppyyLegacy::TFunction::ExtraProperty(void)const " (?ExtraProperty@TFunction@CppyyLegacy@@QBEJXZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: void const * __thiscall CppyyLegacy::TFunction::GetDeclId(void)const " (?GetDeclId@TFunction@CppyyLegacy@@QBEPBXXZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: int __thiscall CppyyLegacy::TFunction::GetNargsOpt(void)const " (?GetNargsOpt@TFunction@CppyyLegacy@@QBEHXZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: int __thiscall CppyyLegacy::TFunction::GetNargs(void)const " (?GetNargs@TFunction@CppyyLegacy@@QBEHXZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class CppyyLegacy::TList * __thiscall CppyyLegacy::TFunction::GetListOfMethodArgs(void)" (?GetListOfMethodArgs@TFunction@CppyyLegacy@@QAEPAVTList@2@XZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall CppyyLegacy::TFunction::GetReturnTypeNormalizedName(void)const " (?GetReturnTypeNormalizedName@TFunction@CppyyLegacy@@QBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: char const * __thiscall CppyyLegacy::TFunction::GetReturnTypeName(void)const " (?GetReturnTypeName@TFunction@CppyyLegacy@@QBEPBDXZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: __thiscall CppyyLegacy::TFunction::TFunction(class CppyyLegacy::MethodInfo_t *)" (??0TFunction@CppyyLegacy@@QAE@PAVMethodInfo_t@1@@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: __thiscall CppyyLegacy::TFunction::TFunction(class CppyyLegacy::TFunction const &)" (??0TFunction@CppyyLegacy@@QAE@ABV01@@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "__declspec(dllimport) void __cdecl CppyyLegacy::Throw(int)" (__imp_?Throw@CppyyLegacy@@YAXH@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: long __thiscall CppyyLegacy::TFunctionTemplate::ExtraProperty(void)const " (?ExtraProperty@TFunctionTemplate@CppyyLegacy@@QBEJXZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: enum CppyyLegacy::EDataType __thiscall CppyyLegacy::TEnum::GetUnderlyingType(void)const " (?GetUnderlyingType@TEnum@CppyyLegacy@@QBE?AW4EDataType@2@XZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: __thiscall CppyyLegacy::TClassRef::TClassRef(class CppyyLegacy::TClass *)" (??0TClassRef@CppyyLegacy@@QAE@PAVTClass@1@@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: __thiscall CppyyLegacy::TClassRef::TClassRef(char const *)" (??0TClassRef@CppyyLegacy@@QAE@PBD@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: __thiscall CppyyLegacy::TClassRef::TClassRef(class CppyyLegacy::TClassRef const &)" (??0TClassRef@CppyyLegacy@@QAE@ABV01@@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "private: class CppyyLegacy::TClass * __thiscall CppyyLegacy::TClassRef::InternalGetClass(void)const " (?InternalGetClass@TClassRef@CppyyLegacy@@ABEPAVTClass@2@XZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: void __thiscall CppyyLegacy::TClass::Destructor(void *,bool)" (?Destructor@TClass@CppyyLegacy@@QAEXPAX_N@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: static class CppyyLegacy::TClass * __cdecl CppyyLegacy::TClass::GetClass(char const *,bool,bool)" (?GetClass@TClass@CppyyLegacy@@SAPAV12@PBD_N1@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: void * __thiscall CppyyLegacy::TClass::New(enum CppyyLegacy::TClass::ENewType,bool)const " (?New@TClass@CppyyLegacy@@QBEPAXW4ENewType@12@_N@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: void * __thiscall CppyyLegacy::TClass::New(void *,enum CppyyLegacy::TClass::ENewType)const " (?New@TClass@CppyyLegacy@@QBEPAXPAXW4ENewType@12@@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: bool __thiscall CppyyLegacy::TClass::IsLoaded(void)const " (?IsLoaded@TClass@CppyyLegacy@@QBE_NXZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class CppyyLegacy::TMethod * __thiscall CppyyLegacy::TClass::GetMethodAllAny(char const *)" (?GetMethodAllAny@TClass@CppyyLegacy@@QAEPAVTMethod@2@PBD@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class CppyyLegacy::TMethod * __thiscall CppyyLegacy::TClass::GetMethodAny(char const *)" (?GetMethodAny@TClass@CppyyLegacy@@QAEPAVTMethod@2@PBD@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class CppyyLegacy::TMethod * __thiscall CppyyLegacy::TClass::GetMethodWithPrototype(char const *,char const *,bool,enum CppyyLegacy::EFunctionMatchMode)" (?GetMethodWithPrototype@TClass@CppyyLegacy@@QAEPAVTMethod@2@PBD0_NW4EFunctionMatchMode@2@@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class CppyyLegacy::TMethod * __thiscall CppyyLegacy::TClass::GetMethod(char const *,char const *,bool)" (?GetMethod@TClass@CppyyLegacy@@QAEPAVTMethod@2@PBD0_N@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class CppyyLegacy::TFunctionTemplate * __thiscall CppyyLegacy::TClass::GetFunctionTemplate(char const *)" (?GetFunctionTemplate@TClass@CppyyLegacy@@QAEPAVTFunctionTemplate@2@PBD@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class CppyyLegacy::TClass * __thiscall CppyyLegacy::TClass::GetBaseClass(class CppyyLegacy::TClass const *)" (?GetBaseClass@TClass@CppyyLegacy@@QAEPAV12@PBV12@@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class CppyyLegacy::TClass * __thiscall CppyyLegacy::TClass::GetActualClass(void const *)const " (?GetActualClass@TClass@CppyyLegacy@@QBEPAV12@PBX@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class CppyyLegacy::TList * __thiscall CppyyLegacy::TClass::GetListOfMethods(bool)" (?GetListOfMethods@TClass@CppyyLegacy@@QAEPAVTList@2@_N@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class CppyyLegacy::TList * __thiscall CppyyLegacy::TClass::GetListOfBases(void)" (?GetListOfBases@TClass@CppyyLegacy@@QAEPAVTList@2@XZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class CppyyLegacy::TList * __thiscall CppyyLegacy::TClass::GetListOfFunctionTemplates(bool)" (?GetListOfFunctionTemplates@TClass@CppyyLegacy@@QAEPAVTList@2@_N@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class CppyyLegacy::TList * __thiscall CppyyLegacy::TClass::GetListOfEnums(bool)" (?GetListOfEnums@TClass@CppyyLegacy@@QAEPAVTList@2@_N@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: class CppyyLegacy::TList * __thiscall CppyyLegacy::TClass::GetListOfDataMembers(bool)" (?GetListOfDataMembers@TClass@CppyyLegacy@@QAEPAVTList@2@_N@Z).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: void (__cdecl*__thiscall CppyyLegacy::TClass::GetDelete(void)const )(void *)" (?GetDelete@TClass@CppyyLegacy@@QBEP6AXPAX@ZXZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: bool __thiscall CppyyLegacy::TClass::HasDefaultConstructor(void)const " (?HasDefaultConstructor@TClass@CppyyLegacy@@QBE_NXZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: long __thiscall CppyyLegacy::TClass::ClassProperty(void)const " (?ClassProperty@TClass@CppyyLegacy@@QBEJXZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "private: void __thiscall CppyyLegacy::TClass::LoadClassInfo(void)const " (?LoadClassInfo@TClass@CppyyLegacy@@ABEXXZ).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "__declspec(dllimport) class CppyyLegacy::TVirtualRWMutex * CppyyLegacy::gCoreMutex" (__imp_?gCoreMutex@CppyyLegacy@@3PAVTVirtualRWMutex@1@A).
clingwrapper.obj : error LNK2001: ­Ґа §аҐиҐ­­л© ў­Ґи­Ё© бЁ¬ў®« "public: __thiscall CppyyLegacy::TVersionCheck::TVersionCheck(int)" (??0TVersionCheck@CppyyLegacy@@QAE@H@Z).
build\lib.win32-cpython-311\cppyy_backend\lib\libcppyy_backend.dll : fatal error LNK1120: ­Ґа §аҐиҐ­­ле ў­Ґи­Ёе н«Ґ¬Ґ­в®ў: 81
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x86\\link.exe' failed with exit code 1120
error: subprocess-exited-with-error

Building wheel for cppyy-backend (pyproject.toml) 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: 'C:\Users\tumanov\AppData\Local\Programs\Python\Python311\python.exe' 'C:\Users\tumanov\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py' build_wheel 'C:\TEMP\tmppv3gy6qt'
cwd: C:\TEMP\pip-install-hzqqolkh\cppyy-backend_05bfc0ed0867423aa35acf6f0f653bac
Building wheel for cppyy-backend (pyproject.toml): finished with status 'error'
ERROR: Failed building wheel for cppyy-backend
Building wheel for cppyy-cling (pyproject.toml): started
@wlav
Copy link
Owner

wlav commented Sep 2, 2024

No idea ... these symbols are provided by libCoreLegacy.lib, which is listed on the command line above.

Can you check that library with dumpbin.exe /exports? Maybe there's a disagreement between calling conventions.

@vanotuvanov
Copy link
Author

I don't quite understand what I should see in the output of this command. I copied the entire output to the attached file. Can you take a look at it or tell me what to find?
outLibCoreLegace.txt

@wlav
Copy link
Owner

wlav commented Sep 4, 2024

From that output, you can see that libCoreLib contains symbols build for 64b windows, but you are creating a 32b build above. My best guess is that you are running a 32b version of Python in a 64b MSVC environment.

@vanotuvanov
Copy link
Author

Thanks! It really helped to complete the build, but other problems arose.
I want to make a small digression and explain why I'm going to use your wonderful library. I need to wrap a fairly large library written in c++ using CMAKE. It needs to be implemented on Linux and Windows. Everything worked out on Linux, and the following problems occurred when building on Windows:

Build log in QtCreator with errors testPoint.cxx.obj : error LNK2019: unresolved external symbol "class CppyyLegacy::Internal::TInitBehavior const * __cdecl CppyyLegacy::Internal::DefineBehavior(void *,void *)" (?DefineBehavior@Internal@CppyyLegacy@@YAPEBVTInitBehavior@12@PEAX0@Z) referenced in function "class CppyyLegacy::TGenericClassInfo * __cdecl CppyyLegacy::GenerateInitInstanceLocal(class TestPoint const *)" (?GenerateInitInstanceLocal@CppyyLegacy@@YAPEAVTGenericClassInfo@1@PEBVTestPoint@@@z) testPoint.cxx.obj : error LNK2019: unresolved external symbol "public: __cdecl CppyyLegacy::TGenericClassInfo::TGenericClassInfo(char const *,char const *,int,class type_info const &,class CppyyLegacy::Internal::TInitBehavior const *,class CppyyLegacy::TClass * (__cdecl*)(void),class CppyyLegacy::TVirtualIsAProxy *,int,int)" (??0TGenericClassInfo@CppyyLegacy@@qeaa@PEBD0HAEBVtype_info@@PEBVTInitBehavior@Internal@1@P6APEAVTClass@1@XZPEAVTVirtualIsAProxy@1@HH@Z) referenced in function "class CppyyLegacy::TGenericClassInfo * __cdecl CppyyLegacy::GenerateInitInstanceLocal(class TestPoint const *)" (?GenerateInitInstanceLocal@CppyyLegacy@@YAPEAVTGenericClassInfo@1@PEBVTestPoint@@@z) testPoint.cxx.obj : error LNK2019: unresolved external symbol "public: __cdecl CppyyLegacy::TGenericClassInfo::~TGenericClassInfo(void)" (??1TGenericClassInfo@CppyyLegacy@@qeaa@XZ) referenced in function "void __cdecl `class GenerateInitInstanceLocal::TGenericClassInfo * __cdecl CppyyLegacy::GenerateInitInstanceLocal(class TestPoint const *)'::`2'::`dynamic atexit destructor for 'instance''(void)" (??__Finstance@?1??GenerateInitInstanceLocal@CppyyLegacy@@YAPEAVTGenericClassInfo@1@PEBVTestPoint@@@z@YAXXZ) testPoint.cxx.obj : error LNK2019: unresolved external symbol "public: class CppyyLegacy::TClass * __cdecl CppyyLegacy::TGenericClassInfo::GetClass(void)" (?GetClass@TGenericClassInfo@CppyyLegacy@@QEAAPEAVTClass@2@XZ) referenced in function "class CppyyLegacy::TClass * __cdecl CppyyLegacy::TestPoint_Dictionary(void)" (?TestPoint_Dictionary@CppyyLegacy@@YAPEAVTClass@1@XZ) testPoint.cxx.obj : error LNK2019: unresolved external symbol "public: void __cdecl CppyyLegacy::TGenericClassInfo::SetDelete(void (__cdecl*)(void *))" (?SetDelete@TGenericClassInfo@CppyyLegacy@@QEAAXP6AXPEAX@Z@Z) referenced in function "class CppyyLegacy::TGenericClassInfo * __cdecl CppyyLegacy::GenerateInitInstanceLocal(class TestPoint const *)" (?GenerateInitInstanceLocal@CppyyLegacy@@YAPEAVTGenericClassInfo@1@PEBVTestPoint@@@z) testPoint.cxx.obj : error LNK2019: unresolved external symbol "public: void __cdecl CppyyLegacy::TGenericClassInfo::SetDeleteArray(void (__cdecl*)(void *))" (?SetDeleteArray@TGenericClassInfo@CppyyLegacy@@QEAAXP6AXPEAX@Z@Z) referenced in function "class CppyyLegacy::TGenericClassInfo * __cdecl CppyyLegacy::GenerateInitInstanceLocal(class TestPoint const *)" (?GenerateInitInstanceLocal@CppyyLegacy@@YAPEAVTGenericClassInfo@1@PEBVTestPoint@@@z) testPoint.cxx.obj : error LNK2019: unresolved external symbol "public: void __cdecl CppyyLegacy::TGenericClassInfo::SetDestructor(void (__cdecl*)(void *))" (?SetDestructor@TGenericClassInfo@CppyyLegacy@@QEAAXP6AXPEAX@Z@Z) referenced in function "class CppyyLegacy::TGenericClassInfo * __cdecl CppyyLegacy::GenerateInitInstanceLocal(class TestPoint const *)" (?GenerateInitInstanceLocal@CppyyLegacy@@YAPEAVTGenericClassInfo@1@PEBVTestPoint@@@z) testPoint.cxx.obj : error LNK2019: unresolved external symbol "public: void __cdecl CppyyLegacy::TGenericClassInfo::SetNew(void * (__cdecl*)(void *))" (?SetNew@TGenericClassInfo@CppyyLegacy@@QEAAXP6APEAXPEAX@Z@Z) referenced in function "class CppyyLegacy::TGenericClassInfo * __cdecl CppyyLegacy::GenerateInitInstanceLocal(class TestPoint const *)" (?GenerateInitInstanceLocal@CppyyLegacy@@YAPEAVTGenericClassInfo@1@PEBVTestPoint@@@z) testPoint.cxx.obj : error LNK2019: unresolved external symbol "public: void __cdecl CppyyLegacy::TGenericClassInfo::SetNewArray(void * (__cdecl*)(long,void *))" (?SetNewArray@TGenericClassInfo@CppyyLegacy@@QEAAXP6APEAXJPEAX@Z@Z) referenced in function "class CppyyLegacy::TGenericClassInfo * __cdecl CppyyLegacy::GenerateInitInstanceLocal(class TestPoint const *)" (?GenerateInitInstanceLocal@CppyyLegacy@@YAPEAVTGenericClassInfo@1@PEBVTestPoint@@@z) testPoint.cxx.obj : error LNK2019: unresolved external symbol "public: __cdecl CppyyLegacy::TIsAProxy::TIsAProxy(class type_info const &)" (??0TIsAProxy@CppyyLegacy@@qeaa@AEBVtype_info@@@z) referenced in function "class CppyyLegacy::TGenericClassInfo * __cdecl CppyyLegacy::GenerateInitInstanceLocal(class TestPoint const *)" (?GenerateInitInstanceLocal@CppyyLegacy@@YAPEAVTGenericClassInfo@1@PEBVTestPoint@@@z) testPoint.cxx.obj : error LNK2019: unresolved external symbol "public: __cdecl CppyyLegacy::TVersionCheck::TVersionCheck(int)" (??0TVersionCheck@CppyyLegacy@@qeaa@H@Z) referenced in function "void __cdecl CppyyLegacy::Internal::`dynamic initializer for 'gVersionCheck''(void)" (??__EgVersionCheck@Internal@CppyyLegacy@@yaxxz) testPoint.cxx.obj : error LNK2019: unresolved external symbol "public: static void __cdecl CppyyLegacy::TROOT::RegisterModule(char const *,char const * *,char const * *,char const *,char const *,void (__cdecl*)(void),class std::vector,class std::allocator >,int>,class std::allocator,class std::allocator >,int> > > const &,char const * *,bool)" (?RegisterModule@TROOT@CppyyLegacy@@SAXPEBDPEAPEBD100P6AXXZAEBV?$vector@U?$pair@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@h@std@@v?$allocator@U?$pair@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@h@std@@@2@@std@@1_N@Z) referenced in function "void __cdecl `anonymous namespace'::TriggerDictionaryInitialization_libtestPointLib_Impl(void)" (?TriggerDictionaryInitialization_libtestPointLib_Impl@?A0xe47f9b88@@yaxxz) testPointLib.dll : fatal error LNK1120: 12 unresolved externals
At the same time, everything was imported into Python without errors. Since it was possible to solve a similar problem on Linux by building from source, attempts were also made to build on Windows. Thanks to your previous answer, it turned out to create whl files for each module (cppyy-cling, cppyy-backend, CPyCppyy, cppyy).

But after installing dll files using pip (pip install .whl), a new problem appeared.

Errors log in python C:\Users\tumanov>python Python 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:38:34) [MSC v.1936 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import cppyy Traceback (most recent call last): File "", line 1, in File "C:\Users\tumanov\AppData\Local\Programs\Python\Python311\Lib\site-packages\cppyy\__init__.py", line 81, in from ._cpython_cppyy import * File "C:\Users\tumanov\AppData\Local\Programs\Python\Python311\Lib\site-packages\cppyy\_cpython_cppyy.py", line 21, in c = loader.load_cpp_backend() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\tumanov\AppData\Local\Programs\Python\Python311\Lib\site-packages\cppyy_backend\loader.py", line 92, in load_cpp_backend raise RuntimeError("could not load cppyy_backend library, details:\n%s" % RuntimeError: could not load cppyy_backend library, details: Could not find module 'libcppyy_backend.cp311-win_amd64.pyd' (or one of its dependencies). Try using the full path with constructor syntax. Could not find module 'C:\Users\tumanov\AppData\Local\Programs\Python\Python311\Lib\site-packages\cppyy_backend\lib\libcppyy_backend.cp311-win_amd64.pyd' (or one of its dependencies). Try using the full path with constructor syntax. [WinError 1114] Произошел сбой в программе инициализации библиотеки динамической компоновки (DLL) Could not find module 'libcppyy_backend.dll' (or one of its dependencies). Try using the full path with constructor syntax.

A similar problem was manifested in PyCharm. But, there was also the following conclusion:

Stacktrace in PyCharm ========================================== =============== STACKTRACE =============== ==========================================

================ Thread 0 ================
ntdll!RtlAllocateHeap()
ntdll!RtlAnsiStringToUnicodeString()
KERNELBASE!DeleteFileA()
KERNELBASE!GetModuleHandleExA()
IMAGEHLP!TouchFileTimes()
IMAGEHLP!ImageRemoveCertificate()
IMAGEHLP!SymFreeDiaString()
libCoreLegacy!CppyyLegacy::TWinNTSystem::StackTrace()
libCoreLegacy!CppyyLegacy::TWinNTSystem::DispatchSignals()
ucrtbase!seh_filter_exe()
python!??
VCRUNTIME140!_C_specific_handler()
ntdll!_chkstk()
ntdll!RtlWalkFrameChain()
ntdll!KiUserExceptionDispatcher()
ntdll!RtlAllocateHeap()
ntdll!RtlAllocateHeap()
ntdll!RtlDosPathNameToRelativeNtPathName_U_WithStatus()
ntdll!RtlDosPathNameToRelativeNtPathName_U_WithStatus()
KERNELBASE!CreateFileW()
KERNELBASE!CreateFileW()
python311!PyStructSequence_New()
python311!PyStructSequence_New()
python311!PyStructSequence_New()
python311!PyEval_EvalFrameDefault()
python311!PyMapping_Check()
python311!PyEval_EvalCode()
python311!PyMapping_Items()
python311!PyMapping_Items()
python311!PyUnicode_RichCompare()
python311!PyObject_Call()
python311!PyList_AsTuple()
python311!PyEval_EvalFrameDefault()
python311!PyObject_GetBuffer()
python311!PyObject_CallMethodObjArgs()
python311!PyObject_CallMethodObjArgs()
python311!PyConfig_FromDict()
python311!PyImport_ImportModuleLevelObject()
python311!PyException_GetTraceback()
python311!PyEval_EvalFrameDefault()
python311!PyMapping_Check()
python311!PyEval_EvalCode()
python311!PyMapping_Items()
python311!PyMapping_Items()
python311!PyUnicode_RichCompare()
python311!PyObject_Call()
python311!PyList_AsTuple()
python311!PyEval_EvalFrameDefault()
python311!PyObject_GetBuffer()
python311!PyObject_CallMethodObjArgs()
python311!PyObject_CallMethodObjArgs()
python311!PyConfig_FromDict()
python311!PyImport_ImportModuleLevelObject()
python311!PyException_GetTraceback()
python311!PyEval_EvalFrameDefault()
python311!PyMapping_Check()
python311!PyEval_EvalCode()
python311!PyUnicode_GetLength()
python311!PyUnicode_GetLength()
python311!PyThread_tss_is_created()
python311!PyRun_SimpleFileObject()
python311!PyRun_AnyFileObject()
python311!Py_MakePendingCalls()
python311!Py_MakePendingCalls()
python311!Py_RunMain()
python311!Py_RunMain()
python311!Py_Main()
python!??
KERNEL32!BaseThreadInitThunk()
ntdll!RtlUserThreadStart()

================ Thread 1 ================
ntdll!ZwWaitForWorkViaWorkerFactory()
ntdll!RtlReleaseSRWLockExclusive()
KERNEL32!BaseThreadInitThunk()
ntdll!RtlUserThreadStart()

================ Thread 2 ================
ntdll!NtWaitForMultipleObjects()
KERNELBASE!WaitForMultipleObjectsEx()
KERNELBASE!WaitForMultipleObjects()
SIPH64!??
SIPH64!??
SIPH64!??
KERNEL32!BaseThreadInitThunk()
ntdll!RtlUserThreadStart()

================ Thread 3 ================
ntdll!NtWaitForMultipleObjects()
KERNELBASE!WaitForMultipleObjectsEx()
KERNELBASE!WaitForMultipleObjects()
SIPH64!??
SIPH64!??
SIPH64!??
SIPH64!??
KERNEL32!BaseThreadInitThunk()
ntdll!RtlUserThreadStart()

==========================================
============= END STACKTRACE =============

The file libcppyy_backend.dll indeed, it is in the Python\Python311\Lib\site-packages\cppyy_backend\lib folder. The path to the loder.The py is transmitted correctly. And a curious note, with the usual installation of cppyy using pip, the installation is correct. The cppyy import is error-free, but the error in QtCreator is still being reproduced. QtCreator uses MSVC 2017 64 bit. Do you have any thoughts about the following:
  1. Why is there an error in the compiled cppyy in Windows?
  2. How can I try to fix this?
  3. Is this error related to a bug in QtCreator?
  4. If not, what steps can be taken to fix the error in QtCreator?

@wlav
Copy link
Owner

wlav commented Sep 5, 2024

For the first error, I'm not sure how the the build of that dictionary file was executed (I can't find the actual link command in the trace), but all those symbols live in libCoreLegacy, so it should be linked with that. On Linux, you don't need to: symbol resolution is completely deferred until runtime, so that difference isn't surprising. Aside, dictionaries aren't needed unless you want to package code (such as include paths and headers) with binaries. Technically, dictionaries only still exist for automatic I/O, but that has never been advertised as a feature and is slated to be removed altogether. It suffices to simply load the headers and shared libraries.

As for the Python error, there may still be issues of 32b vs. 64b Python and library. A clearer, more descriptive, error typically shows up if you try to load libcppyy_backend.dll with ctypes.CDLL() (use the full path to the filename). The file build really should have the full platform name in it, so not sure why that isn't the case here (old releases didn't, but using the full platform name has been added quite some time ago).

That backtrace from PyCharm is likely a segfault somewhere. Unfortunately, the stack traces on Windows are unreliable in my experience (upstream claims they work fine). If this is after a failure of loading libcppyy_backend, I wouldn't put too much stock in it; it may be a problem with unloading some of the other legacy libraries.

@vanotuvanov
Copy link
Author

Understood. Thank you so much for your help. As a result, you will have to abandon the Windows build until a better time. Can you tell me when the next library release will be? Since the last issue was a long time ago (November 15, 2023).

@wlav
Copy link
Owner

wlav commented Sep 6, 2024

I don't understand what part of the above you think is fixed in a future release? They still seem to be local issues?

(And I'm working on it; was hoping to wait for LLVM18 in upstream, but there are some issues on Mac where LLVM13 is no longer support.)

@vanotuvanov
Copy link
Author

Yes, rather, these are local problems as well. I tried to build on two different systems and in both cases the error was reproduced

@wlav
Copy link
Owner

wlav commented Sep 6, 2024

Right, but whatever the reason is, I don't see any of it being fixed by a new release?

@vanotuvanov
Copy link
Author

If it doesn't fix it, it won't fix it.

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

2 participants