microsoft / vcpkg

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

[openssl] Build error on x64-windows #42188

Open geoyee opened 1 week ago

geoyee commented 1 week ago

Package: openssl:x64-windows@3.3.2#1

Host Environment

To Reproduce

vcpkg install

Failure logs

-- Using cached openssl-openssl-210dc9a50dfd99caa1cf7c3d2fa42850124b1bbc.patch.
-- Using cached openssl-openssl-openssl-3.3.2.tar.gz.
-- Cleaning sources at E:/dataFiles/github/vcpkg/buildtrees/openssl/src/nssl-3.3.2-515f0a0017.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source E:/dataFiles/github/vcpkg/downloads/openssl-openssl-openssl-3.3.2.tar.gz
-- Applying patch cmake-config.patch
-- Applying patch command-line-length.patch
-- Applying patch script-prefix.patch
-- Applying patch asm-armcap.patch
-- Applying patch windows/install-layout.patch
-- Applying patch windows/install-pdbs.patch
-- Applying patch unix/android-cc.patch
-- Applying patch unix/move-openssldir.patch
-- Applying patch unix/no-empty-dirs.patch
-- Applying patch unix/no-static-libs-for-shared.patch
-- Applying patch E:/dataFiles/github/vcpkg/downloads/openssl-openssl-210dc9a50dfd99caa1cf7c3d2fa42850124b1bbc.patch
-- Using source at E:/dataFiles/github/vcpkg/buildtrees/openssl/src/nssl-3.3.2-515f0a0017.clean
-- Found external ninja('1.10.2').
-- Getting CMake variables for x64-windows
-- Getting CMake variables for x64-windows
-- Prerunning x64-windows-dbg
-- Building x64-windows-dbg
-- Restarting build without parallelism
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
    Command failed: "D:/Visual Studio/VS2019/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/nmake.exe" /NOLOGO /G /U /F makefile install_dev install_modules INSTALL_PDBS=ON
    Working Directory: E:/dataFiles/github/vcpkg/buildtrees/openssl/x64-windows-dbg
    See logs for more information:
      E:\dataFiles\github\vcpkg\buildtrees\openssl\install-x64-windows-dbg-nmake-out.log
      E:\dataFiles\github\vcpkg\buildtrees\openssl\install-x64-windows-dbg-nmake-err.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_build_nmake.cmake:156 (vcpkg_execute_build_process)
  C:/Users/Geoyee/AppData/Local/vcpkg/registries/git-trees/2c0920b57254210866a89aa705291b452a31df48/windows/portfile.cmake:74 (vcpkg_build_nmake)
  C:/Users/Geoyee/AppData/Local/vcpkg/registries/git-trees/2c0920b57254210866a89aa705291b452a31df48/portfile.cmake:76 (include)
  scripts/ports.cmake:192 (include)
E:\dataFiles\github\vcpkg\buildtrees\openssl\install-x64-windows-dbg-nmake-err.log ``` cl: 鍛戒护琛?warning D9025 :姝e湪閲嶅啓鈥?Zi鈥?鐢ㄢ€?Z7鈥? NMAKE : fatal error U1077: “"D:\Visual Studio\VS2019\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe"”: 返回代码“0x2” Stop. NMAKE : fatal error U1077: “"D:\Visual Studio\VS2019\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\nmake.exe"”: 返回代码“0x2” Stop. ```
E:\dataFiles\github\vcpkg\buildtrees\openssl\install-x64-windows-dbg-nmake-out.log ``` "D:\Visual Studio\VS2019\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\nmake.exe" /LU depend "D:\Visual Studio\VS2019\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\nmake.exe" /LU _build_libs "D:\Visual Studio\VS2019\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe" /Zi /Fdossl_static.pdb /Gs0 /GF /Gy /MDd -nologo -DWIN32 -D_WINDOWS -utf-8 -MP -D_DEBUG -MDd -Z7 -Ob0 -Od -RTC1 -I"crypto" -I"." -I"include" -I"providers\common\include" -I"providers\implementations\include" -D"L_ENDIAN" -D"OPENSSL_PIC" -D"OPENSSLDIR=\"E:\\dataFiles\\github\\vcpkg\\packages\\openssl_x64-windows\\debug\"" -D"ENGINESDIR=\"E:\\dataFiles\\github\\vcpkg\\packages\\openssl_x64-windows\\debug\\lib\\engines-3\"" -D"MODULESDIR=\"E:\\dataFiles\\github\\vcpkg\\packages\\openssl_x64-windows\\debug\\bin\"" -D"OPENSSL_BUILDING_OPENSSL" -D"OPENSSL_SYS_WIN32" -D"WIN32_LEAN_AND_MEAN" -D"UNICODE" -D"_UNICODE" -D"_CRT_SECURE_NO_DEPRECATE" -D"_WINSOCK_DEPRECATED_NO_WARNINGS" -D"DEBUG" -D"_DEBUG" -DAES_ASM -DBSAES_ASM -DCMLL_ASM -DECP_NISTZ256_ASM -DGHASH_ASM -DKECCAK1600_ASM -DMD5_ASM -DOPENSSL_BN_ASM_GF2m -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_USE_APPLINK -DPADLOCK_ASM -DPOLY1305_ASM -DRC4_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DX25519_ASM -c /Focrypto\libcrypto-shlib-cversion.obj "crypto\cversion.c" cversion.c crypto\cversion.c(60): warning C4129: “V”: 不可识别的字符转义序列 crypto\cversion.c(60): warning C4129: “T”: 不可识别的字符转义序列 crypto\cversion.c(60): warning C4129: “M”: 不可识别的字符转义序列 crypto\cversion.c(60): warning C4129: “H”: 不可识别的字符转义序列 crypto\cversion.c(60): warning C4129: “c”: 不可识别的字符转义序列 crypto\cversion.c(60): error C2143: 语法错误: 缺少“;”(在“常数”的前面) crypto\cversion.c(60): error C2143: 语法错误: 缺少“;”(在“字符串”的前面) ```

Additional context

vcpkg.json ``` { "dependencies": [ "s2geometry" ] } ```
FrankXie05 commented 1 week ago

@geoyee Could you please check if there are any spaces in your VS installation path?

geoyee commented 6 days ago

@geoyee Could you please check if there are any spaces in your VS installation path?

Thanks for your reply, I will check it in the next few days.

geoyee commented 4 days ago

@geoyee Could you please check if there are any spaces in your VS installation path?

Thanks for your reply, I will check it in the next few days.

Yes, there's a space.

weathyII commented 2 days ago

@geoyee Could you please check if there are any spaces in your VS installation path?请检查一下你的VS安装路径是否有空格?

You're right

FrankXie05 commented 20 hours ago

Please remove the spaces and try again.