Forum
Sign Up

How to build QtitanSolution for Python?

1 year 7 months ago #1 by Eun-seop, Yu
I failed to build QtitanSolution for python from source.

Environments
Qt 5.15.2 MSVC2019
msvc 2015 toolkit
Python 3.10 64bit
pyside2 5.15.2
shiboken2 5.15.2
shiboken2-generator 5.15.2

Reproduction
I flowed this document .
  1. Install Qt 5.15.2 msvc2019
  2. Install Python3.10 using Microsoft Store
  3. Install pyside2, shiboken2, shiboken2-generator using below command
    pip install pyside2 shiboken2
    pip install --index-url=https://download.qt.io/official_releases/QtForPython/ --trusted-host download.qt.io shiboken2_generator
  4. Install QtitanComponentsInstaller2022.4.0_PySide2_Qt5.15.2Win_x86.exe
  5. Build QtitanSolution using below command
    Run x64 Native Tools Command Prompt for VS 2015
    cd <QTITAN_SOLUTION_PATH>
    qmake.exe -r CONFIG+=python -platform win32-msvc
    • In this step, many WARN occur likes below.
    • WARNING: Failure to find: C:/Qt/Developer Machines/PyQtitanComponents2022.4.0/src/shared/Py<QTITAN_MODULE>/generated/DevMachines/<QTITAN_MODULE>/<FILE_NAME>
    • QTITAN_MODULE: QtitanBase, QtitanFastInfoset, QtitanStyle, QtitanGrid ...
    • FILE_NAME: qtitan_wrapper.cpp, ixmlstreamreader_wrapper.cpp, /segoemdl2font_wrapper.h ...
    nmake release
    • (qtitanbase)  [994ms] Generating class model (556)...                             [OK]
      (qtitanbase) [1001ms] Generating enum model (4)...                                [OK]
      (qtitanbase) [1004ms] Generating namespace model (74)...                          [OK]
      (qtitanbase) [1006ms] Resolving typedefs (89)...                                  [OK]
      (qtitanbase) [1258ms] Fixing class inheritance...                                 [OK]
      (qtitanbase) [1259ms] Detecting inconsistencies in class model...                 [OK]
      (qtitanbase) [1358ms] Detecting inconsistencies in typesystem (6796)...           [OK]
      (qtitanbase) [1378ms] Checking inconsistencies in function modifications...       [OK]
      (qtitanbase) [1379ms] Writing log files...                                        [OK]
      (qtitanbase) [1403ms] Running Source generator...                                 [OK]
      (qtitanbase) [1451ms] Running Header generator...                                 [OK]
      Done, (qtitanbase) 1469ms (351 known issues)
              rc /NOLOGO -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQTN_PRIVATE_HEADERS -D_WINDOWS -DQTN_NAMESPACE -DNDEBUG -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -D_WINDLL -fo release\QtitanBase_resource.res QtitanBase_resource.rc
      'rc'은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는 배치 파일이 아닙니다.
      NMAKE : fatal error U1077: 'rc' : '0x1' 반환 코드입니다.
      Stop.
      NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.exe"' : '0x2' 반환  코드입니다.
      Stop.
      NMAKE : fatal error U1077: 'cd' : '0x2' 반환 코드입니다.
      Stop.

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago - 1 year 7 months ago #2 by Developer Machines
In this step, many WARN occur likes below.
WARNING: Failure to find: C:/Qt/Developer Machines/PyQtitanComponents2022.4.0/src/shared/Py<QTITAN_MODULE>/generated/DevMachines/<QTITAN_MODULE>/<FILE_NAME>

qtitanbase)  [994ms] Generating class model (556)...                             [OK]

It is absolutely normal. On the first pass, while the shiboken-generator has not completed, these files are not there, but after then they will appear.

NMAKE : fatal error U1077: 'rc' : '0x1' 반환 코드입니다.


Looks like rc.exe is not installed. Could you please check this topic?

developercommunity.visualstudio.com/t/rc...ommand-line-w/742544
Last edit: 1 year 7 months ago by Developer Machines.

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago #3 by Eun-seop, Yu
Thanks for reply.
I confirmed that rc.exe and rcdll.dll were not in the msvc 2015 build tool folder, and reinstalled them. Then rc error was solved.
But now a link error occur.
Do I need to build Qt first to build QtitanSoution for Python?


Error
(qtitanbase)  [796ms] Generating class model (556)...                             [OK]
(qtitanbase)  [803ms] Generating enum model (4)...                                [OK]
(qtitanbase)  [805ms] Generating namespace model (74)...                          [OK]
(qtitanbase)  [807ms] Resolving typedefs (89)...                                  [OK]
(qtitanbase) [1052ms] Fixing class inheritance...                                 [OK]
(qtitanbase) [1054ms] Detecting inconsistencies in class model...                 [OK]
(qtitanbase) [1152ms] Detecting inconsistencies in typesystem (6796)...           [OK]
(qtitanbase) [1172ms] Checking inconsistencies in function modifications...       [OK]
(qtitanbase) [1173ms] Writing log files...                                        [OK]
(qtitanbase) [1189ms] Running Source generator...                                 [OK]
(qtitanbase) [1238ms] Running Header generator...                                 [OK]
Done, (qtitanbase) 1253ms (351 known issues)
        rc /NOLOGO -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQTN_PRIVATE_HEADERS -D_WINDOWS -DQTN_NAMESPACE -DNDEBUG -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -D_WINDLL -fo release\QtitanBase_resource.res QtitanBase_resource.rc
        link /NOLOGO /DYNAMICBASE /NXCOMPAT /OPT:REF /INCREMENTAL:NO /DLL /SUBSYSTEM:WINDOWS /VERSION:2.5 /MANIFEST:embed /OUT:..\..\..\site-packages\DevMachines\QtitanBase.pyd @C:\Users\yes89\AppData\Local\Temp\nmF230.tmp
