Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jasper] Build error on x64-windows #36103

Closed
SHIHUAMarryMe opened this issue Jan 10, 2024 · 12 comments
Closed

[jasper] Build error on x64-windows #36103

SHIHUAMarryMe opened this issue Jan 10, 2024 · 12 comments
Assignees
Labels
depends:upstream-changes Waiting on a change to the upstream project

Comments

@SHIHUAMarryMe
Copy link

OS: Win11
vs version: VS2022 17.8.4
vcpkg version: vcpkg package management program version 2023-12-12-1c9ec1978a6b0c2b39c9e9554a96e3e275f7556e

cmake log:

1> [CMake] 正在安装 152/167 个 jasper[core,default-features,opengl]:x64-windows@4.0.0#1...
1> [CMake] 正在生成 jasper[core,default-features,opengl]:x64-windows@4.0.0#1...
1> [CMake] -- 正从以下位置安装端口: C:\dev\vcpkg\buildtrees\versioning_\versions\jasper\1da5fa9a12bf207bf641f903856418e3aed7258d
1> [CMake] -- Using cached jasper-software-jasper-402d096b39f4f618ad9e6ff2b4fc1b5eb260a2e4.tar.gz.
1> [CMake] -- Cleaning sources at C:/dev/vcpkg/buildtrees/jasper/src/5eb260a2e4-fc3d85658e.clean. Use --editable to skip cleaning for the packages you specify.
1> [CMake] -- Extracting source C:/dev/vcpkg/downloads/jasper-software-jasper-402d096b39f4f618ad9e6ff2b4fc1b5eb260a2e4.tar.gz
1> [CMake] -- Applying patch no_stdc_check.patch
1> [CMake] -- Using source at C:/dev/vcpkg/buildtrees/jasper/src/5eb260a2e4-fc3d85658e.clean
1> [CMake] -- Found external ninja('1.11.0').
1> [CMake] -- Configuring x64-windows
1> [CMake] -- Building x64-windows-dbg
1> [CMake] CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
1> [CMake]     Command failed: C:/dev/vcpkg/downloads/tools/cmake-3.27.1-windows/cmake-3.27.1-windows-i386/bin/cmake.exe --build . --config Debug --target install -- -v -j13
1> [CMake]     Working Directory: C:/dev/vcpkg/buildtrees/jasper/x64-windows-dbg
1> [CMake]     See logs for more information:
1> [CMake]       C:\dev\vcpkg\buildtrees\jasper\install-x64-windows-dbg-out.log
1> [CMake] 
1> [CMake] Call Stack (most recent call first):
1> [CMake]   C:/Users/87869/source/repos/osgb2tiles/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
1> [CMake]   C:/Users/87869/source/repos/osgb2tiles/out/build/x64-RelWithDebInfo/vcpkg_installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
1> [CMake]   buildtrees/versioning_/versions/jasper/1da5fa9a12bf207bf641f903856418e3aed7258d/portfile.cmake:37 (vcpkg_cmake_install)
1> [CMake]   scripts/ports.cmake:170 (include)
1> [CMake] error: 生成 jasper:x64-windows 失败,结果为: BUILD_FAILED
1> [CMake] 处理 jasper:x64-windows 所用时间: 44 s
1> [CMake] 请确保使用具有“git pull” 和 “vcpkg update”的最新端口文件。
1> [CMake] 然后,在以下位置查看已知问题:
1> [CMake]   https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+jasper
1> [CMake] 可在以下位置提交新问题:
1> [CMake]   https://github.com/microsoft/vcpkg/issues/new?title=[jasper]+Build+error+on+x64-windows&body=Copy+issue+body+from+C%3A%2FUsers%2F87869%2Fsource%2Frepos%2Fosgb2tiles%2Fout%2Fbuild%2Fx64-RelWithDebInfo%2Fvcpkg_installed%2Fvcpkg%2Fissue_body.md
1> [CMake] 
1> [CMake] -- Running vcpkg install - failed
1> [CMake] CMake Error at C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake:899 (message):
1> [CMake]   vcpkg install failed.  See logs for more information:
1> [CMake]   C:\Users\87869\source\repos\osgb2tiles\out\build\x64-RelWithDebInfo\vcpkg-manifest-install.log
1> [CMake] Call Stack (most recent call first):
1> [CMake]   C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.27/Modules/CMakeDetermineSystem.cmake:148 (include)
1> [CMake]   CMakeLists.txt:12 (project)
1> [CMake] -- Configuring incomplete, errors occurred!
1> “C:\WINDOWS\system32\cmd.exe”“/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe"  -G "Ninja"  -DCMAKE_C_COMPILER:STRING="cl.exe" -DCMAKE_CXX_COMPILER:STRING="cl.exe" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake" -DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo" -DCMAKE_INSTALL_PREFIX:PATH="C:/Users/87869/source/repos/osgb2tiles/out/install/x64-RelWithDebInfo"   -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "C:\Users\87869\source\repos\osgb2tiles" 2>&1"”执行失败,出现错误:““C:\WINDOWS\system32\cmd.exe”“/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe"  -G "Ninja"  -DCMAKE_C_COMPILER:STRING="cl.exe" -DCMAKE_CXX_COMPILER:STRING="cl.exe" -DCMAKE_TOOLCHAIN_FILE:FILEPATH="C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake" -DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo" -DCMAKE_INSTALL_PREFIX:PATH="C:/Users/87869/source/repos/osgb2tiles/out/install/x64-RelWithDebInfo"   -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "C:\Users\87869\source\repos\osgb2tiles" 2>&1"”已返回,并带有退出代码: 1”。

install-x64-windows-dbg-out.log:

install-x64-windows-dbg-out.log

@nickdademo
Copy link
Contributor

Can also repro. Break occurs in VS 17.8.4 (17.8.3 is fine).

@jimwang118 jimwang118 added the depends:upstream-changes Waiting on a change to the upstream project label Jan 10, 2024
@SHIHUAMarryMe
Copy link
Author

Can also repro. Break occurs in VS 17.8.4 (17.8.3 is fine).

yeah, I update my vs2022 and vcpkg today. It was ok before.

@jimwang118
Copy link
Contributor

This is a visual studio issue. We have submitted an issue to VS for tracking and are waiting for the VS developers to fix it.

@SHIHUAMarryMe
Copy link
Author

This is a visual studio issue. We have submitted an issue to VS for tracking and are waiting for the VS developers to fix it.

Is there any other way to fix this issue? I don't have time to wait for the VS developers to fix it.

@jimwang118
Copy link
Contributor

Is there any other way to fix this issue? I don't have time to wait for the VS developers to fix it.

You can roll back the VS version to 17.8.3.

@StarGate-One
Copy link
Contributor

Instead of rolling VS back to 17.8.3 I created an overlay triplet, a copy of the x64-windows triplet with an additional line referencing an older C/C++ compiler as follows:

set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_PLATFORM_TOOLSET_VERSION "14.37.32822")

Then deleted my vcpkg instance and recreated and build/compile/install of all the ports/features I needed.

So now vcpkg uses the 14.37.32822 C/C++ compiler/linker instead of the latest 14.38.33130 C/C++ compiler/liner.
It might work for you...

@SHIHUAMarryMe
Copy link
Author

Instead of rolling VS back to 17.8.3 I created an overlay triplet, a copy of the x64-windows triplet with an additional line referencing an older C/C++ compiler as follows:

set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_PLATFORM_TOOLSET_VERSION "14.37.32822")

Then deleted my vcpkg instance and recreated and build/compile/install of all the ports/features I needed.

So now vcpkg uses the 14.37.32822 C/C++ compiler/linker instead of the latest 14.38.33130 C/C++ compiler/liner. It might work for you...

Thank you for providing another more elegant solution.

@qingzhengzhuma
Copy link

I changed the CMakelists.txt of jasper by adding /experimental:c11atomics compile option, and it worked.

@jimwang118
Copy link
Contributor

This issue has been fixed by PR 36143.

@Brainy0207
Copy link

We just ran into this problem after updating Visual Studio. We have to maintain some older projects which have manifest files with an older builtin-baseline. I don't want to pull up the baseline for these projects, because updating all ports to newer versions could have unwanted side effects.

What would be the best course of action here?
I saw someone suggesting to set VCPKG_PLATFORM_TOOLSET_VERSION to an older version.

@jimwang118
Copy link
Contributor

We just ran into this problem after updating Visual Studio. We have to maintain some older projects which have manifest files with an older builtin-baseline. I don't want to pull up the baseline for these projects, because updating all ports to newer versions could have unwanted side effects.

What would be the best course of action here? I saw someone suggesting to set VCPKG_PLATFORM_TOOLSET_VERSION to an older version.

Yes, setting VCPKG_PLATFORM_TOOLSET_VERSION to an older version can solve the issue.

@ktimam
Copy link

ktimam commented May 26, 2024

I'm facing this on the latest. Tried on two different machines with latest vcpkg!

Edit:
Got it fixed by changing baseline in project vcpkg to latest

PS G:\vcpkg> git rev-parse HEAD
01f6021

//Change baseline in vcpkg.json in root directory to head
"builtin-baseline": "01f602195983451bc83e72f4214af2cbc495aa94"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
depends:upstream-changes Waiting on a change to the upstream project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants