microsoft / vcpkg

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

[icu] Build error on windows with ASAN #29132

Open krawq opened 1 year ago

krawq commented 1 year ago

Host Environment

To Reproduce

Steps to reproduce the behavior:

Custom triplet ( = x64-windows with just the last two lines to activate asan for DEBUG build)

set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_C_FLAGS_DEBUG "/fsanitize=address")
set(VCPKG_CXX_FLAGS_DEBUG "/fsanitize=address")

./vcpkg install icu:x64-windows-asan

Failure logs

End of build-x64-windows-asan-dbg-out.log:

LINK : warning LNK4044: unrecognized option '/luser32'; ignored LINK : warning LNK4044: unrecognized option '/lgdi32'; ignored LINK : warning LNK4044: unrecognized option '/lwinspool'; ignored LINK : warning LNK4044: unrecognized option '/lshell32'; ignored LINK : warning LNK4044: unrecognized option '/lole32'; ignored LINK : warning LNK4044: unrecognized option '/loleaut32'; ignored LINK : warning LNK4044: unrecognized option '/lcomdlg32'; ignored LINK : warning LNK4044: unrecognized option '/ladvapi32'; ignored LINK : fatal error LNK1171: unable to load mspdbcore.dll (error code: 1455)

Command line was : Makefile:142: update target 'icudtd72.dll' due to: stubdata.o LINK.EXE -DLL -Xlinker -Xlinker -Xlinker -LC:/Users/blabla/source/vcpkg/installed/x64-windows-asan/debug/lib -Xlinker -Xlinker -Xlinker -machine:x64 -Xlinker -Xlinker -Xlinker -nologo -Xlinker -Xlinker -Xlinker -debug -Xlinker -Xlinker -Xlinker -INCREMENTAL -nologo -NOENTRY -IMPLIB:icudtd.lib -out:icudtd72.dll stubdata.o -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -lcomdlg32 -ladvapi32

Note: No issue with x64-windows or x64-windows-static triplet - Note icu is part of Qt port (qtbase)

Cheney-W commented 1 year ago

Missing ASAN_SYMBOLIZER_PATH=$(VC_ExecutablePath_x64)

krawq commented 1 year ago

This lead to following error now after setting the SYMBOLIZER_PATH env variable:

