Fix debug builds of msquic targeting UWP.#4373
Open
BillyONeal wants to merge 2 commits intomicrosoft:mainfrom
Open
Fix debug builds of msquic targeting UWP.#4373BillyONeal wants to merge 2 commits intomicrosoft:mainfrom
BillyONeal wants to merge 2 commits intomicrosoft:mainfrom
Conversation
Resolves the following compiler errors after `vcpkg install ms-quic:x64-uwp`. These errors are due to being built with /RTC1, but being linked with a release CRT that doesn't have the RTC stubs necessary for that. ```console [61/62] C:\Windows\system32\cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_dll --intdir=src\bin\CMakeFiles\msquic.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests -- C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\link.exe CMakeFiles\MsQuicEtw_Resource.dir\inc\MsQuicEtw.rc.res src\bin\CMakeFiles\msquic.dir\winuser\dllmain.c.obj src\bin\CMakeFiles\msquic.dir\msquic.rc.res /out:bin\Debug\msquic.dll /implib:obj\Debug\msquic.lib /pdb:bin\Debug\msquic.pdb /dll /version:0.0 /MANIFEST:NO /NXCOMPAT /DYNAMICBASE /DEBUG /WINMD:NO /APPCONTAINER /SUBSYSTEM:CONSOLE /MANIFESTUAC:NO /nologo /debug /DEF:"D:/vcpkg2/buildtrees/ms-quic/x64-uwp-dbg/src/bin/msquic.def" /guard:cf /DYNAMICBASE obj\Debug\core.lib obj\Debug\platform.lib wbemuuid.lib winmm.lib _deps\opensslquic-build\openssl\debug\lib\libssl.lib _deps\opensslquic-build\openssl\debug\lib\libcrypto.lib OneCore.lib ws2_32.lib ntdll.lib && cd ." FAILED: bin/Debug/msquic.dll obj/Debug/msquic.lib C:\Windows\system32\cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_dll --intdir=src\bin\CMakeFiles\msquic.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests -- C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\link.exe CMakeFiles\MsQuicEtw_Resource.dir\inc\MsQuicEtw.rc.res src\bin\CMakeFiles\msquic.dir\winuser\dllmain.c.obj src\bin\CMakeFiles\msquic.dir\msquic.rc.res /out:bin\Debug\msquic.dll /implib:obj\Debug\msquic.lib /pdb:bin\Debug\msquic.pdb /dll /version:0.0 /MANIFEST:NO /NXCOMPAT /DYNAMICBASE /DEBUG /WINMD:NO /APPCONTAINER /SUBSYSTEM:CONSOLE /MANIFESTUAC:NO /nologo /debug /DEF:"D:/vcpkg2/buildtrees/ms-quic/x64-uwp-dbg/src/bin/msquic.def" /guard:cf /DYNAMICBASE obj\Debug\core.lib obj\Debug\platform.lib wbemuuid.lib winmm.lib _deps\opensslquic-build\openssl\debug\lib\libssl.lib _deps\opensslquic-build\openssl\debug\lib\libcrypto.lib OneCore.lib ws2_32.lib ntdll.lib && cd ." LINK: command "C:\PROGRA~1\MIB055~1\2022\ENTERP~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\link.exe CMakeFiles\MsQuicEtw_Resource.dir\inc\MsQuicEtw.rc.res src\bin\CMakeFiles\msquic.dir\winuser\dllmain.c.obj src\bin\CMakeFiles\msquic.dir\msquic.rc.res /out:bin\Debug\msquic.dll /implib:obj\Debug\msquic.lib /pdb:bin\Debug\msquic.pdb /dll /version:0.0 /MANIFEST:NO /NXCOMPAT /DYNAMICBASE /DEBUG /WINMD:NO /APPCONTAINER /SUBSYSTEM:CONSOLE /MANIFESTUAC:NO /nologo /debug /DEF:D:/vcpkg2/buildtrees/ms-quic/x64-uwp-dbg/src/bin/msquic.def /guard:cf /DYNAMICBASE obj\Debug\core.lib obj\Debug\platform.lib wbemuuid.lib winmm.lib _deps\opensslquic-build\openssl\debug\lib\libssl.lib _deps\opensslquic-build\openssl\debug\lib\libcrypto.lib OneCore.lib ws2_32.lib ntdll.lib" failed (exit code 1120) with the following output: LINK : warning LNK4075: ignoring '/MANIFESTUAC' due to '/MANIFEST:NO' specification Creating library obj\Debug\msquic.lib and object obj\Debug\msquic.exp platform.lib(datapath_raw_dummy.c.obj) : error LNK2001: unresolved external symbol _RTC_InitBase platform.lib(certificates_capi.c.obj) : error LNK2001: unresolved external symbol _RTC_InitBase platform.lib(pcp.c.obj) : error LNK2001: unresolved external symbol _RTC_InitBase platform.lib(cert_capi.c.obj) : error LNK2001: unresolved external symbol _RTC_InitBase platform.lib(hashtable.c.obj) : error LNK2001: unresolved external symbol _RTC_InitBase platform.lib(crypt.c.obj) : error LNK2001: unresolved external symbol _RTC_InitBase platform.lib(platform_worker.c.obj) : error LNK2001: unresolved external symbol _RTC_InitBase platform.lib(datapath_winuser.c.obj) : error LNK2001: unresolved external symbol _RTC_InitBase platform.lib(datapath_win.c.obj) : error LNK2001: unresolved external symbol _RTC_InitBase platform.lib(storage_winuser.c.obj) : error LNK2001: unresolved external symbol _RTC_InitBase platform.lib(crypt_openssl.c.obj) : error LNK2001: unresolved external symbol _RTC_InitBase platform.lib(tls_openssl.c.obj) : error LNK2001: unresolved external symbol _RTC_InitBase ```
BillyONeal
added a commit
to BillyONeal/vcpkg
that referenced
this pull request
Jun 24, 2024
Also fix uwp builds so that all ci.baseline.txt entries can be removed, submitted upstream as microsoft/msquic#4373 Originally started from microsoft#39475 Co-authored by: Lily Wang <v-lilywang@microsoft.com>
BillyONeal
added a commit
to BillyONeal/vcpkg
that referenced
this pull request
Jun 24, 2024
Also fix uwp builds so that all ci.baseline.txt entries can be removed, submitted upstream as microsoft/msquic#4373 Originally started from microsoft#39475 Co-authored by: Lily Wang <v-lilywang@microsoft.com>
nibanks
reviewed
Jun 24, 2024
| # We are using dynamic linking. Ensure that only the release version of CRT is used. | ||
| message(STATUS "Configuring for release version of dynamically linked CRT") | ||
| set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL") | ||
| # We are using dynamic linking. Ensure that only the dynamic CRT is used. |
Collaborator
There was a problem hiding this comment.
@csujedihy can you please take a look here? You're the one that added this code to link only release version.
Member
Author
There was a problem hiding this comment.
Note that you can always just only build the release DLL for redistribution :)
Collaborator
There was a problem hiding this comment.
cc @csujedihy can you take a quick look at this?
BillyONeal
added a commit
to microsoft/vcpkg
that referenced
this pull request
Jun 25, 2024
Also fix uwp builds so that all ci.baseline.txt entries can be removed, submitted upstream as microsoft/msquic#4373 Also fix x86-windows builds which incorrectly compared SYSTEM_PROCESSOR with 'win32' rather than 'x86'. Submitted upstream as microsoft/msquic#4374 . This patch originally authored by @LillyWangLL Originally started from #39475 Co-authored by: Lily Wang <v-lilywang@microsoft.com>
Contributor
|
Still an issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves the following compiler errors after
vcpkg install ms-quic:x64-uwp. These errors are due to being built with /RTC1, but being linked with a release CRT that doesn't have the RTC stubs necessary for that.