machinekit / QtQuickVcp

A Virtual Control Panel for Machinekit written in Qt/C++/QML
Other
128 stars 74 forks source link

Issues when build on Windows #296

Closed pauloasherring closed 3 years ago

pauloasherring commented 3 years ago

Hi! I am trying to manually build QtQuickVcp, but I am having the output outlined below. My setup is: zeromq 4.0.8 - msvc 2013 x86 protobuf 2.6.1 - msvc 2013 x86 QtQuickVcp 0.9.7.1 - Qt 5.7.1 msvc2013 - x86 Host Windows 10, build 20H2

The error output on QtCreator is:

file:\C:\bin\build-QtQuickVcp-Desktop_Qt_5_7_1_MSVC2013_32bit-Release\imports\typelist.qml:2:1: error: plugin cannot be loaded for module "Machinekit.HalRemote": Cannot load library C:\bin\build-QtQuickVcp-Desktop_Qt_5_7_1_MSVC2013_32bit-Release\imports\Machinekit\HalRemote\machinekithalremoteplugin.dll: The specified module could not be found.

The tail of the compile output:

cd src\ && ( if not exist Makefile C:\Qt\Qt5.7.1\5.7\msvc2013\bin\qmake.exe C:\bin\QtQuickVcp\src\src.pro -spec win32-msvc2013 -o Makefile ) && C:\Qt\Qt5.8.0\Tools\QtCreator\bin\jom.exe -f Makefile install
cd halremote\ && ( if not exist Makefile C:\Qt\Qt5.7.1\5.7\msvc2013\bin\qmake.exe C:\bin\QtQuickVcp\src\halremote\halremote.pro -spec win32-msvc2013 -o Makefile ) && C:\Qt\Qt5.8.0\Tools\QtCreator\bin\jom.exe -f Makefile install
C:\Qt\Qt5.8.0\Tools\QtCreator\bin\jom.exe -f Makefile.Release install
C:/Qt/Qt5.7.1/5.7/msvc2013/bin/qmlplugindump -nonrelocatable Machinekit.HalRemote 1.0 C:\bin\build-QtQuickVcp-Desktop_Qt_5_7_1_MSVC2013_32bit-Release\src\halremote\..\..\imports\ > C:\bin\build-QtQuickVcp-Desktop_Qt_5_7_1_MSVC2013_32bit-Release\src\halremote\..\..\imports\Machinekit\HalRemote\plugins.qmltypes
exit 0
copy /y C:\bin\QtQuickVcp\src\halremote\qmldir C:\Qt\Qt5.7.1\5.7\msvc2013\qml\Machinekit\HalRemote
    1 file(s) copied.
copy /y ..\..\imports\Machinekit\HalRemote\machinekithalremoteplugin.dll C:\Qt\Qt5.7.1\5.7\msvc2013\qml\Machinekit\HalRemote\machinekithalremoteplugin.dll
    1 file(s) copied.
QQmlComponent: Component is not ready
file:///C:/bin/build-QtQuickVcp-Desktop_Qt_5_7_1_MSVC2013_32bit-Release/imports/typelist.qml:2:1: plugin cannot be loaded for module "Machinekit.HalRemote": Cannot load library C:\bin\build-QtQuickVcp-Desktop_Qt_5_7_1_MSVC2013_32bit-Release\imports\Machinekit\HalRemote\machinekithalremoteplugin.dll: The specified module could not be found.
jom: C:\bin\build-QtQuickVcp-Desktop_Qt_5_7_1_MSVC2013_32bit-Release\src\halremote\Makefile.Release [install_dumppluginqmltypes] Error 3
jom: C:\bin\build-QtQuickVcp-Desktop_Qt_5_7_1_MSVC2013_32bit-Release\src\halremote\Makefile [release-install] Error 2
jom: C:\bin\build-QtQuickVcp-Desktop_Qt_5_7_1_MSVC2013_32bit-Release\src\Makefile [sub-halremote-install_subtargets-ordered] Error 2
jom: C:\bin\build-QtQuickVcp-Desktop_Qt_5_7_1_MSVC2013_32bit-Release\Makefile [sub-src-install_subtargets] Error 2
19:52:52: The process "C:\Qt\Qt5.8.0\Tools\QtCreator\bin\jom.exe" exited with code 2.
Error while building/deploying project QtQuickVcp (kit: Desktop Qt 5.7.1 MSVC2013 32bit)
When executing step "Make"

Apparently, this happens when make install is executed.

If I try to probe the generated dll using qmlplugindump, I get:

QQmlComponent: Component is not ready
file:///C:/bin/build-QtQuickVcp-Desktop_Qt_5_7_1_MSVC2013_32bit-Release/imports/typelist.qml:2:1: plugin cannot be loaded for module "Machinekit.HalRemote": Cannot load library C:\bin\build-QtQuickVcp-Desktop_Qt_5_7_1_MSVC2013_32bit-Release\imports\Machinekit\HalRemote\machinekithalremoteplugin.dll: The specified module could not be found.

However, I am successfully able to dump Machinekit.Controls , which is rather weird.

I tried already with the following setups, all I've kept constant is the development pc and os: MSVC 2013 x64, x86 MSVC 2015 x64, x86 Qt 5.7.1 , 5.8.0, 5.9.9, 5.12.X, 5.15.X

Any thoughts on how to deal with it?

pauloasherring commented 3 years ago

The root cause for this issue is because the generated dlls have dependencies to libzmq.dll. Therefore, qmlplugindump.exe could not find the dependencies for machinekit*.dll, being unable to generate the dump file (plugins.qmltypes).

Copying libzmq.dll to the same folder where qmlplugindump.exe is located did the trick here. For reference, the location here was C:\Qt\Qt5.7.1\5.7\msvc2013\bin\qmlplugindump.exe , but, it may vary.

Closing this non-issue.