Skip to content

Commit

Permalink
Fix OCIO build break on Windows caused by outdated vcpkg (AcademySoft…
Browse files Browse the repository at this point in the history
…wareFoundation#325)

### Fix OCIO build break caused by outdated vcpkg

### Linked issues
NA

### Summarize your change.

This PR solves the following RV_DEPS_OCIO build break on Windows caused
by outdated vcpkg

The fix consists in updating vcpkg to latest.

### Describe the reason for the change.

Starting quite recently (today!), the following build errors were
reported when building RV_DEPS_OCIO on Windows:

I found a similar report here:
microsoft/vcpkg#24028

It turns out. the vckpg needs to be updated periodically as we are not
guaranteed that vcpkg depdendencies will be available for a long time in
the MSYS2 infrastructure.

`Detecting compiler hash for triplet x64-windows...
The following packages will be built and installed:
    cxxopts[core]:x64-windows -> 3.1.1
  * egl-registry[core]:x64-windows -> 2022-09-20
    freeglut[core]:x64-windows -> 3.4.0
    glew[core]:x64-windows -> 2.2.0#1
  * opengl[core]:x64-windows -> 2022-12-04#3
  * opengl-registry[core]:x64-windows -> 2022-09-29#1
Additional packages (*) will be modified to complete this operation.
Restored 0 package(s) from C:\Users\labergb\AppData\Local\vcpkg\archives
in 344 us. Use --debug to see more details.
Installing 1/6 cxxopts:x64-windows...
Building cxxopts[core]:x64-windows...
-- Using cached jarro2783-cxxopts-v3.1.1.tar.gz.
-- Cleaning sources at
C:/orv/OpenRV/_build/RV_DEPS_VCPKG/src/buildtrees/cxxopts/src/v3.1.1-6b7980cd99.clean.
Use --editable to skip cleaning for the packages you specify.
-- Extracting source
C:/orv/OpenRV/_build/RV_DEPS_VCPKG/src/downloads/jarro2783-cxxopts-v3.1.1.tar.gz
-- Using source at
C:/orv/OpenRV/_build/RV_DEPS_VCPKG/src/buildtrees/cxxopts/src/v3.1.1-6b7980cd99.clean
-- Found external ninja('1.11.0').
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel
-- Fixing pkgconfig file:
C:/orv/OpenRV/_build/RV_DEPS_VCPKG/src/packages/cxxopts_x64-windows/lib/pkgconfig/cxxopts.pc
-- 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] Trying to load bundleconfig from
C:\orv\OpenRV\_build\RV_DEPS_VCPKG\src\vcpkg-bundle.json
[DEBUG] Failed to open:
C:\orv\OpenRV\_build\RV_DEPS_VCPKG\src\vcpkg-bundle.json
[DEBUG] Bundle config: readonly=false, usegitregistry=false,
embeddedsha=nullopt, deployment=Git, vsversion=nullopt
[DEBUG] Metrics enabled.
[DEBUG] Feature flag 'binarycaching' unset
[DEBUG] Feature flag 'compilertracking' unset
[DEBUG] Feature flag 'registries' unset
[DEBUG] Feature flag 'versions' unset
Downloading
https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
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
Downloading
https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
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
Downloading
https://mirrors.ustc.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
Downloading
https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
warning: Download failed -- retrying after 1000ms
warning: Download failed -- retrying after 2000ms
warning: Download failed -- retrying after 4000ms
Downloading
https://mirror.selfnet.de/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
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
error:
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
error:
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
error:
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
error:
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
error:
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
error:
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 with exit code 12007
error:
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 with exit code 12007
error:
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 with exit code 12007
error:
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 with exit code 12007
error:
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
error:
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(961):
[DEBUG] Time in subprocesses: 0us
[DEBUG] Time in parsing JSON: 95us
[DEBUG] Time in JSON reader: 0us
[DEBUG] Time in filesystem: 4192us
[DEBUG] Time in loading ports: 0us
[DEBUG] Exiting after 13 s (12763801us)

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

      Failed to download file with error: 1
If you are using 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. If you are using Windows, vcpkg will automatically use your Windows
IE Proxy Settings
set by your proxy software. See
microsoft/vcpkg-tool#77
The value set by your proxy might be wrong, or have same `https://`
prefix issue.

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

If you've tried directly download the link, and believe this is not a
temporary
download server failure, please submit an issue at
https://github.com/Microsoft/vcpkg/issues
      to report this upstream download server failure.

Call Stack (most recent call first):
scripts/cmake/vcpkg_download_distfile.cmake:270
(z_vcpkg_download_distfile_show_proxy_and_fail)
  scripts/cmake/vcpkg_acquire_msys.cmake:26 (vcpkg_download_distfile)
scripts/cmake/vcpkg_acquire_msys.cmake:124
(z_vcpkg_acquire_msys_download_package)
scripts/cmake/vcpkg_find_acquire_program(PKGCONFIG).cmake:22
(vcpkg_acquire_msys)
  scripts/cmake/vcpkg_find_acquire_program.cmake:118 (include)
scripts/cmake/vcpkg_fixup_pkgconfig.cmake:203
(vcpkg_find_acquire_program)
  ports/cxxopts/portfile.cmake:21 (vcpkg_fixup_pkgconfig)
  scripts/ports.cmake:147 (include)

error: building cxxopts: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+cxxopts
You can submit a new issue at:

https://github.com/microsoft/vcpkg/issues/new?title=[cxxopts]+Build+error&body=Copy+issue+body+from+C%3A%2Forv%2FOpenRV%2F_build%2FRV_DEPS_OCIO%2Fsrc%2Fvcpkg_installed%2Fvcpkg%2Fissue_body.md
`

### Describe what you have tested and on which operating system.
Successfully Tested fix on Windows (Windows being the only platform that
includes vcpkg.cmake)

### Add a list of changes, and note any that might need special
attention during the review.

### If possible, provide screenshots.

Signed-off-by: Bernard Laberge <[email protected]>
Signed-off-by: Martin Chesnay <[email protected]>
  • Loading branch information
bernie-laberge authored and mchesnay committed Nov 27, 2023
1 parent 1cac8ed commit e45c7a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/dependencies/vcpkg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ INCLUDE(ProcessorCount) # require CMake 3.15+
PROCESSORCOUNT(_cpu_count)

IF(RV_TARGET_WINDOWS)
RV_CREATE_STANDARD_DEPS_VARIABLES("RV_DEPS_VCPKG" "2023.04.15" "" "")
RV_CREATE_STANDARD_DEPS_VARIABLES("RV_DEPS_VCPKG" "2023.11.20" "" "")
RV_SHOW_STANDARD_DEPS_VARIABLES()

SET(_byproducts
Expand Down

0 comments on commit e45c7a1

Please sign in to comment.