-
Notifications
You must be signed in to change notification settings - Fork 42
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
Comments
No idea ... these symbols are provided by Can you check that library with |
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? |
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. |
Thanks! It really helped to complete the build, but other problems arose. Build log in QtCreator with errorstestPoint.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 externalsBut after installing dll files using pip (pip install .whl), a new problem appeared. Errors log in pythonC:\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 ================ ================ Thread 1 ================ ================ Thread 2 ================ ================ Thread 3 ================ ==========================================
|
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 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 |
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). |
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.) |
Yes, rather, these are local problems as well. I tried to build on two different systems and in both cases the error was reproduced |
Right, but whatever the reason is, I don't see any of it being fixed by a new release? |
If it doesn't fix it, it won't fix it. |
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-clingThe text was updated successfully, but these errors were encountered: