Qt5.12.6 on Windows introduces dependency on Wtsapi32.lib #17749

issue sipsorcery opened this issue on December 15, 2019
  1. sipsorcery commented at 12:10 PM on December 15, 2019: member

    Testing with Bitcoin Core msvc builds against Qt5.12.6 has revealed a new library dependency on Wstapi32.lib which is part of the Remote Desktop Services.

    There are only two undefined symbols when Wstapi32.lib is not set as a dependency:

    These two calls look safe. Despite that the linking of a remote desktop library to Bitcoin Core is not ideal and has already raised concerns.

    Ideally a way will be found to set a Qt configuration parameter so the library is not required. I have posted a question on the Qt forum to that effect.

    The Qt build configuration options below DO NOT work. They come from disabling all features and directories that don't look related to Bitcoin Core and are also from looking at #17736

    ..\configure -debug-and-release -opensource -platform win32-msvc -opengl desktop -no-shared -no-static-runtime -mp -c++std c++11 -confirm-license -ltcg -static -make libs -make tools  -optimized-tools -pch -qt-libpng -qt-pcre -qt-harfbuzz -system-zlib -no-compile-examples -no-angle -no-cups -no-dbus -no-egl -no-eglfs -no-freetype -no-gif -no-glib -no-gtk -no-icu -no-ico -no-iconv -no-kms -no-linuxfb -no-libjpeg -no-libproxy -no-libudev -no-mtdev -no-opengles3 -no-openssl -no-openvg -no-reduce-relocations -no-sctp -no-sql-db2 -no-sql-ibase -no-sql-oci -no-sql-tds -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-sqlite -no-system-proxies -no-use-gold-linker -nomake examples -nomake tests -no-feature-bearermanagement -no-feature-colordialog -no-feature-commandlineparser -no-feature-concurrent -no-feature-dial -no-feature-dtls -no-feature-ftp -no-feature-http -no-feature-image_heuristic_mask -no-feature-keysequenceedit -no-feature-lcdnumber -no-feature-networkdiskcache -no-feature-networkproxy -no-feature-pdf -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget  -no-feature-sessionmanager -no-feature-socks5 -no-feature-sqlmodel -no-feature-statemachine -no-feature-syntaxhighlighter -no-feature-textedit -no-feature-texthtmlparser -no-feature-textodfwriter -no-feature-topleveldomain -no-feature-udpsocket -no-feature-undocommand -no-feature-undogroup -no-feature-undostack -no-feature-undoview -no-feature-vnc -no-feature-whatsthis -no-feature-wizard -no-feature-xml -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquickcontrols -skip qtquickcontrols2 -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -IC:\tools\vcpkg\installed\x64-windows-static\include -LC:\tools\vcpkg\installed\x64-windows-static\lib -prefix C:\Qt5.12.6_x64_static_vs2019
    

    A substantial number (20 to 30) of trial and error iterations later a set of successful configure options is below. Unfortunately this still results in a build that requires Wtsapi32.lib.

    ..\configure -debug-and-release -opensource -platform win32-msvc -opengl desktop -no-shared -no-static-runtime -mp -c++std c++11 -confirm-license -ltcg -static -make libs -make tools  -optimized-tools -pch -qt-libpng -qt-pcre -qt-harfbuzz -system-zlib -no-compile-examples -no-angle -no-cups -no-dbus -no-egl -no-eglfs -no-freetype -no-gif -no-glib -no-gtk -no-icu -no-ico -no-iconv -no-kms -no-linuxfb -no-libjpeg -no-libproxy -no-libudev -no-mtdev -no-opengles3 -no-openssl -no-openvg -no-reduce-relocations -no-sctp -no-sql-db2 -no-sql-ibase -no-sql-oci -no-sql-tds -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-sqlite -no-system-proxies -no-use-gold-linker -nomake examples -nomake tests -no-feature-bearermanagement -no-feature-concurrent -no-feature-dial -no-feature-dtls -no-feature-ftp -no-feature-http -no-feature-lcdnumber -no-feature-networkdiskcache -no-feature-networkproxy  -no-feature-sessionmanager -no-feature-socks5 -no-feature-sqlmodel -no-feature-topleveldomain -no-feature-udpsocket -no-feature-vnc -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -IC:\tools\vcpkg\installed\x64-windows-static\include -LC:\tools\vcpkg\installed\x64-windows-static\lib -prefix C:\Qt5.12.6_x64_static_vs2019
    
  2. sipsorcery added the label Feature on Dec 15, 2019
  3. laanwj added the label Upstream on Dec 15, 2019
  4. laanwj added the label Build system on Dec 15, 2019
  5. laanwj removed the label Feature on Dec 15, 2019
  6. laanwj commented at 12:25 PM on December 15, 2019: member

    Looks like the calls were added in qwindowscontext.cpp in qt/qtbase@ecfa33e751115919ddb47a6f641a2b1842c96788 . As you say, it's unconditional.

    So if we want to avoid depending on that dll, we'll have to carry a patch in depends that reverts this change.

    (but maybe it's acceptable given the reasoning, I don't know…)

  7. sipsorcery commented at 8:10 AM on December 17, 2019: member

    I got a reply on the Qt forum stating that it's not possible to avoid the Wstapi32.lib. The reason the dependency was added was to solve an intermittent clipboard bug.

    IMHO I don't think this would warrant a patch of Qt given the Bitcoin Core GUI can also use the Windows clipboard and thus be affected by the bug.

    Will close this issue and wait until the > Qt5.12 update is proposed for Bitcoin Core before any further action.

  8. sipsorcery closed this on Dec 17, 2019

  9. MarcoFalke locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 00:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me