LINK : fatal error LNK1181: cannot open input file 'release\qtitan_wrapper.obj'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\link.EXE"' : return code '0x49d'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago - 1 year 7 months ago #4 by Developer Machines
Strange problem... Could you observe if the file actually exists there?

{QTITAN_INSTALL}\src\shared\PyQtitanBase\release\*wrapper.obj

Maybe "nmake clean" before rebuild will be effective?

I'd suggest to configure Visual Studio project instead of Makefile to check this issue. Please do:
qmake.exe CONFIG+="python" -tp vc -r QtitanComponents.pro
You will have Python.QtitanComponents.sln file that can be opened in Visual Studio.

Additionally, these CONFIG flags can be used for the debug purposes:
//Flag "python_debug" is used to configure output folder for the site-packages dir under the current python installation and you do not need to copy the binary files to python's lib folder manually. Just rebuld and run.
//For me it is: C:\Users\{USER}\AppData\Local\Programs\Python\Python{VERSION}\lib\site-packages\DevMachines\
// By default, everything is compiled into the folder - {QTITAN_INSTALL}\site-packages\DevMachines

qmake -r CONFIG+="python python_debug" QtitanComponents.pro
// Use "verbose" flag if you need to see all the variables and lib names that are used to configure your project:
qmake -r CONFIG+="python verbose" QtitanComponents.pro

We will check the build under your environment and let you know shortly.
Last edit: 1 year 7 months ago by Developer Machines.

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago #5 by Eun-seop, Yu
Hi. Thank you for responding quickly.

In first qmake and nmake, link error occured.
LINK : fatal error LNK1181: cannot open input file 'release\qtitan_wrapper.obj'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\link.EXE"' : return code '0x49d'
I checked 'src/shared/PyQtitanBase/release' directory.
Only QtitanBase_resource.res is in the directory.

In second qmake and nmake without additional action, below error occured.
qtitanbase_module_wrapper.cpp
        link /NOLOGO /DYNAMICBASE /NXCOMPAT /OPT:REF /INCREMENTAL:NO /DLL /SUBSYSTEM:WINDOWS /VERSION:2.5 /MANIFEST:embed /OUT:..\..\..\site-packages\DevMachines\QtitanBase.pyd @C:\Users\yes89\AppData\Local\Temp\nm2BDC.tmp
   Creating library ..\..\..\site-packages\DevMachines\QtitanBase.lib and object ..\..\..\site-packages\DevMachines\QtitanBase.exp
        cd src\shared\PyQtitanFastInfoset\ && ( if not exist Makefile C:\Qt\5.15.2\msvc2015_64\bin\qmake.exe -o Makefile "C:\Qt\Developer Machines\PyQtitanComponents2022.4.0\src\shared\PyQtitanFastInfoset\PyQtitanFastInfoset.pro" "CONFIG+=python" -platform win32-msvc ) && "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.exe" -f Makefile release

Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation.  All rights reserved.

        "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.exe" -f Makefile.Release

Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation.  All rights reserved.

NMAKE : fatal error U1073: don't know how to make 'typesystem_qtitanfastinfoset.xml'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

I checked directories.
'*.wrapper.obj's are in 'src/shared/PyQtitanBase/release'.
'typesystem_qtitanfastinfoset.xml' is not in 'src/shared/QtitanFastInfoset'.

Unfortunately 'nmake clean' was not effective.
After 'nmake clean' and 'nmake release', same error occured.
NMAKE : fatal error U1073: don't know how to make 'typesystem_qtitanfastinfoset.xml'

Now, I'm going to try the method you suggested.

Please Log in or Create an account to join the conversation.

More
1 year 7 months ago - 1 year 7 months ago #6 by Developer Machines
Looks like it is a bug in our last python installation. The file typesystem_qtitanfastinfoset.xml should be in folder - QtitanSolution2022.4.0\src\shared\PyQtitanFastInfoset\
Please download this zip arch and create a src\shared\PyQtitanFastInfoset\ folder. After that fastinfoset binding should be created.

File Attachment:

File Name: PyQtitanFa...oset.zip
File Size:2 KB


Installation bug will be fixed in the next update.
Attachments:
Last edit: 1 year 7 months ago by Developer Machines.
The following user(s) said Thank You: Eun-seop, Yu

Please Log in or Create an account to join the conversation.

More
  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Moderators: Developer Machines
Time to create page: 0.151 seconds

Developer Newsletter

Join our Developer Machines newsletter to get informed on all the latest releases of the commercial components for Qt.C++, Delphi FireMonkey, updates and general knowledges.

Quick Support

Should you need any additional information about our products or licensing, please contact us at the following email addresses:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

Get in Touch

If you would like to purchase our products or services, but don’t know how to do it the right way, please feel free to contact us:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.( any questions related to our products or services )
  • This email address is being protected from spambots. You need JavaScript enabled to view it.( questions related to licensing )