[PyQt] PyQtDeploy Sysroot issues
Kevin Kelly
kevin.kelly at sydaptic.com
Mon Apr 9 17:28:52 BST 2018
Thanks. So easy.
Once I started using the Developer Command Prompt everything worked a lot better but I am not able to get all the way done.
When it gets to the Make section it goes through some and then stops at these errors:
python36.lib(sysmodule.obj) : error LNK2019: unresolved external symbol _GetFileVersionInfoSizeW at 8 referenced in function _sys_getwindowsversion
python36.lib(sysmodule.obj) : error LNK2019: unresolved external symbol _GetFileVersionInfoW at 16 referenced in function _sys_getwindowsversion
python36.lib(sysmodule.obj) : error LNK2019: unresolved external symbol _VerQueryValueW at 16 referenced in function _sys_getwindowsversion
release\pyqt-demo.exe : fatal error LNK1120: 3 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX86\x86\link.EXE"' : return code '0x460'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin\HostX86\x86\nmake.exe"' : return code '0x2'
Stop.
I can try again with the --no-sysroot option but it stops at the same spot. I am not sure if I need to include something or exclude something to make it work or if there is something, once again, off about the way I am building this.
I appreciate your help.
Kevin Kelly
-----Original Message-----
From: Phil Thompson [mailto:phil at riverbankcomputing.com]
Sent: Monday, April 9, 2018 2:09 AM
To: Kevin Kelly <kevin.kelly at sydaptic.com>
Cc: pyqt at riverbankcomputing.com
Subject: Re: [PyQt] PyQtDeploy Sysroot issues
On 9 Apr 2018, at 12:36 am, Kevin Kelly <kevin.kelly at sydaptic.com> wrote:
>
> I decided to try out PyQtDeploy v2.1 this weekend and I have spent most of the weekend stuck trying to get past buiding the sysroot. Below I am going to give you the error I have come across but ultimately I was hoping someone out there may have some tips or help on what is needed for the initial setup to get these builds done right.
>
> I have read the PyQtDeploy documentation several times through. All I have tried to do is build the Demo program, so nothing new or over the top. Because I had no interest in it, I did modify the sysroot.json file to have only the qt5, python, sip and pyqt5 options in there. I have attached that file. I have Visual Studio 2015 and 2017 installed. I downloaded the PyQt source, Python source, SIP source and opted to use the Qt installation that was in place. After I run the build-demo.py I get this error:
>
> Installing an existing Qt5
> Installing an existing Python v3.6.4 as the host Python
> Building the target Python from source
> Configuring Python v3.6.4 for win-32
> Installing C:\deploy\demo\sysroot-win-32\build\Python-3.6.4\Modules\config.c
> Installing C:\deploy\demo\sysroot-win-32\build\Python-3.6.4\pyconfig.h
> Installing C:\deploy\demo\sysroot-win-32\build\Python-3.6.4\python.pro
> Project ERROR: Cannot run compiler 'cl'. Output:
> ===================
> ===================
> Maybe you forgot to setup the environment?
> Traceback (most recent call last):
> File "c:\python36-32\lib\runpy.py", line 193, in _run_module_as_main
> "__main__", mod_spec)
> File "c:\python36-32\lib\runpy.py", line 85, in _run_code
> exec(code, run_globals)
> File "C:\Python36-32\Scripts\pyqtdeploy-sysroot.exe\__main__.py", line 9, in <module>
> File "c:\python36-32\lib\site-packages\pyqtdeploy\pyqtdeploysysroot_main.py", line 83, in main
> sysroot.build_components(args.component, args.no_clean)
> File "c:\python36-32\lib\site-packages\pyqtdeploy\sysroot\sysroot.py", line 103, in build_components
> component.build(self)
> File "c:\python36-32\lib\site-packages\pyqtdeploy\sysroot\plugins\python\python.py", line 99, in build
> self._build_target_from_source(sysroot, archive)
> File "c:\python36-32\lib\site-packages\pyqtdeploy\sysroot\plugins\python\python.py", line 201, in _build_target_from_source
> sysroot.run(sysroot.host_qmake, 'SYSROOT=' + sysroot.sysroot_dir)
> File "c:\python36-32\lib\site-packages\pyqtdeploy\sysroot\sysroot.py", line 562, in run
> subprocess.check_call(args)
> File "c:\python36-32\lib\subprocess.py", line 291, in check_call
> raise CalledProcessError(retcode, cmd)
> subprocess.CalledProcessError: Command '('C:\\Qt\\5.10.1\\msvc2015\\bin\\qmake.exe', 'SYSROOT=C:\\deploy\\demo\\sysroot-win-32')' returned non-zero exit status 3.
>
>
> I researched and the best I could come up with is that I don't have a compiler installed but like I mentioned I have VS 2015 and 2017 and VC directories in both with the nmake and other files for the compiler as best I can tell.
>
> My feeling is that I am missing something with how I setup my environment before I get started to make this work. Any help would be appreciated.
It sounds like you are not using a command shell provided by MSVC. This sets up all the environment variables needed for the compiler etc.
Phil
More information about the PyQt
mailing list