vircadia / vircadia-native-core

Vircadia open source agent-based metaverse ecosystem.
https://vircadia.com/
Other
531 stars 175 forks source link

Can't build native interface on Windows 11 #1777

Open elardo opened 4 months ago

elardo commented 4 months ago

I used this guide https://github.com/vircadia/vircadia-native-core/blob/master/BUILD_WIN.md#build-windows to build native Windows interface.

On step 8 (cmake .. -G "Visual Studio 16 2019" -A x64 command) it fails to download dependency mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst from any mirror and crashes with error.

Full log:

D:\Code\vircadia\build>cmake .. -G "Visual Studio 16 2019" -A x64
-- GLES_OPTION:
Using the Python interpreter located at: C:/Users/anton/AppData/Local/Programs/Python/Python312/python.exe
['D:/Code/vircadia/prebuild.py', '--release-type', 'DEV', '--build-root', 'D:/Code/vircadia/build']
Using a packaged Qt
Qt5 check passed, found C:\Users\anton/vircadia-files/qt\qt5-install\lib\cmake\Qt5
Found pre-built Qt5
cmake path: C:\Users\anton/vircadia-files/qt\qt5-install\lib\cmake
Qt has already been downloaded
Writing cmake config to D:/Code/vircadia/build\qt.cmake
Using vcpkg path C:\Users\anton/vircadia-files/vcpkg\8656fb1e
Writing tag 8656fb1e_1 to C:\Users\anton/vircadia-files/vcpkg\8656fb1e\.id
Installing host tools
Running command
['C:\\Users\\anton/vircadia-files/vcpkg\\8656fb1e\\vcpkg.exe', '--vcpkg-root', 'C:\\Users\\anton/vircadia-files/vcpkg\\8656fb1e', 'install', '--triplet', 'x64-windows', 'hifi-host-tools']
Computing installation plan...
The following packages are already installed:
    hifi-host-tools[core]:x64-windows -> 0
hifi-host-tools:x64-windows is already installed
Restored 0 packages from C:\Users\anton\AppData\Local\vcpkg\archives in 334.4 us. Use --debug to see more details.

Total elapsed time: 23.11 ms

Installing build dependencies
Running command
['C:\\Users\\anton/vircadia-files/vcpkg\\8656fb1e\\vcpkg.exe', '--vcpkg-root', 'C:\\Users\\anton/vircadia-files/vcpkg\\8656fb1e', 'install', '--triplet', 'x64-windows', 'hifi-client-deps']
Computing installation plan...
The following packages will be built and installed:
  * bullet3[core]:x64-windows -> 3.22
  * draco[core]:x64-windows -> 1.3.3
  * etc2comp[core]:x64-windows -> 7f1843bf07825c21cab711360c1ddbad04641036
  * glad[core]:x64-windows -> 20191029
  * glm[core]:x64-windows -> 0.9.9.3
    hifi-client-deps[core]:x64-windows -> 0.1
  * hifi-deps[core]:x64-windows -> 0.1.5-github-actions
  * liblo[core]:x64-windows -> 0.30
  * nlohmann-json[core]:x64-windows -> 3.3.0
  * nvtt[core]:x64-windows -> 330c4d56274a0f602a5c70596e2eb670a4ed56c2
  * openexr[core]:x64-windows -> 2.3.0-2
  * openssl[core]:x64-windows -> 0
  * openssl-windows[core]:x64-windows -> 1.1.1h
  * openvr[core]:x64-windows -> 1.16.8
  * opus[core]:x64-windows -> 1.3.1#6
  * polyvox[core]:x64-windows -> 20150715
  * quazip[core]:x64-windows -> 0.7.3
  * sdl2[core]:x64-windows -> 2.0.10-2
  * sranipal[core]:x64-windows -> 1.1.0.1
  * tbb[core]:x64-windows -> 2019_U8-1
  * vhacd[core]:x64-windows -> 20191029
  * vulkanmemoryallocator[core]:x64-windows -> 3a7249f313b047417fbb1d36a3fbe6c3bf1505b5
  * webrtc[core]:x64-windows -> 20210105
  * zlib[core]:x64-windows -> 1.2.11-6
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet "x64-windows"...
Restored 0 packages from C:\Users\anton\AppData\Local\vcpkg\archives in 2.219 ms. Use --debug to see more details.
Installing 1/24 bullet3:x64-windows...
Building bullet3[core]:x64-windows...
-- Note: bullet3 only supports static library linkage. Building static library.
-- Using cached bulletphysics-bullet3-3.22.tar.gz.
-- Cleaning sources at C:/Users/anton/vircadia-files/vcpkg/8656fb1e/buildtrees/bullet3/src/3.22-d2f56169ec.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Users/anton/vircadia-files/vcpkg/8656fb1e/downloads/bulletphysics-bullet3-3.22.tar.gz
-- Applying patch cmake-fix.patch
-- Applying patch enable-profiling.patch
-- Using source at C:/Users/anton/vircadia-files/vcpkg/8656fb1e/buildtrees/bullet3/src/3.22-d2f56169ec.clean
-- Found external ninja('1.11.0').
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel
-- Using cached msys-mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst.
-- Downloading https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirror.selfnet.de/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst -> msys-mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst...
[DEBUG] To include the environment variables in debug output, pass --debug-env
[DEBUG] Feature flag 'binarycaching' unset
[DEBUG] Feature flag 'manifests' = off
[DEBUG] Feature flag 'compilertracking' unset
[DEBUG] Feature flag 'registries' unset
[DEBUG] Feature flag 'versions' unset
[DEBUG] Downloading https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
[DEBUG] Downloading https://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
[DEBUG] Downloading https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
[DEBUG] Downloading https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
[DEBUG] Downloading https://mirrors.ustc.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
[DEBUG] Downloading https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
[DEBUG] Download failed -- retrying after 1000 ms.
[DEBUG] Download failed -- retrying after 2000 ms.
[DEBUG] Download failed -- retrying after 4000 ms.
[DEBUG] Downloading https://mirror.selfnet.de/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
[DEBUG] Downloading https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
Error: Failed to download from mirror set:
https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404
https://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404
https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404
https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404
https://mirrors.ustc.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404
https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: WinHttpSendRequest() failed: 12007
https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: WinHttpSendRequest() failed: 12007
https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: WinHttpSendRequest() failed: 12007
https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: WinHttpSendRequest() failed: 12007
https://mirror.selfnet.de/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404
https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404

[DEBUG] D:\a\_work\1\s\src\vcpkg\base\downloads.cpp(788):
[DEBUG] Time in subprocesses: 0 us
[DEBUG] Time in parsing JSON: 11 us
[DEBUG] Time in JSON reader: 0 us
[DEBUG] Time in filesystem: 4879 us
[DEBUG] Time in loading ports: 0 us
[DEBUG] Exiting after 15.4 s (15399453 us)

CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:24 (message):

      Failed to download file with error: 1
      If you use a proxy, please check your proxy setting. Possible causes are:

      1. You are actually using an HTTP proxy, but setting HTTPS_PROXY variable
         to `https://address:port`. This is not correct, because `https://` prefix
         claims the proxy is an HTTPS proxy, while your proxy (v2ray, shadowsocksr
         , etc..) is an HTTP proxy. Try setting `http://address:port` to both
         HTTP_PROXY and HTTPS_PROXY instead.

      2. You are using Fiddler. Currently a bug (https://github.com/microsoft/vcpkg/issues/17752)
         will set HTTPS_PROXY to `https://fiddler_address:port` which lead to problem 1 above.
         Workaround is open Windows 10 Settings App, and search for Proxy Configuration page,
         Change `http=address:port;https=address:port` to `address`, and fill the port number.

      3. Your proxy's remote server is out of service.

      In future vcpkg releases, if you are using Windows, you no longer need to set
      HTTP(S)_PROXY environment variables. Vcpkg will simply apply Windows IE Proxy
      Settings set by your proxy software. See (https://github.com/microsoft/vcpkg-tool/pull/49)
      and (https://github.com/microsoft/vcpkg-tool/pull/77)

      Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues

Call Stack (most recent call first):
  scripts/cmake/vcpkg_download_distfile.cmake:249 (z_vcpkg_download_distfile_show_proxy_and_fail)
  scripts/cmake/vcpkg_acquire_msys.cmake:26 (vcpkg_download_distfile)
  scripts/cmake/vcpkg_acquire_msys.cmake:116 (z_vcpkg_acquire_msys_download_package)
  scripts/cmake/vcpkg_find_acquire_program.cmake:530 (vcpkg_acquire_msys)
  scripts/cmake/vcpkg_fixup_pkgconfig.cmake:151 (vcpkg_find_acquire_program)
  ports/bullet3/portfile.cmake:37 (vcpkg_fixup_pkgconfig)
  scripts/ports.cmake:146 (include)

error: building bullet3:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
    https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+bullet3
You can submit a new issue at:
    https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[bullet3]+Build+error
Include '[bullet3] Build error' in your bug report title, the following version information in your bug description, and attach any relevant failure logs from above.
    vcpkg-tool version: 2022-06-17-9268e366206712e38102b28dbd1617697a99ff2e
    vcpkg-scripts version: cef0b3e 2022-06-20 (2 years, 1 month ago)

You can also use the prefilled template from C:\Users\anton\vircadia-files\vcpkg\8656fb1e\installed\vcpkg\issue_body.md.

Traceback (most recent call last):
  File "D:\Code\vircadia\prebuild.py", line 203, in <module>
    main()
  File "D:\Code\vircadia\prebuild.py", line 170, in main
    pm.setupDependencies(qt=qtInstallPath)
  File "D:\Code\vircadia\hifi_vcpkg.py", line 283, in setupDependencies
    self.run(['install', '--triplet', self.getTripletWithBuildType(self.triplet), 'hifi-client-deps'])
  File "D:\Code\vircadia\hifi_vcpkg.py", line 229, in run
    hifi_utils.executeSubprocess(actualCommands, folder=self.path, env=self.buildEnv)
  File "D:\Code\vircadia\hifi_utils.py", line 74, in executeSubprocess
    raise RuntimeError('Call to "{}" failed.\n\narguments:\n{}\n'.format(
RuntimeError: Call to "C:\Users\anton/vircadia-files/vcpkg\8656fb1e\vcpkg.exe" failed.

arguments:
--vcpkg-root C:\Users\anton/vircadia-files/vcpkg\8656fb1e install --triplet x64-windows hifi-client-deps

CMake Error at CMakeLists.txt:151 (message):
  prebuild.py failed with error 1

-- Configuring incomplete, errors occurred!

Environment:

Windows 11 Home (23H2) cmake 3.28.3 Python 3.12.0 Node 20.15 LTS