Linking error on Windows 10 (X86, 32bit build) for libunwind

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Linking error on Windows 10 (X86, 32bit build) for libunwind

Hubert Tong via cfe-dev
Hi.

I have configured libunwind:

>cmake -G Ninja -DLLVM_PATH="C:/Users/clang/llvm-project-10.0.1/llvm" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="C:\Users\clang\libunwind_llvm" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ../libunwind
-- The C compiler identification is Clang 10.0.0 with GNU-like command-line
-- The CXX compiler identification is Clang 10.0.0 with GNU-like command-line
-- Check for working C compiler: C:/Program Files/LLVM/bin/clang.exe
-- Check for working C compiler: C:/Program Files/LLVM/bin/clang.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files/LLVM/bin/clang++.exe
-- Check for working CXX compiler: C:/Program Files/LLVM/bin/clang++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test C_SUPPORTS_WERROR_DATE_TIME
-- Performing Test C_SUPPORTS_WERROR_DATE_TIME - Success
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME - Success
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Success
-- Performing Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
-- Performing Test CXX_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Success
-- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG
-- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG - Success
-- Performing Test C_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG
-- Performing Test C_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG - Success
-- Performing Test CXX_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG
-- Performing Test CXX_SUPPORTS_IMPLICIT_FALLTHROUGH_FLAG - Success
-- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
-- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Success
-- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
-- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Success
-- Performing Test CXX_SUPPORTS_CLASS_MEMACCESS_FLAG
-- Performing Test CXX_SUPPORTS_CLASS_MEMACCESS_FLAG - Failed
-- Performing Test CXX_SUPPORTS_NOEXCEPT_TYPE_FLAG
-- Performing Test CXX_SUPPORTS_NOEXCEPT_TYPE_FLAG - Success
-- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG
-- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Success
-- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG
-- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Success
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP - Success
-- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG
-- Performing Test C_SUPPORTS_STRING_CONVERSION_FLAG - Success
-- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG
-- Performing Test CXX_SUPPORTS_STRING_CONVERSION_FLAG - Success
-- Looking for os_signpost_interval_begin
-- Looking for os_signpost_interval_begin - not found
-- Looking for fopen in c
-- Looking for fopen in c - not found
-- Looking for __gcc_personality_v0 in gcc_s
-- Looking for __gcc_personality_v0 in gcc_s - not found
-- Looking for __absvdi2 in gcc
-- Looking for __absvdi2 in gcc - not found
-- Performing Test LIBUNWIND_HAS_NODEFAULTLIBS_FLAG
-- Performing Test LIBUNWIND_HAS_NODEFAULTLIBS_FLAG - Success
-- Performing Test LIBUNWIND_HAS_COMMENT_LIB_PRAGMA
-- Performing Test LIBUNWIND_HAS_COMMENT_LIB_PRAGMA - Failed
-- Performing Test LIBUNWIND_HAS_NOSTDINCXX_FLAG
-- Performing Test LIBUNWIND_HAS_NOSTDINCXX_FLAG - Success
-- Looking for __arm__
-- Looking for __arm__ - not found
-- Looking for __USING_SJLJ_EXCEPTIONS__
-- Looking for __USING_SJLJ_EXCEPTIONS__ - not found
-- Looking for __ARM_DWARF_EH__
-- Looking for __ARM_DWARF_EH__ - not found
-- Looking for dladdr in dl
-- Looking for dladdr in dl - not found
-- Looking for pthread_once in pthread
-- Looking for pthread_once in pthread - not found
-- Performing Test LIBUNWIND_SUPPORTS_WERROR_EQ_RETURN_TYPE_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_WERROR_EQ_RETURN_TYPE_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_W_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_W_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_WALL_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_WALL_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_WCHAR_SUBSCRIPTS_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_WCHAR_SUBSCRIPTS_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_WCONVERSION_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_WCONVERSION_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_WMISMATCHED_TAGS_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_WMISMATCHED_TAGS_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_WMISSING_BRACES_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_WMISSING_BRACES_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_WNEWLINE_EOF_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_WNEWLINE_EOF_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_WNO_UNUSED_FUNCTION_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_WNO_UNUSED_FUNCTION_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_WSHADOW_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_WSHADOW_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_WSHORTEN_64_TO_32_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_WSHORTEN_64_TO_32_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_WSIGN_COMPARE_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_WSIGN_COMPARE_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_WSIGN_CONVERSION_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_WSIGN_CONVERSION_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_WSTRICT_ALIASING_EQ_2_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_WSTRICT_ALIASING_EQ_2_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_WSTRICT_OVERFLOW_EQ_4_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_WSTRICT_OVERFLOW_EQ_4_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_WUNUSED_PARAMETER_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_WUNUSED_PARAMETER_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_WUNUSED_VARIABLE_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_WUNUSED_VARIABLE_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_WWRITE_STRINGS_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_WWRITE_STRINGS_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_WUNDEF_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_WUNDEF_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_WNO_ERROR_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_WNO_ERROR_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_WX_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_WX_FLAG - Failed
-- Performing Test LIBUNWIND_SUPPORTS_PEDANTIC_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_PEDANTIC_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_FSTRICT_ALIASING_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_FSTRICT_ALIASING_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_EHSC_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_EHSC_FLAG - Failed
-- Performing Test LIBUNWIND_SUPPORTS_FUNWIND_TABLES_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_FUNWIND_TABLES_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_FNO_EXCEPTIONS_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_FNO_EXCEPTIONS_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_FNO_RTTI_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_FNO_RTTI_FLAG - Success
-- Performing Test LIBUNWIND_SUPPORTS_NODEFAULTLIBS_FLAG
-- Performing Test LIBUNWIND_SUPPORTS_NODEFAULTLIBS_FLAG - Success
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/clang/libunwind2

