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

[qt5] update to 5.12.3 #6127

Merged
merged 14 commits into from
May 8, 2019
Merged

[qt5] update to 5.12.3 #6127

merged 14 commits into from
May 8, 2019

Conversation

TheScarfix
Copy link
Contributor

@TheScarfix TheScarfix commented Apr 17, 2019

closes #5929

@Neumann-A
Copy link
Contributor

dont forget to change line 5 in ports/qt5-base/vcpkg-cmake-wrapper.cmake to link the debug libraries

@TheScarfix
Copy link
Contributor Author

hit a problem on qt5-tools not using the correct path for a debug library, will look into this tomorrow

@Neumann-A
Copy link
Contributor

hit a problem on qt5-tools not using the correct path for a debug library, will look into this tomorrow

@TheScarfix: let me have a wild guess without looking into it: libpq.

@TheScarfix
Copy link
Contributor Author

@Neumann-A no, some qtqml library which is searched in the lib path not the debug/lib

ports/qt5-mqtt/CONTROL Outdated Show resolved Hide resolved
@TheScarfix
Copy link
Contributor Author

still hitting an error on qt5-tools

Error: dependent 'C:\dev\vcpkg\installed\x64-windows\lib\Qt5QmlDevToolsd.lib' does not exist.
jom: C:\dev\vcpkg\buildtrees\qt5-tools\x64-windows-dbg\src\linguist\lupdate\Makefile [debug] Error 2
C:\dev\vcpkg\buildtrees\qt5-tools\src\5.12.3-2e47618cfc\src\linguist\linguist\main.cpp(0): Note: No relevant classes found. No output generated.
jom: C:\dev\vcpkg\buildtrees\qt5-tools\x64-windows-dbg\src\linguist\Makefile [sub-lupdate-make_first] Error 2
jom: C:\dev\vcpkg\buildtrees\qt5-tools\x64-windows-dbg\src\Makefile [sub-linguist-make_first] Error 2
jom: C:\dev\vcpkg\buildtrees\qt5-tools\x64-windows-dbg\Makefile [sub-src-make_first] Error 2

@Neumann-A
Copy link
Contributor

Neumann-A commented Apr 18, 2019

does C:\dev\vcpkg\installed\x64-windows\lib\Qt5QmlDevToolsd.lib exist in C:\dev\vcpkg\installed\x64-windows\lib\debug\Qt5QmlDevToolsd.lib ?

It also looks like fixcmake.py is only correcting paths with forward slashes? Maybe that is the issue?

@TheScarfix
Copy link
Contributor Author

TheScarfix commented Apr 18, 2019

it's debug/lib not lib/debug but yes, it exists

image

@TheScarfix
Copy link
Contributor Author

don't think qt building uses cmake in any way. Qts build config says it looks for libraries in debug/lib 🤔

@Neumann-A
Copy link
Contributor

what I would do in these circumstances is a search all for Qt5QmlDevToolsd within the buildtree with Notepad++

@TheScarfix
Copy link
Contributor Author

TheScarfix commented Apr 18, 2019

okay, maybe it's an error in the Makefile.Debug of qt5-tools

image

no idea how to fix that though 😅,

same library is linked right at the beginning

image

@Neumann-A
Copy link
Contributor

So the next questions would be:

  • Where does the makefile come from? Is it generated? (see log files)
  • If it is generated who does generate it? qmake/cmake?
  • Where does the information for the generator come from.

@Neumann-A
Copy link
Contributor

theoretically it looks like vcpkg_build_qmake.cmake should have fixed the debug build paths

  file(GLOB_RECURSE DEBUG_MAKEFILES ${DEBUG_DIR}/*Makefile*)

       foreach(DEBUG_MAKEFILE ${DEBUG_MAKEFILES})
           file(READ "${DEBUG_MAKEFILE}" _contents)
           string(REPLACE "zlib.lib" "zlibd.lib" _contents "${_contents}")
           string(REPLACE "installed\\${TARGET_TRIPLET}\\lib" "installed\\${TARGET_TRIPLET}\\debug\\lib" _contents "${_contents}")
           string(REPLACE "/LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib" "/LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib\\manual-link /LIBPATH:${NATIVE_INSTALLED_DIR}\\debug\\lib shell32.lib" _contents "${_contents}")
           string(REPLACE "tools\\qt5\\qmlcachegen.exe" "tools\\qt5-declarative\\qmlcachegen.exe" _contents "${_contents}")
           string(REPLACE "tools/qt5/qmlcachegen" "tools/qt5-declarative/qmlcachegen" _contents "${_contents}")
           string(REPLACE "debug\\lib\\Qt5Bootstrap.lib" "tools\\qt5\\Qt5Bootstrap.lib" _contents "${_contents}")
           string(REPLACE "lib\\Qt5Bootstrap.lib" "tools\\qt5\\Qt5Bootstrap.lib" _contents "${_contents}")
           string(REPLACE " Qt5Bootstrap.lib " " ${NATIVE_INSTALLED_DIR}\\tools\\qt5\\Qt5Bootstrap.lib Ole32.lib Netapi32.lib Advapi32.lib ${NATIVE_INSTALLED_DIR}\\lib\\zlib.lib Shell32.lib " _contents "${_contents}")
           file(WRITE "${DEBUG_MAKEFILE}" "${_contents}")
       endforeach()

@Neumann-A
Copy link
Contributor

Neumann-A commented Apr 18, 2019

~~hmm ~~
\vcpkg\installed\x86-windows\share\qt5\debug\mkspecs\features\qt_module_pris.prf
lines 175 & 176
to

            "QT_MODULE_LIB_BASE = $$val_escape(MODULE_BASE_OUTDIR)/debug/lib" \
            "QT_MODULE_HOST_LIB_BASE = $$val_escape(MODULE_BASE_OUTDIR)/debug/lib" \

they do not include the debug normally

the next error will be:
`LINK : fatal error LNK1104: cannot open file 'Qt5Helpd.lib'
(which does not exist in my installed folder)

edit: dont do that. Qt5Helpd is build by qt5-tools

@Neumann-A
Copy link
Contributor

After thinking about it. The problem may be in all files in C:\Sources\test\vcpkg\installed\x86-windows\share\qt5\debug\mkspecs\modules having the wrong library path. Which seems to make qmake and vcpkg for external projects in debug mode a no go without manually fixing the makefiles.

It would be interesting to stop cmake right after/before #6127 (comment) and see if the offending line is already written to the makefile or not.

@Neumann-A
Copy link
Contributor

Something is strange....
..\..\..\bin\lupdate.exe: C:\Sources\test\vcpkg\installed\x86-windows\debug\lib\Qt5QmlDevToolsd.lib $(OBJECTS) .obj\debug\lupdate_resource.res
stopped right after makefile generation. So the file is changed by someone else again?

@TheScarfix
Copy link
Contributor Author

it is really weird because it's the only library with problems 😕

@TheScarfix
Copy link
Contributor Author

TheScarfix commented Apr 25, 2019

looked at it with procmon and it looks like qmake rewrites the file wrong. Can't see why though

C:\dev\vcpkg\installed\x64-windows\tools\qt5\qmake.exe -o Makefile C:\dev\vcpkg\buildtrees\qt5-tools\src\5.12.3-2e47618cfc\src\linguist\lupdate\lupdate.pro "CONFIG-=release" "CONFIG+=debug" -qtconf C:/dev/vcpkg/buildtrees/qt5-tools/x64-windows-dbg/qt.conf

@Neumann-A
Copy link
Contributor

Its probably because of what is standing in the mkspecs for the different modules in \vcpkg\installed\x86-windows\share\qt5\debug\mkspecs\ which also makes the string replacements in the build files necessary. Seems like one of the makefiles is rerunning the qmake configuration for that module and reverting the string replacement..

@Neumann-A
Copy link
Contributor

does d299ad6 solve the problem?

@TheScarfix
Copy link
Contributor Author

no, still failing

@Neumann-A
Copy link
Contributor

Neumann-A commented Apr 30, 2019

I changed line 4 in qt_lib_qmldevtools_private.pri to:
QT.qmldevtools_private.libs = $$QT_MODULE_HOST_LIB_BASE/../../debug/lib
in G:\qt\vcpkg\installed\x86-windows\share\qt5\debug\mkspecs\modules

with the following result:

G:\qt\vcpkg>vcpkg install qt5-tools
The following packages will be built and installed:
    qt5-tools[core]:x86-windows
Starting package 1/1: qt5-tools:x86-windows
Building package qt5-tools[core]:x86-windows...
-- Using cached G:/qt/vcpkg/downloads/qttools-everywhere-src-5.12.3.tar.xz
-- Using source at G:/qt/vcpkg/buildtrees/qt5-tools/src/5.12.3-2e47618cfc
-- Configuring x86-windows-rel
-- Configuring x86-windows-rel done
-- Configuring x86-windows-dbg
-- Configuring x86-windows-dbg done
-- Package makefiles-x86-windows-dbg
-- Package build-x86-windows-dbg
-- Package makefiles-x86-windows-rel
-- Package build-x86-windows-rel
-- Package install-x86-windows-dbg
-- Package install-x86-windows-rel
-- Installing: G:/qt/vcpkg/packages/qt5-tools_x86-windows/bin/Qt5Designer.dll
-- Installing: G:/qt/vcpkg/packages/qt5-tools_x86-windows/bin/Qt5DesignerComponents.dll
-- Installing: G:/qt/vcpkg/packages/qt5-tools_x86-windows/bin/Qt5Help.dll
-- Installing: G:/qt/vcpkg/packages/qt5-tools_x86-windows/debug/bin/Qt5DesignerComponentsd.dll
-- Installing: G:/qt/vcpkg/packages/qt5-tools_x86-windows/debug/bin/Qt5Designerd.dll
-- Installing: G:/qt/vcpkg/packages/qt5-tools_x86-windows/debug/bin/Qt5Helpd.dll
-- Installing: G:/qt/vcpkg/packages/qt5-tools_x86-windows/share/qt5-tools/copyright
-- Performing post-build validation
-- Performing post-build validation done
Building package qt5-tools[core]:x86-windows... done
Installing package qt5-tools[core]:x86-windows...
Installing package qt5-tools[core]:x86-windows... done
Elapsed time for package qt5-tools:x86-windows: 7.724 min

Total elapsed time: 7.724 min

The package qt5-tools:x86-windows provides CMake targets:

    find_package(Qt5Designer CONFIG REQUIRED)
    target_link_libraries(main PRIVATE Qt5::Designer Qt5::DesignerPrivate Qt5::QQuickWidgetPlugin)

    find_package(Qt5Help CONFIG REQUIRED)
    target_link_libraries(main PRIVATE Qt5::Help Qt5::HelpPrivate)

    find_package(Qt5UiPlugin CONFIG REQUIRED)
    target_link_libraries(main PRIVATE Qt5::UiPlugin Qt5::UiPluginPrivate)

    find_package(Qt5UiTools CONFIG REQUIRED)
    target_link_libraries(main PRIVATE Qt5::UiTools Qt5::UiToolsPrivate)

I also had merged in latest vpckg master and pr #6259

@Neumann-A
Copy link
Contributor

could be that it should be QT_MODULE_LIB_BASE instead of QT_MODULE_HOST_LIB_BASE

@Neumann-A
Copy link
Contributor

yeah works also with QT_MODULE_LIB_BASE. I don't know what the difference is since I cannot tell what values are set. The only thing I found was:

        QT_MODULE_LIB_BASE = $$[QT_INSTALL_LIBS]
        QT_MODULE_HOST_LIB_BASE = $$[QT_HOST_LIBS]

so there are two questions:
Why does QT.qmldevtools_private.libs = $$QT_MODULE_HOST_LIB_BASE/../../debug/lib even solve the problem? (QT_MODULE_HOST_LIB_BASE will point to the debug directory in the makefile meaning: somepath/debug/lib/../../debug/lib/ but will not do so without the path additions) This is most likely a bug in qmake and wrong chaching of variables or something alike.

should we simply set QT_MODULE_HOST_LIB_BASE to QT_MODULE_LIB_BASE in qt_lib_qmldevtools_private.pri? Probably yes after the installation of qt5-base or declarative? (Who creates the file?)

@TheScarfix
Copy link
Contributor Author

will you make a pr to my branch like last time?

@Neumann-A
Copy link
Contributor

@TheScarfix made a pr. You must test the rest. Compiling qt with nmake always takes forever... (jom stalls on my pc for some unidentified reason)

fix qmldevtools debug linkage for qt5-tools
@Rastaban
Copy link
Contributor

Rastaban commented May 2, 2019

If you resolve the merge conflicts with latest master then the CI system should pick it up.

@TheScarfix TheScarfix marked this pull request as ready for review May 3, 2019 04:54
@Rastaban
Copy link
Contributor

Rastaban commented May 3, 2019

This is what I see in the CI system now:

x64-windows master test notes
qt5-connectivity Pass Fail Regression
qt5-websockets Pass Fail Regression
qt5-webview Pass Fail Regression
qt5 Pass Skip
qt5-remoteobjects Pass Fail Regression
x86-windows master test notes
qt5-multimedia Pass Fail Regression
qt5 Pass Skip
qt5-purchasing Pass Fail Regression

@TheScarfix
Copy link
Contributor Author

what do the logs say for those?

@Neumann-A
Copy link
Contributor

@Rastaban: Cannot reproduce x86-windows regressions. Will try x64-windows after full build of qt on x86.

@Rastaban
Copy link
Contributor

Rastaban commented May 6, 2019

With the latest merge the failures have gone away. To me this PR looks good, is there anything else that needs to be done before we merge?

@TheScarfix
Copy link
Contributor Author

I think it's good now :)

@vicroms vicroms merged commit 38aeee7 into microsoft:master May 8, 2019
@TheScarfix TheScarfix deleted the qt5-5.12.3 branch June 19, 2019 10:10
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

Successfully merging this pull request may close these issues.

[Qt5] Update to 5.12.3
4 participants