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

[zlib] Build error on x64-windows #39323

Open
cheditx opened this issue Jun 16, 2024 · 5 comments
Open

[zlib] Build error on x64-windows #39323

cheditx opened this issue Jun 16, 2024 · 5 comments
Assignees
Labels
requires:repro The issue is not currently repro-able

Comments

@cheditx
Copy link

cheditx commented Jun 16, 2024

issue_body.md

@WangWeiLin-MV WangWeiLin-MV added the requires:repro The issue is not currently repro-able label Jun 17, 2024
@WangWeiLin-MV
Copy link
Contributor

Using the latest version of vcpkg for local installation does not reproduce the issue.

Please make sure that the component Windows SDK is installed in the Visual Studio Installer, or re-install VS build tools.

@AenBleidd
Copy link
Contributor

@cheditx, you need to have 'Desktop development with C++' workload installed:
image

@PfunnyGuy
Copy link

PfunnyGuy commented Jun 20, 2024

I am having the same issue. I have installed every single Desktop C++ package from VS 22 installer.

Looking in the config-x64-windows-out.log file as instructed (and from what I've read in other posts) kernel32.lib is missing:

CMake Error at C:/Repos/vcpkg/downloads/tools/cmake-3.29.2-windows/cmake-3.29.2-windows-i386/share/cmake-3.29/Modules/CMakeTestCCompiler.cmake:67 (message):
  The C compiler

    "C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: 'C:/Repos/vcpkg/buildtrees/zlib/x64-windows-rel/CMakeFiles/CMakeScratch/TryCompile-yu459m'
    
    Run Build Command(s): "C:/Program Files/Microsoft Visual Studio/2022/Professional/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" -v cmTC_7a4a8
    [1/2] C:\PROGRA~1\MIB055~1\2022\PROFES~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\cl.exe  /nologo   /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /MP   /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1  -MDd /showIncludes /FoCMakeFiles\cmTC_7a4a8.dir\testCCompiler.c.obj /FdCMakeFiles\cmTC_7a4a8.dir\ /FS -c C:\Repos\vcpkg\buildtrees\zlib\x64-windows-rel\CMakeFiles\CMakeScratch\TryCompile-yu459m\testCCompiler.c
    [2/2] C:\WINDOWS\system32\cmd.exe /C "cd . && C:\Repos\vcpkg\downloads\tools\cmake-3.29.2-windows\cmake-3.29.2-windows-i386\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_7a4a8.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests  -- C:\PROGRA~1\MIB055~1\2022\PROFES~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_7a4a8.dir\testCCompiler.c.obj  /out:cmTC_7a4a8.exe /implib:cmTC_7a4a8.lib /pdb:cmTC_7a4a8.pdb /version:0.0 /machine:x64  /nologo    /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
    FAILED: cmTC_7a4a8.exe 
    C:\WINDOWS\system32\cmd.exe /C "cd . && C:\Repos\vcpkg\downloads\tools\cmake-3.29.2-windows\cmake-3.29.2-windows-i386\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_7a4a8.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests  -- C:\PROGRA~1\MIB055~1\2022\PROFES~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_7a4a8.dir\testCCompiler.c.obj  /out:cmTC_7a4a8.exe /implib:cmTC_7a4a8.lib /pdb:cmTC_7a4a8.pdb /version:0.0 /machine:x64  /nologo    /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."

    RC Pass 1: command "rc /fo CMakeFiles\cmTC_7a4a8.dir/manifest.res CMakeFiles\cmTC_7a4a8.dir/manifest.rc" failed (exit code 0) with the following output:

    no such file or directory

    ninja: build stopped: subcommand failed.

I have updated the repo using Git. I've got the latest everything.

image

As I get this same behavior for every library I want to install with vcpkg, I'm sure it isn't zlib related. But I sure wish MS could make something that worked out of the box. I've spent 3 days trying to solve this problem.

@dg0yt
Copy link
Contributor

dg0yt commented Jun 20, 2024

--mt=CMAKE_MT-NOTFOUND

Not yet complete.

@WangWeiLin-MV
Copy link
Contributor

Please build under Developer Command Prompt or Developer PowerShell which have specific environment variables set.

Or launch in command line, for example:

"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64 -host_arch=x64

or

& 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1' -Arch arm64 -HostArch amd64

After then, it could be checked by the command:

cl.exe /Bv

Which will show the compiler info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires:repro The issue is not currently repro-able
Projects
None yet
Development

No branches or pull requests

5 participants