-openssl-linked
to -no-openssl
. Also adds some missing packages to the vcpkg install instructions.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
11@@ -12,7 +12,7 @@ Quick Start
12 The minimal steps required to build Bitcoin Core with the msbuild toolchain are below. More detailed instructions are contained in the following sections.
13
14 ```
15-vcpkg install --triplet x64-windows-static boost-filesystem boost-signals2 boost-test libevent openssl zeromq berkeleydb rapidcheck double-conversion
16+vcpkg install --triplet x64-windows-static boost-filesystem boost-multi-index boost-signals2 boost-test boost-thread libevent openssl zeromq berkeleydb rapidcheck double-conversion
vcpkg
.
boost-multi-index
used to be built as part of boost-signals2
, but that recently changed. Assume the same is true for boost-thread
.
I think it’s good to do this now. The Qt openssl dependency was solely for BIP70 as best I could tell. The openssl dependency for other parts of Bitcoin Core comes from random number generation etc. Removing openssl from the Qt build instructions as a first step will make it a LOT easier for anyone attempting to do their own Qt static build.
I hadn’t spotted the Boost vcpkg changes. Will do a fresh install and build to verify.
I think it’s good to do this now.
I agree. @sipsorcery I can also add a commit here to change our appveyor so that we are always pulling the latest version of vcpkg
.
@fanquake keeping vcpkg up to date would be nice but due to time limits I don’t think it’s currently feasible. Appveyor limits jobs to 60 minutes and the last Bitcoin Core build I ran a couple of days days ago took 57min 29sec. Within that time the restore of the vcpkg directory with the required packages already installed took 22sec,
Updating and rebuilding vcpkg itself only takes a minute or two but installing all the required packages takes somewhere from 30 to 40 mins. Currently the only way that Bitcoin Core can be made built on AppVeyor is by caching the vcpkg directory on build failures and then commencing from where the previous job failed.
@fanquake an additional instruction for building a Bitcoin Core compatible version of Qt is:
0Modify settings below in file qt-everywhere-opensource-src-5.9.8\qtbase\mkspecs\common\msvc-desktop.conf:
1QMAKE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_OPTIMIZE -MT
2QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -Zi -MT
3QMAKE_CFLAGS_DEBUG = -Zi -MTd
Without doing that the Qt build still results in non-static libraries (even though -static
is set as a configure option).
After doing that I was able to successfully build with your updated vcpkg instructions and the Qt5.9.8.
Oh and one other minor thing worth adjusting is the vcpkg path in the configure
command. Changing to -IC:\tools\vcpkg\installed\x64-windows-static\include -LC:\tools\vcpkg\installed\x64-windows-static\lib
makes it compatible with the AppVeyor location rather than my dev machine, Full command I used was:
0..\qt-everywhere-opensource-src-5.9.8\qt-everywhere-opensource-src-5.9.8\configure -developer-build -confirm-license -debug-and-release -opensource -platform win32-msvc -opengl desktop -no-shared -static -no-static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -ltcg -make libs -make tools -no-libjpeg -nomake examples -no-compile-examples -no-dbus -no-libudev -no-qml-debug -no-icu -no-gtk -no-opengles3 -no-angle -no-sql-sqlite -no-sql-odbc -no-sqlite -no-libudev -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 qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -nomake tests -no-openssl -IC:\tools\vcpkg\installed\x64-windows-static\include -LC:\tools\vcpkg\installed\x64-windows-static\lib -prefix C:\Qt5.9.8_x64_static_vs2019
an additional instruction for building a Bitcoin Core compatible version of Qt is:
What’s the change here? Those flags look like what is already present in \qtbase\mkspecs\common\msvc-desktop.conf:
.
Oh and one other minor thing worth adjusting is the vcpkg path in the configure command.
I’ve rebased, updated the paths and added an additional commit to mention that Visual Studio is now a supported platform.
What’s the change here? Those flags look like what is already present in
\qtbase\mkspecs\common\msvc-desktop.conf:
.
The change is the last flag on each line from /MD
to /MT
which determines whether the libs generated as static or dynamic link libraries.
The change is the last flag on each line from..
Right. Do you just want to have that diff mentioned in the notes? Can you also make a mention of it here: https://github.com/sipsorcery/qt_win_binary/releases/tag/v1.3 ?
Would you like me to swap Appveyor to using the new Qt in this PR? (If you wanted to push some changes up, I can cherry pick them in.)
Right. Do you just want to have that diff mentioned in the notes? Can you also make a mention of it here: https://github.com/sipsorcery/qt_win_binary/releases/tag/v1.3 ?
I’d already added the note on the main Readme. I’ll add a link from each release as well.
Maybe it’d be better not to include the Qt build steps in the build_msvc\README.md
doc. Building Qt does seem a bit off topic and could become a can of worms. For example if someone does have a problem with it do we want them creating an issue in the main Bitcoin repo?
This README could stick to saying what’s needed (Qtvx.x.x static build with toolset v141/142) and then a the link for the pre-compiled binaries and build instructions to serve as a starting point. That will also mean the doc won’t have to get updated each time there’s a new version of Qt or Visual Studio.
Would you like me to swap Appveyor to using the new Qt in this PR? (If you wanted to push some changes up, I can cherry pick them in.)
I’m already working on that. Because the new Qt build is with VS2019 the vcpkg packages all have to be rebuilt and the appveyor build image changed from VS2017 to VS2019. I’ve got it working and am sorting out one final issue with the python tests. It will be better to do that update as a separate PR.
Also adds missing Boost packages. Installing only the currently listed
packages was not sufficient to complete a build.
This README could stick to saying what’s needed
Sounds good. I’ve pushed some changes. Will leave further updates to you.