WIP: Update msvc build to ignore warning and bump Qt version to 5.12.6. #17727

pull sipsorcery wants to merge 2 commits into bitcoin:master from sipsorcery:msvc_qtupdate changing 4 files +9 −9
  1. sipsorcery commented at 10:20 PM on December 11, 2019: member

    WIP while checking whether the Bitcoin Core appveyor job passes. This depends on the state of the vcpkg packages which can't be replicated on a fork.

    msvc warning C4834 for the Bitcoin Core build was introduced by Visual Studio 16.4.0. This PR adds an ignore rule for the warning (it's related to the nodiscard attribute and is not considered relevant).

    An additional side effect of the msvc compiler update is the cached Qt5.9.8 libraries cannot be linked due to being built with an earlier version of the compiler. To fix this Qt5.12.6 has been built with the updated msvc compiler and added to the appveyor job.

  2. fanquake added the label Tests on Dec 11, 2019
  3. fanquake added the label Windows on Dec 11, 2019
  4. in build_msvc/common.init.vcxproj:118 in b2a6bb2ed8 outdated
     115 |      </ClCompile>
     116 |      <Link>
     117 |        <SubSystem>Console</SubSystem>
     118 |        <GenerateDebugInformation>true</GenerateDebugInformation>
     119 | -      <AdditionalDependencies>crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
     120 | +      <AdditionalDependencies>Wtsapi32.lib;crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
    


    fanquake commented at 10:32 PM on December 11, 2019:

    Wtsapi32.lib

    Why is this needed? A quick search suggests it is the library for the Remote Desktop Services API.


    sipsorcery commented at 10:39 PM on December 11, 2019:

    Qt5.12.6 wanted it. That did raise an orange flag for me as well. Some quick research suggested it's to allow Qt apps to be served across remote terminal connections rather than any kind of hosting ability.

  5. MarcoFalke closed this on Dec 12, 2019

  6. MarcoFalke reopened this on Dec 12, 2019

  7. sipsorcery commented at 11:53 AM on December 12, 2019: member

    When the Wstapi32.lib is not referenced the linker error is:

    "c:\Dev\github\sipsorcery_bitcoin\build_msvc\bitcoin.sln" (build target) (1) ->
    "c:\Dev\github\sipsorcery_bitcoin\build_msvc\bitcoin-qt\bitcoin-qt.vcxproj" (default target) (23) ->
    (Link target) ->
     qwindows.lib(qwindowscontext.obj) : error LNK2001: unresolved external symbol WTSQuerySessionInformationW [c:\
    Dev\github\sipsorcery_bitcoin\build_msvc\bitcoin-qt\bitcoin-qt.vcxproj]
     qwindows.lib(qwindowscontext.obj) : error LNK2001: unresolved external symbol WTSFreeMemory [c:\Dev\github\sip
    sorcery_bitcoin\build_msvc\bitcoin-qt\bitcoin-qt.vcxproj]
     c:\Dev\github\sipsorcery_bitcoin\build_msvc\x64\Release\bitcoin-qt.exe : fatal error LNK1120: 2 unresolved ext
    ernals [c:\Dev\github\sipsorcery_bitcoin\build_msvc\bitcoin-qt\bitcoin-qt.vcxproj]
    

    The two Remote Desktop functions being used are WTSQuerySessionInformationW and WTSFreeMemory.

    A query and free memory call so no obvious capabilities to start a remote session or such.

    I am working on a new build of Qt incorporating #17730 to see if the need for Wstapi32.lib can be eliminated. My gut feel is it can't since it's being called from the Qt qwindows.lib and based on Qt's configure -list-features and configure -list-libraries there are no obvious options related to it.

  8. Update msvc build to ignore warning and bump Qt version to 5.12.6.
    msvc warning C4834 for the Bitcoin Core build was introduced by Visual Studio 16.4.0. This PR adds an ignore rule for the warning (it's related to the nodiscard attribute and is not considered relevant).
    An additional side effect of the msvc compiler update is the cached Qt5.9.8 libraries cannot be linked due to being built with an earlier version of the compiler. To fix this Qt5.12.6 has been built with the updated msvc compiler and added to the appveyor job.
    2d8ebcc2af
  9. Set the CI Actions workflow to use the Qt5.9.8 path for msvc build.
    The Qt5.12.6 binaries have been compiled with a newer compiler than is available on the Actions Windows image. This fix allows the Actions workflow to override the Qt path in the common project file by setting it on the msbuild command line.
    9ea57015de
  10. sipsorcery force-pushed on Dec 12, 2019
  11. MarcoFalke approved
  12. MarcoFalke commented at 3:53 PM on December 12, 2019: member

    ACK. Didn't look at the changes, but this makes appveyor green.

  13. laanwj commented at 3:56 PM on December 12, 2019: member

    A query and free memory call so no obvious capabilities to start a remote session or such.

    Ok, it's kind of worrying that Qt keeps adding these kind of requirements, but not necessary to handle here.

    ACK if Appveyor passes again.

  14. DrahtBot added the label Needs rebase on Dec 12, 2019
  15. DrahtBot commented at 4:36 PM on December 12, 2019: member

    <!--cf906140f33d8803c4a75a2196329ecb-->Needs rebase

  16. sipsorcery commented at 4:45 PM on December 12, 2019: member

    To make this less contentious I'll rebuild Qt5.9.8 with Visual Studio 2019 v16.4 and resubmit the PR without needing to bump Qt.

  17. sipsorcery closed this on Dec 12, 2019

  18. fanquake removed the label Needs rebase on Aug 20, 2020
  19. DrahtBot locked this on Feb 15, 2022

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-15 15:14 UTC

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