@@ -59,17 +59,6 @@ ctest --test-dir build --build-config Release # Append "-j N" for N parallel te
59
59
cmake --install build --config Release # Optional.
60
60
```
61
61
62
- If building with ` BUILD_GUI=ON ` , vcpkg installation during the build
63
- configuration step might fail because of extremely long paths required during
64
- vcpkg installation if your vcpkg instance is installed in the default Visual
65
- Studio directory. This can be avoided without modifying your vcpkg root
66
- directory by changing vcpkg's intermediate build directory with the
67
- ` --x-buildtrees-root ` argument to something shorter, for example:
68
-
69
- ``` powershell
70
- cmake -B build --preset vs2022-static -DVCPKG_INSTALL_OPTIONS="--x-buildtrees-root=C:\vcpkg"
71
- ```
72
-
73
62
### 5. Building with Dynamic Linking without GUI
74
63
75
64
```
@@ -78,9 +67,30 @@ cmake --build build --config Release # Append "-j N" for N parallel jo
78
67
ctest --test-dir build --build-config Release # Append "-j N" for N parallel tests. Some tests are disabled if Python 3 is not available.
79
68
```
80
69
70
+ ### 6. vcpkg-specific Issues and Workarounds
71
+
72
+ vcpkg installation during the configuration step might fail for various reasons unrelated to Bitcoin Core.
73
+
74
+ If the failure is due to a "Buildtrees path … is too long" error, which is often encountered when building
75
+ with ` BUILD_GUI=ON ` and using the default vcpkg installation provided by Visual Studio, you can
76
+ specify a shorter path to store intermediate build files by using
77
+ the [ ` --x-buildtrees-root ` ] ( https://learn.microsoft.com/en-us/vcpkg/commands/common-options#buildtrees-root ) option:
78
+
79
+ ``` powershell
80
+ cmake -B build --preset vs2022-static -DVCPKG_INSTALL_OPTIONS="--x-buildtrees-root=C:\vcpkg"
81
+ ```
82
+
83
+ If vcpkg installation fails with the message "Paths with embedded space may be handled incorrectly", which
84
+ can occur if your local Bitcoin Core repository path contains spaces, you can override the vcpkg install directory
85
+ by setting the [ ` VCPKG_INSTALLED_DIR ` ] ( https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/users/buildsystems/cmake-integration.md#vcpkg_installed_dir ) variable:
86
+
87
+ ``` powershell
88
+ cmake -B build --preset vs2022-static -DVCPKG_INSTALLED_DIR="C:\path_without_spaces"
89
+ ```
90
+
81
91
## Performance Notes
82
92
83
- ### 6 . vcpkg Manifest Default Features
93
+ ### 7 . vcpkg Manifest Default Features
84
94
85
95
One can skip vcpkg manifest default features to speedup the configuration step.
86
96
For example, the following invocation will skip all features except for "wallet" and "tests" and their dependencies:
@@ -90,6 +100,6 @@ cmake -B build --preset vs2022 -DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON -DVCPKG_M
90
100
91
101
Available features are listed in the [ ` vcpkg.json ` ] ( /vcpkg.json ) file.
92
102
93
- ### 7 . Antivirus Software
103
+ ### 8 . Antivirus Software
94
104
95
105
To improve the build process performance, one might add the Bitcoin repository directory to the Microsoft Defender Antivirus exclusions.
0 commit comments