clang_rt.asan_dynamic_runtime_thunk-x86_64.lib(asan_win_dynamic_runtime_thunk.cpp.obj) : error LNK2019: unresolved external symbol _initterm referenced in function "void __cdecl `anonymous namespace'::UnregisterGlobals(void)" (?UnregisterGlobals@?A0x4b29b58b@@YAXXZ)
MSVCRT.lib(utility.obj) : error LNK2019: unresolved external symbol __vcrt_initialize referenced in function __scrt_initialize_crt
MSVCRT.lib(utility.obj) : error LNK2019: unresolved external symbol __vcrt_uninitialize referenced in function __scrt_initialize_crt
MSVCRT.lib(utility.obj) : error LNK2019: unresolved external symbol __vcrt_uninitialize_critical referenced in function __scrt_dllmain_uninitialize_critical
MSVCRT.lib(utility.obj) : error LNK2019: unresolved external symbol __vcrt_thread_attach referenced in function __scrt_dllmain_crt_thread_attach
MSVCRT.lib(utility.obj) : error LNK2019: unresolved external symbol __vcrt_thread_detach referenced in function __scrt_dllmain_crt_thread_attach
MSVCRT.lib(utility.obj) : error LNK2019: unresolved external symbol _seh_filter_dll referenced in function __scrt_dllmain_exception_filter
MSVCRT.lib(utility.obj) : error LNK2019: unresolved external symbol _is_c_termination_complete referenced in function __scrt_dllmain_uninitialize_c
MSVCRT.lib(utility.obj) : error LNK2019: unresolved external symbol _configure_narrow_argv referenced in function "public: static int __cdecl __scrt_narrow_argv_policy::configure_argv(void)" (?configure_argv@__scrt_narrow_argv_policy@@SAHXZ)
MSVCRT.lib(utility.obj) : error LNK2019: unresolved external symbol _initialize_narrow_environment referenced in function "public: static int __cdecl __scrt_narrow_environment_policy::initialize_environment(void)" (?initialize_environment@__scrt_narrow_environment_policy@@SAHXZ)
MSVCRT.lib(utility.obj) : error LNK2019: unresolved external symbol _initialize_onexit_table referenced in function __scrt_initialize_onexit_tables
MSVCRT.lib(utility.obj) : error LNK2019: unresolved external symbol _register_onexit_function referenced in function _onexit
MSVCRT.lib(utility.obj) : error LNK2019: unresolved external symbol _execute_onexit_table referenced in function __scrt_dllmain_uninitialize_c
MSVCRT.lib(utility.obj) : error LNK2019: unresolved external symbol _crt_atexit referenced in function _onexit
MSVCRT.lib(utility.obj) : error LNK2019: unresolved external symbol _crt_at_quick_exit referenced in function at_quick_exit
MSVCRT.lib(utility.obj) : error LNK2019: unresolved external symbol __acrt_initialize referenced in function __scrt_initialize_crt
MSVCRT.lib(utility.obj) : error LNK2019: unresolved external symbol __acrt_uninitialize referenced in function __scrt_uninitialize_crt
MSVCRT.lib(utility.obj) : error LNK2019: unresolved external symbol __acrt_uninitialize_critical referenced in function __scrt_dllmain_uninitialize_critical
MSVCRT.lib(utility.obj) : error LNK2019: unresolved external symbol __acrt_thread_attach referenced in function __scrt_dllmain_crt_thread_attach
MSVCRT.lib(utility.obj) : error LNK2019: unresolved external symbol __acrt_thread_detach referenced in function __scrt_dllmain_crt_thread_detach
MSVCRT.lib(utility.obj) : error LNK2019: unresolved external symbol _cexit referenced in function __scrt_dllmain_uninitialize_c
MSVCRT.lib(utility.obj) : error LNK2001: unresolved external symbol __C_specific_handler
VCASAN.lib(vcasan.obj) : error LNK2001: unresolved external symbol __C_specific_handler
MSVCRT.lib(utility_desktop.obj) : error LNK2019: unresolved external symbol __imp_RtlCaptureContext referenced in function __scrt_fastfail
MSVCRT.lib(gs_report.obj) : error LNK2001: unresolved external symbol __imp_RtlCaptureContext
MSVCRT.lib(utility_desktop.obj) : error LNK2019: unresolved external symbol __imp_RtlLookupFunctionEntry referenced in function __scrt_fastfail
MSVCRT.lib(gs_report.obj) : error LNK2001: unresolved external symbol __imp_RtlLookupFunctionEntry
MSVCRT.lib(utility_desktop.obj) : error LNK2019: unresolved external symbol __imp_RtlVirtualUnwind referenced in function __scrt_fastfail
MSVCRT.lib(gs_report.obj) : error LNK2001: unresolved external symbol __imp_RtlVirtualUnwind
MSVCRT.lib(utility_desktop.obj) : error LNK2019: unresolved external symbol __imp_IsDebuggerPresent referenced in function __scrt_fastfail
VCASAN.lib(vcasan.obj) : error LNK2001: unresolved external symbol __imp_IsDebuggerPresent
MSVCRT.lib(utility_desktop.obj) : error LNK2019: unresolved external symbol __imp_UnhandledExceptionFilter referenced in function __scrt_fastfail
MSVCRT.lib(gs_report.obj) : error LNK2001: unresolved external symbol __imp_UnhandledExceptionFilter
MSVCRT.lib(utility_desktop.obj) : error LNK2019: unresolved external symbol __imp_SetUnhandledExceptionFilter referenced in function __scrt_fastfail
MSVCRT.lib(gs_report.obj) : error LNK2001: unresolved external symbol __imp_SetUnhandledExceptionFilter
MSVCRT.lib(utility_desktop.obj) : error LNK2019: unresolved external symbol __imp_GetStartupInfoW referenced in function __scrt_get_show_window_mode
MSVCRT.lib(utility_desktop.obj) : error LNK2019: unresolved external symbol __imp_IsProcessorFeaturePresent referenced in function __scrt_fastfail
MSVCRT.lib(gs_report.obj) : error LNK2001: unresolved external symbol __imp_IsProcessorFeaturePresent
MSVCRT.lib(utility_desktop.obj) : error LNK2019: unresolved external symbol __imp_GetModuleHandleW referenced in function __scrt_is_managed_app
MSVCRT.lib(utility_desktop.obj) : error LNK2019: unresolved external symbol terminate referenced in function __scrt_unhandled_exception_filter
MSVCRT.lib(utility_desktop.obj) : error LNK2019: unresolved external symbol __current_exception referenced in function __scrt_unhandled_exception_filter
MSVCRT.lib(utility_desktop.obj) : error LNK2019: unresolved external symbol __current_exception_context referenced in function __scrt_unhandled_exception_filter
MSVCRT.lib(utility_desktop.obj) : error LNK2019: unresolved external symbol memset referenced in function __scrt_fastfail
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol strstr referenced in function "unsigned long __cdecl __vcasan::GetAsanShortMessageFromDescription(char const *,unsigned short * *)" (?GetAsanShortMessageFromDescription@__vcasan@@YAKPEBDPEAPEAG@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol wcsstr referenced in function "int __cdecl __vcasan::DumpThisThreadExceptionFilter(struct _EXCEPTION_POINTERS *,struct __vcasan::EXCEPTION_SANITIZER_ERROR * *,unsigned short const *,unsigned long &)" (?DumpThisThreadExceptionFilter@__vcasan@@YAHPEAU_EXCEPTION_POINTERS@@PEAPEAUEXCEPTION_SANITIZER_ERROR@1@PEBGAEAK@Z)
  Hint on symbols that are defined and could potentially match:
    "unsigned short * __cdecl wcsstr(unsigned short *,unsigned short const *)" (?wcsstr@@YAPEAGPEAGPEBG@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp_wcscpy_s referenced in function "int __cdecl __vcasan::DumpThisThreadExceptionFilter(struct _EXCEPTION_POINTERS *,struct __vcasan::EXCEPTION_SANITIZER_ERROR * *,unsigned short const *,unsigned long &)" (?DumpThisThreadExceptionFilter@__vcasan@@YAHPEAU_EXCEPTION_POINTERS@@PEAPEAUEXCEPTION_SANITIZER_ERROR@1@PEBGAEAK@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp_wcsncpy_s referenced in function "public: __cdecl __vcasan::EXCEPTION_SANITIZER_ERROR::EXCEPTION_SANITIZER_ERROR(char const *,char const *)" (??0EXCEPTION_SANITIZER_ERROR@__vcasan@@QEAA@PEBD0@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp_wcsnlen referenced in function "void __cdecl __vcasan::OnAsanReport(char const *,char const *,bool)" (?OnAsanReport@__vcasan@@YAXPEBD0_N@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp_strnlen referenced in function "public: __cdecl __vcasan::EXCEPTION_SANITIZER_ERROR::EXCEPTION_SANITIZER_ERROR(char const *,char const *)" (??0EXCEPTION_SANITIZER_ERROR@__vcasan@@QEAA@PEBD0@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp_GetEnvironmentVariableW referenced in function "class __crt_unique_heap_ptr<unsigned short,struct __crt_internal_free_policy> __cdecl __vcasan::GetEnvironmentVariableValue(unsigned short const *)" (?GetEnvironmentVariableValue@__vcasan@@YA?AV?$__crt_unique_heap_ptr@GU__crt_internal_free_policy@@@@PEBG@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp_CreateFileW referenced in function "int __cdecl __vcasan::DumpThisThreadExceptionFilter(struct _EXCEPTION_POINTERS *,struct __vcasan::EXCEPTION_SANITIZER_ERROR * *,unsigned short const *,unsigned long &)" (?DumpThisThreadExceptionFilter@__vcasan@@YAHPEAU_EXCEPTION_POINTERS@@PEAPEAUEXCEPTION_SANITIZER_ERROR@1@PEBGAEAK@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp_GetTempFileNameW referenced in function "int __cdecl __vcasan::DumpThisThreadExceptionFilter(struct _EXCEPTION_POINTERS *,struct __vcasan::EXCEPTION_SANITIZER_ERROR * *,unsigned short const *,unsigned long &)" (?DumpThisThreadExceptionFilter@__vcasan@@YAHPEAU_EXCEPTION_POINTERS@@PEAPEAUEXCEPTION_SANITIZER_ERROR@1@PEBGAEAK@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp_GetTempPathW referenced in function "int __cdecl __vcasan::DumpThisThreadExceptionFilter(struct _EXCEPTION_POINTERS *,struct __vcasan::EXCEPTION_SANITIZER_ERROR * *,unsigned short const *,unsigned long &)" (?DumpThisThreadExceptionFilter@__vcasan@@YAHPEAU_EXCEPTION_POINTERS@@PEAPEAUEXCEPTION_SANITIZER_ERROR@1@PEBGAEAK@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp_CloseHandle referenced in function "int __cdecl __vcasan::DumpThisThreadExceptionFilter(struct _EXCEPTION_POINTERS *,struct __vcasan::EXCEPTION_SANITIZER_ERROR * *,unsigned short const *,unsigned long &)" (?DumpThisThreadExceptionFilter@__vcasan@@YAHPEAU_EXCEPTION_POINTERS@@PEAPEAUEXCEPTION_SANITIZER_ERROR@1@PEBGAEAK@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp_RaiseException referenced in function "unsigned long __cdecl __vcasan::DumpThisThread(struct __vcasan::EXCEPTION_SANITIZER_ERROR * *,unsigned short const *)" (?DumpThisThread@__vcasan@@YAKPEAPEAUEXCEPTION_SANITIZER_ERROR@1@PEBG@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp_GetLastError referenced in function "int __cdecl __vcasan::DumpThisThreadExceptionFilter(struct _EXCEPTION_POINTERS *,struct __vcasan::EXCEPTION_SANITIZER_ERROR * *,unsigned short const *,unsigned long &)" (?DumpThisThreadExceptionFilter@__vcasan@@YAHPEAU_EXCEPTION_POINTERS@@PEAPEAUEXCEPTION_SANITIZER_ERROR@1@PEBGAEAK@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp_GetCurrentProcess referenced in function "int __cdecl __vcasan::DumpThisThreadExceptionFilter(struct _EXCEPTION_POINTERS *,struct __vcasan::EXCEPTION_SANITIZER_ERROR * *,unsigned short const *,unsigned long &)" (?DumpThisThreadExceptionFilter@__vcasan@@YAHPEAU_EXCEPTION_POINTERS@@PEAPEAUEXCEPTION_SANITIZER_ERROR@1@PEBGAEAK@Z)
MSVCRT.lib(gs_report.obj) : error LNK2001: unresolved external symbol __imp_GetCurrentProcess
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp_GetCurrentProcessId referenced in function "int __cdecl __vcasan::DumpThisThreadExceptionFilter(struct _EXCEPTION_POINTERS *,struct __vcasan::EXCEPTION_SANITIZER_ERROR * *,unsigned short const *,unsigned long &)" (?DumpThisThreadExceptionFilter@__vcasan@@YAHPEAU_EXCEPTION_POINTERS@@PEAPEAUEXCEPTION_SANITIZER_ERROR@1@PEBGAEAK@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp_TerminateProcess referenced in function "int __cdecl __vcasan::DumpThisThreadExceptionFilter(struct _EXCEPTION_POINTERS *,struct __vcasan::EXCEPTION_SANITIZER_ERROR * *,unsigned short const *,unsigned long &)" (?DumpThisThreadExceptionFilter@__vcasan@@YAHPEAU_EXCEPTION_POINTERS@@PEAPEAUEXCEPTION_SANITIZER_ERROR@1@PEBGAEAK@Z)
MSVCRT.lib(gs_report.obj) : error LNK2001: unresolved external symbol __imp_TerminateProcess
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp_GetCurrentThreadId referenced in function "int __cdecl __vcasan::DumpThisThreadExceptionFilter(struct _EXCEPTION_POINTERS *,struct __vcasan::EXCEPTION_SANITIZER_ERROR * *,unsigned short const *,unsigned long &)" (?DumpThisThreadExceptionFilter@__vcasan@@YAHPEAU_EXCEPTION_POINTERS@@PEAPEAUEXCEPTION_SANITIZER_ERROR@1@PEBGAEAK@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp_OpenProcess referenced in function "int __cdecl __vcasan::DumpThisThreadExceptionFilter(struct _EXCEPTION_POINTERS *,struct __vcasan::EXCEPTION_SANITIZER_ERROR * *,unsigned short const *,unsigned long &)" (?DumpThisThreadExceptionFilter@__vcasan@@YAHPEAU_EXCEPTION_POINTERS@@PEAPEAUEXCEPTION_SANITIZER_ERROR@1@PEBGAEAK@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp_FreeLibrary referenced in function "int __cdecl __vcasan::DumpThisThreadExceptionFilter(struct _EXCEPTION_POINTERS *,struct __vcasan::EXCEPTION_SANITIZER_ERROR * *,unsigned short const *,unsigned long &)" (?DumpThisThreadExceptionFilter@__vcasan@@YAHPEAU_EXCEPTION_POINTERS@@PEAPEAUEXCEPTION_SANITIZER_ERROR@1@PEBGAEAK@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp_GetProcAddress referenced in function "int __cdecl __vcasan::DumpThisThreadExceptionFilter(struct _EXCEPTION_POINTERS *,struct __vcasan::EXCEPTION_SANITIZER_ERROR * *,unsigned short const *,unsigned long &)" (?DumpThisThreadExceptionFilter@__vcasan@@YAHPEAU_EXCEPTION_POINTERS@@PEAPEAUEXCEPTION_SANITIZER_ERROR@1@PEBGAEAK@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp_LoadLibraryExW referenced in function "int __cdecl __vcasan::DumpThisThreadExceptionFilter(struct _EXCEPTION_POINTERS *,struct __vcasan::EXCEPTION_SANITIZER_ERROR * *,unsigned short const *,unsigned long &)" (?DumpThisThreadExceptionFilter@__vcasan@@YAHPEAU_EXCEPTION_POINTERS@@PEAPEAUEXCEPTION_SANITIZER_ERROR@1@PEBGAEAK@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp_MultiByteToWideChar referenced in function "public: __cdecl __vcasan::EXCEPTION_SANITIZER_ERROR::EXCEPTION_SANITIZER_ERROR(char const *,char const *)" (??0EXCEPTION_SANITIZER_ERROR@__vcasan@@QEAA@PEBD0@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp_calloc referenced in function "public: __cdecl __vcasan::EXCEPTION_SANITIZER_ERROR::EXCEPTION_SANITIZER_ERROR(char const *,char const *)" (??0EXCEPTION_SANITIZER_ERROR@__vcasan@@QEAA@PEBD0@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp_free referenced in function "public: void __cdecl __crt_internal_free_policy::operator()<unsigned short>(unsigned short const * const)const " (??$?RG@__crt_internal_free_policy@@QEBAXQEBG@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp_malloc referenced in function "class __crt_unique_heap_ptr<unsigned short,struct __crt_internal_free_policy> __cdecl __vcasan::GetEnvironmentVariableValue(unsigned short const *)" (?GetEnvironmentVariableValue@__vcasan@@YA?AV?$__crt_unique_heap_ptr@GU__crt_internal_free_policy@@@@PEBG@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol PssCaptureSnapshot referenced in function "int __cdecl __vcasan::DumpThisThreadExceptionFilter(struct _EXCEPTION_POINTERS *,struct __vcasan::EXCEPTION_SANITIZER_ERROR * *,unsigned short const *,unsigned long &)" (?DumpThisThreadExceptionFilter@__vcasan@@YAHPEAU_EXCEPTION_POINTERS@@PEAPEAUEXCEPTION_SANITIZER_ERROR@1@PEBGAEAK@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol PssFreeSnapshot referenced in function "int __cdecl __vcasan::DumpThisThreadExceptionFilter(struct _EXCEPTION_POINTERS *,struct __vcasan::EXCEPTION_SANITIZER_ERROR * *,unsigned short const *,unsigned long &)" (?DumpThisThreadExceptionFilter@__vcasan@@YAHPEAU_EXCEPTION_POINTERS@@PEAPEAUEXCEPTION_SANITIZER_ERROR@1@PEBGAEAK@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol PssQuerySnapshot referenced in function "int __cdecl __vcasan::DumpThisThreadExceptionFilter(struct _EXCEPTION_POINTERS *,struct __vcasan::EXCEPTION_SANITIZER_ERROR * *,unsigned short const *,unsigned long &)" (?DumpThisThreadExceptionFilter@__vcasan@@YAHPEAU_EXCEPTION_POINTERS@@PEAPEAUEXCEPTION_SANITIZER_ERROR@1@PEBGAEAK@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp___acrt_iob_func referenced in function "int __cdecl __vcasan::DumpThisThreadExceptionFilter(struct _EXCEPTION_POINTERS *,struct __vcasan::EXCEPTION_SANITIZER_ERROR * *,unsigned short const *,unsigned long &)" (?DumpThisThreadExceptionFilter@__vcasan@@YAHPEAU_EXCEPTION_POINTERS@@PEAPEAUEXCEPTION_SANITIZER_ERROR@1@PEBGAEAK@Z)
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol __imp___stdio_common_vfprintf referenced in function _vfprintf_l
VCASAN.lib(vcasan.obj) : error LNK2001: unresolved external symbol __CxxFrameHandler4
MSVCRT.lib(gshandlereh4.obj) : error LNK2001: unresolved external symbol __CxxFrameHandler4
VCASAN.lib(vcasan.obj) : error LNK2019: unresolved external symbol memcpy referenced in function "bool __cdecl __vcasan::VcAsanStrdup(unsigned short * *,unsigned short const *)" (?VcAsanStrdup@__vcasan@@YA_NPEAPEAGPEBG@Z)
icudt72.dll : fatal error LNK1120: 67 unresolved externals
github-actions[bot] commented 1 year ago

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

Neumann-A commented 1 year ago

One of the reason this happens because ICU builds an executable which will call the linker explicitly with hardcoded flags and those are not coming from vcpkg. I have the same problem with clang-cl and sanitizer settings. However I don't know exactly why crt runtime symbols are missing. (For now i would say to skip sanitizers for icu)

bansan85 commented 4 months ago

Same problem with openssl.

Building with static linkage solves the problem.

The readme says: It will only work when used with gcc or clang and should be used in conjunction with the no-shared option.

Maybe the issue should be renamed "Build error on Windows with ASAN and dynamic linkage" without package name in the title.

My triplet:

set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CXX_FLAGS "-fsanitize=address")
set(VCPKG_C_FLAGS "-fsanitize=address")