Then I tried to build it:

>ninja -w dupbuild=warn
ninja: warning: multiple rules generate lib/unwind.lib. builds involving this target will not be correct; continuing anyway [-w dupbuild=warn]
[4/9] Building C object src/CMakeFiles/unwind_shared.dir/Unwind-sjlj.c.obj
In file included from C:/Users/clang/libunwind/src/Unwind-sjlj.c:19:
C:/Users/clang/libunwind/src/config.h:26:11: warning: keyword is hidden by macro definition [-Wkeyword-macro]
  #define static_assert(__b, __m) \
          ^
1 warning generated.
[5/9] Building C object src/CMakeFiles/unwind_shared.dir/UnwindLevel1.c.obj
In file included from C:/Users/clang/libunwind/src/UnwindLevel1.c:28:
C:/Users/clang/libunwind/src/config.h:26:11: warning: keyword is hidden by macro definition [-Wkeyword-macro]
  #define static_assert(__b, __m) \
          ^
C:/Users/clang/libunwind/src/UnwindLevel1.c:350:1: warning: redeclaration of '_Unwind_RaiseException' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_Unwind_RaiseException(_Unwind_Exception *exception_object) {
^
C:/Users/clang/libunwind/include\unwind.h:174:5: note: previous declaration is here
    _Unwind_RaiseException(_Unwind_Exception *exception_object);
    ^
C:/Users/clang/libunwind/src/UnwindLevel1.c:385:1: warning: redeclaration of '_Unwind_Resume' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_Unwind_Resume(_Unwind_Exception *exception_object) {
^
C:/Users/clang/libunwind/include\unwind.h:175:13: note: previous declaration is here
extern void _Unwind_Resume(_Unwind_Exception *exception_object);
            ^
C:/Users/clang/libunwind/src/UnwindLevel1.c:408:1: warning: redeclaration of '_Unwind_ForcedUnwind' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_Unwind_ForcedUnwind(_Unwind_Exception *exception_object,
^
C:/Users/clang/libunwind/include\unwind.h:277:5: note: previous declaration is here
    _Unwind_ForcedUnwind(_Unwind_Exception *exception_object,
    ^
C:/Users/clang/libunwind/src/UnwindLevel1.c:428:1: warning: redeclaration of '_Unwind_GetLanguageSpecificData' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_Unwind_GetLanguageSpecificData(struct _Unwind_Context *context) {
^
C:/Users/clang/libunwind/include\unwind.h:270:5: note: previous declaration is here
    _Unwind_GetLanguageSpecificData(struct _Unwind_Context *context);
    ^
C:/Users/clang/libunwind/src/UnwindLevel1.c:449:1: warning: redeclaration of '_Unwind_GetRegionStart' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_Unwind_GetRegionStart(struct _Unwind_Context *context) {
^
C:/Users/clang/libunwind/include\unwind.h:268:18: note: previous declaration is here
extern uintptr_t _Unwind_GetRegionStart(struct _Unwind_Context *context);
                 ^
C:/Users/clang/libunwind/src/UnwindLevel1.c:465:1: warning: redeclaration of '_Unwind_DeleteException' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_Unwind_DeleteException(_Unwind_Exception *exception_object) {
^
C:/Users/clang/libunwind/include\unwind.h:177:13: note: previous declaration is here
extern void _Unwind_DeleteException(_Unwind_Exception *exception_object);
            ^
C:/Users/clang/libunwind/src/UnwindLevel1.c:475:1: warning: redeclaration of '_Unwind_GetGR' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_Unwind_GetGR(struct _Unwind_Context *context, int index) {
^
C:/Users/clang/libunwind/include\unwind.h:221:18: note: previous declaration is here
extern uintptr_t _Unwind_GetGR(struct _Unwind_Context *context, int index);
                 ^
C:/Users/clang/libunwind/src/UnwindLevel1.c:485:24: warning: redeclaration of '_Unwind_SetGR' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_EXPORT void _Unwind_SetGR(struct _Unwind_Context *context, int index,
                       ^
C:/Users/clang/libunwind/include\unwind.h:222:13: note: previous declaration is here
extern void _Unwind_SetGR(struct _Unwind_Context *context, int index,
            ^
C:/Users/clang/libunwind/src/UnwindLevel1.c:495:29: warning: redeclaration of '_Unwind_GetIP' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_EXPORT uintptr_t _Unwind_GetIP(struct _Unwind_Context *context) {
                            ^
C:/Users/clang/libunwind/include\unwind.h:224:18: note: previous declaration is here
extern uintptr_t _Unwind_GetIP(struct _Unwind_Context *context);
                 ^
C:/Users/clang/libunwind/src/UnwindLevel1.c:507:24: warning: redeclaration of '_Unwind_SetIP' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_EXPORT void _Unwind_SetIP(struct _Unwind_Context *context,
                       ^
C:/Users/clang/libunwind/include\unwind.h:225:13: note: previous declaration is here
extern void _Unwind_SetIP(struct _Unwind_Context *, uintptr_t new_value);
            ^
11 warnings generated.
[6/9] Building C object src/CMakeFiles/unwind_shared.dir/UnwindLevel1-gcc-ext.c.obj
In file included from C:/Users/clang/libunwind/src/UnwindLevel1-gcc-ext.c:19:
C:/Users/clang/libunwind/src/config.h:26:11: warning: keyword is hidden by macro definition [-Wkeyword-macro]
  #define static_assert(__b, __m) \
          ^
C:/Users/clang/libunwind/src/UnwindLevel1-gcc-ext.c:33:1: warning: redeclaration of '_Unwind_Resume_or_Rethrow' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_Unwind_Resume_or_Rethrow(_Unwind_Exception *exception_object) {
^
C:/Users/clang/libunwind/include\unwind.h:299:5: note: previous declaration is here
    _Unwind_Resume_or_Rethrow(_Unwind_Exception *exception_object);
    ^
C:/Users/clang/libunwind/src/UnwindLevel1-gcc-ext.c:70:1: warning: redeclaration of '_Unwind_GetDataRelBase' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_Unwind_GetDataRelBase(struct _Unwind_Context *context) {
^
C:/Users/clang/libunwind/include\unwind.h:356:18: note: previous declaration is here
extern uintptr_t _Unwind_GetDataRelBase(struct _Unwind_Context *context)
                 ^
C:/Users/clang/libunwind/src/UnwindLevel1-gcc-ext.c:80:1: warning: redeclaration of '_Unwind_GetTextRelBase' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_Unwind_GetTextRelBase(struct _Unwind_Context *context) {
^
C:/Users/clang/libunwind/include\unwind.h:358:18: note: previous declaration is here
extern uintptr_t _Unwind_GetTextRelBase(struct _Unwind_Context *context)
                 ^
C:/Users/clang/libunwind/src/UnwindLevel1-gcc-ext.c:89:25: warning: redeclaration of '_Unwind_FindEnclosingFunction' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_EXPORT void *_Unwind_FindEnclosingFunction(void *pc) {
                        ^
C:/Users/clang/libunwind/include\unwind.h:352:14: note: previous declaration is here
extern void *_Unwind_FindEnclosingFunction(void *pc);
             ^
C:/Users/clang/libunwind/src/UnwindLevel1-gcc-ext.c:108:1: warning: redeclaration of '_Unwind_Backtrace' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_Unwind_Backtrace(_Unwind_Trace_Fn callback, void *ref) {
^
C:/Users/clang/libunwind/include\unwind.h:307:28: note: previous declaration is here
extern _Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn, void *);
                           ^
C:/Users/clang/libunwind/src/UnwindLevel1-gcc-ext.c:187:31: warning: redeclaration of '_Unwind_Find_FDE' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_EXPORT const void *_Unwind_Find_FDE(const void *pc,
                              ^
C:/Users/clang/libunwind/include\unwind.h:344:20: note: previous declaration is here
extern const void *_Unwind_Find_FDE(const void *pc, struct dwarf_eh_bases *);
                   ^
C:/Users/clang/libunwind/src/UnwindLevel1-gcc-ext.c:208:29: warning: redeclaration of '_Unwind_GetCFA' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_EXPORT uintptr_t _Unwind_GetCFA(struct _Unwind_Context *context) {
                            ^
C:/Users/clang/libunwind/include\unwind.h:312:18: note: previous declaration is here
extern uintptr_t _Unwind_GetCFA(struct _Unwind_Context *);
                 ^
C:/Users/clang/libunwind/src/UnwindLevel1-gcc-ext.c:221:29: warning: redeclaration of '_Unwind_GetIPInfo' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_EXPORT uintptr_t _Unwind_GetIPInfo(struct _Unwind_Context *context,
                            ^
C:/Users/clang/libunwind/include\unwind.h:321:18: note: previous declaration is here
extern uintptr_t _Unwind_GetIPInfo(struct _Unwind_Context *context,
                 ^
C:/Users/clang/libunwind/src/UnwindLevel1-gcc-ext.c:241:24: warning: redeclaration of '__register_frame' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_EXPORT void __register_frame(const void *fde) {
                       ^
C:/Users/clang/libunwind/include\unwind.h:331:13: note: previous declaration is here
extern void __register_frame(const void *fde);
            ^
C:/Users/clang/libunwind/src/UnwindLevel1-gcc-ext.c:251:24: warning: redeclaration of '__deregister_frame' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_EXPORT void __deregister_frame(const void *fde) {
                       ^
C:/Users/clang/libunwind/include\unwind.h:332:13: note: previous declaration is here
extern void __deregister_frame(const void *fde);
            ^
C:/Users/clang/libunwind/src/UnwindLevel1-gcc-ext.c:266:24: warning: redeclaration of '__register_frame_info_bases' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_EXPORT void __register_frame_info_bases(const void *fde, void *ob,
                       ^
C:/Users/clang/libunwind/include\unwind.h:364:13: note: previous declaration is here
extern void __register_frame_info_bases(const void *fde, void *ob, void *tb,
            ^
C:/Users/clang/libunwind/src/UnwindLevel1-gcc-ext.c:277:24: warning: redeclaration of '__register_frame_info' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_EXPORT void __register_frame_info(const void *fde, void *ob) {
                       ^
C:/Users/clang/libunwind/include\unwind.h:366:13: note: previous declaration is here
extern void __register_frame_info(const void *fde, void *ob)
            ^
C:/Users/clang/libunwind/src/UnwindLevel1-gcc-ext.c:284:24: warning: redeclaration of '__register_frame_info_table_bases' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_EXPORT void __register_frame_info_table_bases(const void *fde,
                       ^
C:/Users/clang/libunwind/include\unwind.h:368:13: note: previous declaration is here
extern void __register_frame_info_table_bases(const void *fde, void *ob,
            ^
C:/Users/clang/libunwind/src/UnwindLevel1-gcc-ext.c:296:24: warning: redeclaration of '__register_frame_info_table' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_EXPORT void __register_frame_info_table(const void *fde, void *ob) {
                       ^
C:/Users/clang/libunwind/include\unwind.h:371:13: note: previous declaration is here
extern void __register_frame_info_table(const void *fde, void *ob)
            ^
C:/Users/clang/libunwind/src/UnwindLevel1-gcc-ext.c:303:24: warning: redeclaration of '__register_frame_table' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_EXPORT void __register_frame_table(const void *fde) {
                       ^
C:/Users/clang/libunwind/include\unwind.h:373:13: note: previous declaration is here
extern void __register_frame_table(const void *fde)
            ^
C:/Users/clang/libunwind/src/UnwindLevel1-gcc-ext.c:309:25: warning: redeclaration of '__deregister_frame_info' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_EXPORT void *__deregister_frame_info(const void *fde) {
                        ^
C:/Users/clang/libunwind/include\unwind.h:375:14: note: previous declaration is here
extern void *__deregister_frame_info(const void *fde)
             ^
C:/Users/clang/libunwind/src/UnwindLevel1-gcc-ext.c:316:25: warning: redeclaration of '__deregister_frame_info_bases' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_EXPORT void *__deregister_frame_info_bases(const void *fde) {
                        ^
C:/Users/clang/libunwind/include\unwind.h:377:14: note: previous declaration is here
extern void *__deregister_frame_info_bases(const void *fde)
             ^
18 warnings generated.
[8/9] Building CXX object src/CMakeFiles/unwind_shared.dir/libunwind.cpp.obj
In file included from C:/Users/clang/libunwind/src/libunwind.cpp:22:
In file included from C:/Users/clang/libunwind/src/UnwindCursor.hpp:67:
In file included from C:/Users/clang/libunwind/src/CompactUnwinder.hpp:19:
C:/Users/clang/libunwind/include\mach-o/compact_unwind_encoding.h:45:5: warning: enumerator value is not representable in the underlying type 'int' [-Wmicrosoft-enum-value]
    UNWIND_IS_NOT_FUNCTION_START           = 0x80000000,
    ^
C:/Users/clang/libunwind/src/libunwind.cpp:29:36: warning: redeclaration of 'unw_local_addr_space' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_EXPORT unw_addr_space_t unw_local_addr_space =
                                   ^
C:/Users/clang/libunwind/include\libunwind.h:125:25: note: previous declaration is here
extern unw_addr_space_t unw_local_addr_space;
                        ^
C:/Users/clang/libunwind/src/libunwind.cpp:76:41: warning: redeclaration of 'unw_init_local' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_WEAK_ALIAS(__unw_init_local, unw_init_local)
                                        ^
C:/Users/clang/libunwind/include\libunwind.h:104:12: note: previous declaration is here
extern int unw_init_local(unw_cursor_t *, unw_context_t *) LIBUNWIND_AVAIL;
           ^
C:/Users/clang/libunwind/src/libunwind.cpp:91:38: warning: redeclaration of 'unw_get_reg' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_WEAK_ALIAS(__unw_get_reg, unw_get_reg)
                                     ^
C:/Users/clang/libunwind/include\libunwind.h:106:12: note: previous declaration is here
extern int unw_get_reg(unw_cursor_t *, unw_regnum_t, unw_word_t *) LIBUNWIND_AVAIL;
           ^
C:/Users/clang/libunwind/src/libunwind.cpp:123:38: warning: redeclaration of 'unw_set_reg' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_WEAK_ALIAS(__unw_set_reg, unw_set_reg)
                                     ^
C:/Users/clang/libunwind/include\libunwind.h:108:12: note: previous declaration is here
extern int unw_set_reg(unw_cursor_t *, unw_regnum_t, unw_word_t) LIBUNWIND_AVAIL;
           ^
C:/Users/clang/libunwind/src/libunwind.cpp:138:40: warning: redeclaration of 'unw_get_fpreg' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_WEAK_ALIAS(__unw_get_fpreg, unw_get_fpreg)
                                       ^
C:/Users/clang/libunwind/include\libunwind.h:107:12: note: previous declaration is here
extern int unw_get_fpreg(unw_cursor_t *, unw_regnum_t, unw_fpreg_t *) LIBUNWIND_AVAIL;
           ^
C:/Users/clang/libunwind/src/libunwind.cpp:157:40: warning: redeclaration of 'unw_set_fpreg' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_WEAK_ALIAS(__unw_set_fpreg, unw_set_fpreg)
                                       ^
C:/Users/clang/libunwind/include\libunwind.h:109:12: note: previous declaration is here
extern int unw_set_fpreg(unw_cursor_t *, unw_regnum_t, unw_fpreg_t)  LIBUNWIND_AVAIL;
           ^
C:/Users/clang/libunwind/src/libunwind.cpp:165:35: warning: redeclaration of 'unw_step' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_WEAK_ALIAS(__unw_step, unw_step)
                                  ^
C:/Users/clang/libunwind/include\libunwind.h:105:12: note: previous declaration is here
extern int unw_step(unw_cursor_t *) LIBUNWIND_AVAIL;
           ^
C:/Users/clang/libunwind/src/libunwind.cpp:178:44: warning: redeclaration of 'unw_get_proc_info' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_WEAK_ALIAS(__unw_get_proc_info, unw_get_proc_info)
                                           ^
C:/Users/clang/libunwind/include\libunwind.h:119:12: note: previous declaration is here
extern int unw_get_proc_info(unw_cursor_t *, unw_proc_info_t *) LIBUNWIND_AVAIL;
           ^
C:/Users/clang/libunwind/src/libunwind.cpp:187:37: warning: redeclaration of 'unw_resume' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_WEAK_ALIAS(__unw_resume, unw_resume)
                                    ^
C:/Users/clang/libunwind/include\libunwind.h:110:12: note: previous declaration is here
extern int unw_resume(unw_cursor_t *) LIBUNWIND_AVAIL;
           ^
C:/Users/clang/libunwind/src/libunwind.cpp:200:44: warning: redeclaration of 'unw_get_proc_name' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_WEAK_ALIAS(__unw_get_proc_name, unw_get_proc_name)
                                           ^
C:/Users/clang/libunwind/include\libunwind.h:122:12: note: previous declaration is here
extern int unw_get_proc_name(unw_cursor_t *, char *, size_t, unw_word_t *) LIBUNWIND_AVAIL;
           ^
C:/Users/clang/libunwind/src/libunwind.cpp:210:39: warning: redeclaration of 'unw_is_fpreg' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_WEAK_ALIAS(__unw_is_fpreg, unw_is_fpreg)
                                      ^
C:/Users/clang/libunwind/include\libunwind.h:120:12: note: previous declaration is here
extern int unw_is_fpreg(unw_cursor_t *, unw_regnum_t) LIBUNWIND_AVAIL;
           ^
C:/Users/clang/libunwind/src/libunwind.cpp:220:38: warning: redeclaration of 'unw_regname' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_WEAK_ALIAS(__unw_regname, unw_regname)
                                     ^
C:/Users/clang/libunwind/include\libunwind.h:118:20: note: previous declaration is here
extern const char *unw_regname(unw_cursor_t *, unw_regnum_t) LIBUNWIND_AVAIL;
                   ^
C:/Users/clang/libunwind/src/libunwind.cpp:229:46: warning: redeclaration of 'unw_is_signal_frame' should not add 'dllexport' attribute [-Wdll-attribute-on-redeclaration]
_LIBUNWIND_WEAK_ALIAS(__unw_is_signal_frame, unw_is_signal_frame)
                                             ^
C:/Users/clang/libunwind/include\libunwind.h:121:12: note: previous declaration is here
extern int unw_is_signal_frame(unw_cursor_t *) LIBUNWIND_AVAIL;
           ^
C:/Users/clang/libunwind/src/libunwind.cpp:293:12: warning: 'getenv' is deprecated: This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
    log = (getenv("LIBUNWIND_PRINT_APIS") != NULL);
           ^
C:\Program Files\Windows Kits\10\include\10.0.18362.0\ucrt\stdlib.h:1190:20: note: 'getenv' has been explicitly marked deprecated here
    _Check_return_ _CRT_INSECURE_DEPRECATE(_dupenv_s)
                   ^
C:\Program Files\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.27.29109\include\vcruntime.h:320:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.27.29109\include\vcruntime.h:310:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
C:/Users/clang/libunwind/src/libunwind.cpp:305:12: warning: 'getenv' is deprecated: This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
    log = (getenv("LIBUNWIND_PRINT_UNWINDING") != NULL);
           ^
C:\Program Files\Windows Kits\10\include\10.0.18362.0\ucrt\stdlib.h:1190:20: note: 'getenv' has been explicitly marked deprecated here
    _Check_return_ _CRT_INSECURE_DEPRECATE(_dupenv_s)
                   ^
C:\Program Files\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.27.29109\include\vcruntime.h:320:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.27.29109\include\vcruntime.h:310:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
C:/Users/clang/libunwind/src/libunwind.cpp:317:12: warning: 'getenv' is deprecated: This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
    log = (getenv("LIBUNWIND_PRINT_DWARF") != NULL);
           ^
C:\Program Files\Windows Kits\10\include\10.0.18362.0\ucrt\stdlib.h:1190:20: note: 'getenv' has been explicitly marked deprecated here
    _Check_return_ _CRT_INSECURE_DEPRECATE(_dupenv_s)
                   ^
C:\Program Files\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.27.29109\include\vcruntime.h:320:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.27.29109\include\vcruntime.h:310:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
17 warnings generated.
[9/9] Linking C shared library lib\unwind.dll
FAILED: lib/unwind.dll lib/unwind.lib
cmd.exe /C "cd . && C:\PROGRA~1\LLVM\bin\clang.exe -nostartfiles -nostdlib  -Werror=date-time -Werror=unguarded-availability-new -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wdelete-non-virtual-dtor -Wstring-conversion -O3 -DNDEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrt  -nodefaultlibs -shared -o lib\unwind.dll  -Xlinker /implib:lib\unwind.lib -Xlinker /pdb:lib\unwind.pdb -Xlinker /version:1.0 src/CMakeFiles/unwind_shared.dir/libunwind.cpp.obj src/CMakeFiles/unwind_shared.dir/Unwind-EHABI.cpp.obj src/CMakeFiles/unwind_shared.dir/Unwind-seh.cpp.obj src/CMakeFiles/unwind_shared.dir/UnwindLevel1.c.obj src/CMakeFiles/unwind_shared.dir/UnwindLevel1-gcc-ext.c.obj src/CMakeFiles/unwind_shared.dir/Unwind-sjlj.c.obj src/CMakeFiles/unwind_shared.dir/UnwindRegistersRestore.S.obj src/CMakeFiles/unwind_shared.dir/UnwindRegistersSave.S.obj  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -loldnames && cd ."
   Creating library lib\unwind.lib and object lib\unwind.exp
libunwind.cpp.obj :
error LNK2019: unresolved external symbol "public: void __thiscall libunwind::Registers_x86::jumpto(void)" (?jumpto@Registers_x86@libunwind@@QAEXXZ) referenced in function "public: virtual void __thiscall libunwind::UnwindCursor<class libunwind::LocalAddressSpace,class libunwind::Registers_x86>::jumpto(void)" (?jumpto@?$UnwindCursor@VLocalAddressSpace@libunwind@@VRegisters_x86@2@@libunwind@@UAEXXZ)
lib\unwind.dll : fatal error LNK1120: 1 unresolved externals
clang: error: linker command failed with exit code 1120 (use -v to see invocation)
ninja: build stopped: subcommand failed.

So there were some linking issues.
Some assistance would be much appreciated.

Microsoft's linker has it's version 14.27.29109.0 (VS 2019).
Clang's version is clang version 10.0.0 (Target: i686-pc-windows-msvc)
Ninja's version is 1.10.0.git.kitware.jobserver-1

Ivan



_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev