Closed zjljaycn closed 3 months ago
@zjljaycn Thanks for posting this issue, please download the English language pack of vs and use the English path.
Same errors as @zjljaycn. Here are my logs in English.
I have the same problem with a new, clean install of Visual Studio 2022 and vcpkg :(
crypto\cversion.c(60): warning C4129: 'V': unrecognized character escape sequence crypto\cversion.c(60): warning C4129: 'T': unrecognized character escape sequence crypto\cversion.c(60): warning C4129: 'M': unrecognized character escape sequence crypto\cversion.c(60): warning C4129: 'H': unrecognized character escape sequence crypto\cversion.c(60): warning C4129: 'c': unrecognized character escape sequence crypto\cversion.c(60): error C2143: syntax error: missing ';' before 'constant' crypto\cversion.c(60): error C2143: syntax error: missing ';' before 'string'
I have the same problem with a new, clean install of Visual Studio 2022 and vcpkg :(
crypto\cversion.c(60): warning C4129: 'V': unrecognized character escape sequence crypto\cversion.c(60): warning C4129: 'T': unrecognized character escape sequence crypto\cversion.c(60): warning C4129: 'M': unrecognized character escape sequence crypto\cversion.c(60): warning C4129: 'H': unrecognized character escape sequence crypto\cversion.c(60): warning C4129: 'c': unrecognized character escape sequence crypto\cversion.c(60): error C2143: syntax error: missing ';' before 'constant' crypto\cversion.c(60): error C2143: syntax error: missing ';' before 'string'
My problem hasn't been resolved yet, I'm not sure if it's due to spaces in the path
My problem hasn't been resolved yet, I'm not sure if it's due to spaces in the path
My problem hasn't been resolved yet, I'm not sure if it's due to spaces in the path
The problem is backslash ("\") characters followed by a letter being interpreted as an escape sequence (by what must be a program written to use POSIX paths). The question is what changed to make this a problem, because I have installed openssl successfully (on other computers) in the past.
------ Original Message ------ From "福仔" @.> To "microsoft/vcpkg" @.> Cc "ghesketh" @.>; "Manual" @.> Date 2024-03-05 20:52:56 Subject Re: [microsoft/vcpkg] [openssl] Build error on x64-windows (Issue #37134)
I have the same problem with a new, clean install of Visual Studio 2022 and vcpkg :(
crypto\cversion.c(60): warning C4129: 'V': unrecognized character escape sequence crypto\cversion.c(60): warning C4129: 'T': unrecognized character escape sequence crypto\cversion.c(60): warning C4129: 'M': unrecognized character escape sequence crypto\cversion.c(60): warning C4129: 'H': unrecognized character escape sequence crypto\cversion.c(60): warning C4129: 'c': unrecognized character escape sequence crypto\cversion.c(60): error C2143: syntax error: missing ';' before 'constant' crypto\cversion.c(60): error C2143: syntax error: missing ';' before 'string'
My problem hasn't been resolved yet, I'm not sure if it's due to spaces in the path
— Reply to this email directly, view it on GitHub https://github.com/microsoft/vcpkg/issues/37134#issuecomment-1979984960, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAK6DE6PTVDEHSUH75HDNITYW2AIRAVCNFSM6AAAAABEGTHC4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZZHE4DIOJWGA. You are receiving this because you are subscribed to this thread.Message ID: @.***>
???
Sorry, I seem to have pressed some buttons by mistake. 🤐
English path, English VS and the same problem. Perhaps some new changes in vcpkg are not compatible with those in openssl. Or maybe the problem is related to VS too.
However, it builds in vcpkg CI. Every day.
Did anyone look at crypto\cversion.c(60)
(in the patched sources)?
Can anyone check how the macro at the spot is passed through the layers in successful builds?
We have an interaction of cmake, msys, perl, command line interpreter, preprocessor. You have to check the transitions between these layers when it comes to properly dealing with escaped \
filepath separators in quoted strings on windows.
I think that perl or command line interpreter might be uncontrolled variables here.
However, it builds in vcpkg CI. Every day.
Did anyone look at
crypto\cversion.c(60)
(in the patched sources)? Can anyone check how the macro at the spot is passed through the layers in successful builds?We have an interaction of cmake, msys, perl, command line interpreter, preprocessor. You have to check the transitions between these layers when it comes to properly dealing with escaped
\
filepath separators in quoted strings on windows. I think that perl or command line interpreter might be uncontrolled variables here.
It seems pretty obvious that vcpkg CI is failing to predict real-world failures.
I just ran vpkg upgrade
without paying attention (my failure) and have now lost several packages that are critical for my work due to their dependency on openssl:
libhv:x64-windows-static: REMOVED: 12.1 ms
libpq:x64-windows-static: REMOVED: 118 ms
python3:x64-windows: REMOVED: 369 ms
openssl:x64-windows: REMOVED: 31.3 ms
openssl:x64-windows-static: REMOVED: 28.5 ms
openssl:x64-windows-static: BUILD_FAILED: 40 s
libhv:x64-windows-static: CASCADED_DUE_TO_MISSING_DEPENDENCIES: 193 us
libpq:x64-windows-static: CASCADED_DUE_TO_MISSING_DEPENDENCIES: 170 us
openssl:x64-windows: BUILD_FAILED: 43 s
python3:x64-windows: CASCADED_DUE_TO_MISSING_DEPENDENCIES: 347 us
vcpkg's openssl port is broken, and openssl (in my opinion) is in the top-tier of importance for the entire vcpkg ecosystem.
The following hack worked for me.
For x64-windows-static, for example:
move x64-windows-static x64-windows-static.old
vcpkg remove openssl:x64-windows-static
vcpkg install openssl:x64-windows-static
xcopy x64-windows-static\*.* x64-windows-static.old\
rd /s/q x64-windows-static
move x64-windows-static.old x64-windows-static
I cannot guarantee this will work for all cases, but it did for me.
It seems pretty obvious that vcpkg CI is failing to predict real-world failures.
CI is running in controlled environment, and real world is a jungle.
openssl:x64-windows-static: BUILD_FAILED: 40 s
So you ran into the crypto\cversion.c(60)
error (this issue)? Or some other error?
move x64-windows-static x64-windows-static.old
Which directory is that? Normally it doesn't exist where your run vcpkg install openssl:x64-windows-static
.
vcpkg remove openssl:x64-windows-static vcpkg install openssl:x64-windows-static
Might be helpful to know what else was installed if this makes a difference. Something like
vcpkg list x64-windows-static
So you ran into the
crypto\cversion.c(60)
error (this issue)? Or some other error?
Yes, it is the problem whose apparent trigger is confusion of backslash characters in the path to be introducing escape sequences.
Which directory is that? Normally it doesn't exist where your run
vcpkg install openssl:x64-windows-static
.
I was just moving the existing folder out of the way. The name of the .old
directory is not significant.
Might be helpful to know what else was installed if this makes a difference. Something like
I have 135 entries in my list. Maybe someone with a smaller list would be a better source -- but I can send you mine if you think it necessary.
Which directory is that? Normally it doesn't exist where your run
vcpkg install openssl:x64-windows-static
.I was just moving the existing folder out of the way. The name of the
.old
directory is not significant.
The point is: There is no <triplet>
dir in the vcpkg root folder.
Might be helpful to know what else was installed if this makes a difference. Something like
I have 135 entries in my list. Maybe someone with a smaller list would be a better source -- but I can send you mine if you think it necessary.
Well, it is one line per feature... I wouldn't complain if it comes as it is. I don't want to raise barriers. (I just can't promise that it is helpful at all. Given that you rotate directories which I don't expect to exist, it is just another perspective on the jungle, not on a controlled environment.)
Did anyone look at
crypto\cversion.c(60)
(in the patched sources)?
Nobody from those affected did, so let me help a little bit:
return PLATFORM;
https://github.com/openssl/openssl/blob/openssl-3.2.1/crypto/cversion.c#L60
Can anyone check how the macro at the spot is passed through the layers in successful builds?
The PLATFORM
macro. It is from the generate file buildtrees/<triplet>-dbg/buildinf.h
. Can anybody share this file if he is affected by the cversion.c:60
error?
And it is generated via
GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(LIB_CFLAGS) $(CPPFLAGS_Q)" "$(PLATFORM)"
https://github.com/openssl/openssl/blob/openssl-3.2.1/crypto/build.info#L118
It would be nice to trace the command's invocation. If quoting "$(CC) $(LIB_CFLAGS) $(CPPFLAGS_Q)"
goes wrong, filepaths with \
might slip into PLATFORM
.
The
PLATFORM
macro. It is from the generate filebuildtrees/<triplet>-dbg/buildinf.h
. Can anybody share this file if he is affected by thecversion.c:60
error?
I do not have a buildinf.h
file, but I was poking around and found this line in buildtrees\openssl\x64-windows-static-dbg\makefile:
CC="C:\Program Files\VisualStudio\VC\Tools\MSVC\14.39.33519\bin\Hostx64\x64\cl.exe"
... which best matches the complaints in my install-x64-windows-static-dbg-nmake-out.log
:
crypto\cversion.c(60): warning C4129: 'V': unrecognized character escape sequence
crypto\cversion.c(60): warning C4129: 'T': unrecognized character escape sequence
crypto\cversion.c(60): warning C4129: 'M': unrecognized character escape sequence
crypto\cversion.c(60): warning C4129: 'H': unrecognized character escape sequence
crypto\cversion.c(60): warning C4129: 'c': unrecognized character escape sequence
crypto\cversion.c(60): error C2143: syntax error: missing ';' before 'constant'
crypto\cversion.c(60): error C2143: syntax error: missing ';' before 'string'
crypto\cversion.c
has #include "buildinf.h"
, so it must exist as a generated file.
And yes, we are getting closer to confirming that
GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(LIB_CFLAGS) $(CPPFLAGS_Q)" "$(PLATFORM)"
is incorrectly splitting arguments on the space in the Program Files
sequence in some environments.
I guess the issue sufficiently explained with using COMSPEC=powershell
(user configuration), and passing the full compiler path in CC
(vcpkg port).
At least this is what I can simulate locally with jom
and stripped-down Makefile. (Sorry, still no Visual Studio.)
So the next step is wrapping the Windows build into env COMSPEC=cmd
.
(I found a invocation log of mkbuildinf.pl
in https://github.com/openssl/openssl/issues/11699. There you can see what is called and where the quotes are when CC=cl
).
Please test #37716.
I reinstalled Visual Studio. The original path had spaces, but now there are no more. The installation was successful
Thank you all, everyone
Package: openssl:x64-windows@3.2.1
Host Environment
To Reproduce
vcpkg install openssl:x64-windows
Failure logsI:\cppCode\vcpkg\buildtrees\openssl\install-x64-windows-dbg-nmake-err.log
``` cl: 命令行 warning D9025 :正在重写“/Zi”(用“/Z7”) NMAKE : fatal error U1077: ¡°"K:\Visual Studio\2022\VC\Tools\MSVC\14.38.33130\bin\Hostx64\x64\cl.exe" /Zi /Fdossl_static.pdb /Gs0 /GF /Gy /MDd -nologo -DWIN32 -D_WINDOWS -W3 -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=\"I:\\cppCode\\vcpkg\\packages\\openssl_x64-windows\\debug\"" -D"ENGINESDIR=\"I:\\cppCode\\vcpkg\\packages\\openssl_x64-windows\\debug\\lib\\engines-3\"" -D"MODULESDIR=\"I:\\cppCode\\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"¡±: ·µ»شú«¡°0x2¡± Stop. NMAKE : fatal error U1077: ¡°"K:\Visual Studio\2022\VC\Tools\MSVC\14.38.33130\bin\Hostx64\x64\nmake.exe" /LU _build_libs¡±: ·µ»شú«¡°0x2¡± Stop. ```I:\cppCode\vcpkg\buildtrees\openssl\install-x64-windows-dbg-nmake-out.log
``` "K:\Visual Studio\2022\VC\Tools\MSVC\14.38.33130\bin\Hostx64\x64\nmake.exe" /LU depend "K:\Visual Studio\2022\VC\Tools\MSVC\14.38.33130\bin\Hostx64\x64\nmake.exe" /LU _build_libs "K:\Visual Studio\2022\VC\Tools\MSVC\14.38.33130\bin\Hostx64\x64\cl.exe" /Zi /Fdossl_static.pdb /Gs0 /GF /Gy /MDd -nologo -DWIN32 -D_WINDOWS -W3 -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=\"I:\\cppCode\\vcpkg\\packages\\openssl_x64-windows\\debug\"" -D"ENGINESDIR=\"I:\\cppCode\\vcpkg\\packages\\openssl_x64-windows\\debug\\lib\\engines-3\"" -D"MODULESDIR=\"I:\\cppCode\\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: 语法错误: 缺少“;”(在“字符串”的前面) ```