microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.68k stars 6.27k forks source link

[libjpeg-turbo] Build error #35359

Closed BrianMouncer closed 9 months ago

BrianMouncer commented 9 months ago

We had a good CiCd build just before the holidays on Wednesday the 22 at 9am PST. However VCPackage of LibJpeg has failed every build since Wednesday afternoon around 10pm PST.

Just from the timing of the failures, I suspect one of the commits on Nov 22, 2023 is the cause, but I do not know enough about this project to hazard a guess as to which change is most suspect...

https://github.com/microsoft/vcpkg/commits/master

We are using the standard Azure hosted build agents, running recent versions of windows and vs 2022. While we have not changed anything for your builds or tools on this day, the agents do occasionally update tools.

From the logs, we are using CMake 3.27.7

the error output is as follows...

Call Stack (most recent call first): scripts/cmake/vcpkg_download_distfile.cmake:309 (z_vcpkg_download_distfile_show_proxy_and_fail) scripts/cmake/vcpkg_acquire_msys.cmake:84 (vcpkg_download_distfile) scripts/cmake/vcpkg_acquire_msys.cmake:174 (z_vcpkg_acquire_msys_download_package) scripts/cmake/vcpkg_find_acquire_program.cmake:549 (vcpkg_acquire_msys) scripts/cmake/vcpkg_fixup_pkgconfig.cmake:198 (vcpkg_find_acquire_program) ports/libjpeg-turbo/portfile.cmake:59 (vcpkg_fixup_pkgconfig) scripts/ports.cmake:145 (include)

All packages listed in D:\a_work\1\s\external\vision_embedded_ocr\packages.config are already installed. -- Setting up dependencies from Microsoft.TextRecognition.Native.7.2.147 -- Configuring VCPKG -- Generating VCPKG json file. Packages to include: "ms-gsl", "zlib", "libpng", "libjpeg-turbo", "nlohmann-json" -- VCPKG Triplet was set to x64-windows -- CMake version info: 3.27.7

.....

Error: Building package libjpeg-turbo:x64-windows failed with: BUILD_FAILED Please ensure you're using the latest portfiles 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+libjpeg-turbo You can submit a new issue at: https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[libjpeg-turbo]+Build+error including: package: libjpeg-turbo[core]:x64-windows -> 2.1.3#1 vcpkg-tool version: 2022-03-09-1affd32f93b299d5a907816c328ca3ededb73a7e vcpkg-scripts version: https://github.com/microsoft/vcpkg/commit/af2287382b1991dbdcb7e5112d236f3323b9dd7a 2022-03-11 (1 year, 8 months ago)

Let me know if there is any other information that would help you resolve this issue?

Thanks,

BrianMouncer commented 9 months ago

also, I just noticed that farther up in the logs, there are soem download errors for some other tools like "libwinpthread" Those might be related. Has one of your dependencies dropped off the download mirrors?

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(709):

dg0yt commented 9 months ago

Just from the timing of the failures, I suspect one of the commits on Nov 22, 2023 is the cause,

The problem are not new commits. The problem is using an outdated baseline. The commits which prevent this error were made months ago. At the moment the MSYS2 project removes downloads 1.75 years after an update becomes available. It may take one more year for vcpkg to use an updated package. And then some users notice it 0.75 years later...

dg0yt commented 9 months ago

package: libjpeg-turbo[core]:x64-windows -> 2.1.3#1 
vcpkg-tool version: 2022-03-09-1affd32f93b299d5a907816c328ca3ededb73a7e 
vcpkg-scripts version: f22873 2022-03-11 (1 year, 8 months ago)
BrianMouncer commented 9 months ago

Just from the timing of the failures, I suspect one of the commits on Nov 22, 2023 is the cause,

The problem are not new commits. The problem is using an outdated baseline. The commits which prevent this error were made months ago. At the moment the MSYS2 project removes downloads 1.75 years after an update becomes available. It may take one more year for vcpkg to use an updated package. And then some users notice it 0.75 years later...

@dg0yt

Do you have any helpful instructions on how to resolve this then? We have made no changes in how we use the libjpeg-turbo vc package. it is just a git submodule and refference in out CMake file. But it started failing late last week.

Do I just update our git submodule for vcpkg to a newer checkpoint hash to get a fix already checked into vcpkg master branch?

Thanks.

BrianMouncer commented 9 months ago

That seems to have resolved the issue. We previously had our VCPKG submodule locked to vcpkg commit af2287382b1991dbdcb7e5112d236f3323b9dd7a and this spontaneously started failing last week.

I updated to the latest changes in vcpkg master which is commit 516147648a72867876a0c10d9293e833b66af82e, and that resolved the build breaks for us.

Thanks