bombela / backward-cpp

A beautiful stack trace pretty printer for C++
MIT License
3.81k stars 479 forks source link

build error #321

Closed endingly closed 11 months ago

endingly commented 11 months ago

I try to build version 1.6 for mingw clang64 on windows with msys2. But it's But it failed. And cmake give a error log to me

Change Dir: 'G:/soft/vcpkg/buildtrees/backward-cpp/x64-mingw-dynamic-rel'

Run Build Command(s): C:/Users/CBLI/anaconda3/Scripts/ninja.exe -v -v -j9 install
[1/15] G:\soft\msys64\clang64\bin\x86_64-w64-mingw32-g++.exe --target=x86_64-windows-gnu -DBACKWARD_HAS_BACKTRACE=0 -DBACKWARD_HAS_BACKTRACE_SYMBOL=1 -DBACKWARD_HAS_BFD=0 -DBACKWARD_HAS_DW=0 -DBACKWARD_HAS_DWARF=0 -DBACKWARD_HAS_LIBUNWIND=0 -DBACKWARD_HAS_UNWIND=1 -isystem G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean -Wall -Wextra -pedantic-errors -g -O3 -DNDEBUG -std=gnu++11 -MD -MT CMakeFiles/test_test.dir/test/test.cpp.obj -MF CMakeFiles\test_test.dir\test\test.cpp.obj.d -o CMakeFiles/test_test.dir/test/test.cpp.obj -c G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean/test/test.cpp
[2/15] G:\soft\msys64\clang64\bin\x86_64-w64-mingw32-g++.exe --target=x86_64-windows-gnu   -Wall -Wextra -pedantic-errors -g -O3 -DNDEBUG -std=gnu++11 -MD -MT CMakeFiles/test_main.dir/test/_test_main.cpp.obj -MF CMakeFiles\test_main.dir\test\_test_main.cpp.obj.d -o CMakeFiles/test_main.dir/test/_test_main.cpp.obj -c G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean/test/_test_main.cpp
[3/15] C:\WINDOWS\system32\cmd.exe /C "cd . && G:\soft\msys64\clang64\bin\x86_64-w64-mingw32-g++.exe --target=x86_64-windows-gnu -Wall -Wextra -pedantic-errors -g -O3 -DNDEBUG  CMakeFiles/test_main.dir/test/_test_main.cpp.obj CMakeFiles/test_test.dir/test/test.cpp.obj -o test_test.exe -Wl,--out-implib,libtest_test.dll.a -Wl,--major-image-version,0,--minor-image-version,0  -ldbghelp  -lpsapi  -lmsvcr90  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
[4/15] G:\soft\msys64\clang64\bin\x86_64-w64-mingw32-g++.exe --target=x86_64-windows-gnu -DBACKWARD_HAS_BACKTRACE=0 -DBACKWARD_HAS_BACKTRACE_SYMBOL=1 -DBACKWARD_HAS_BFD=0 -DBACKWARD_HAS_DW=0 -DBACKWARD_HAS_DWARF=0 -DBACKWARD_HAS_LIBUNWIND=0 -DBACKWARD_HAS_UNWIND=1 -isystem G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean -Wall -Wextra -pedantic-errors -g -O3 -DNDEBUG -std=gnu++11 -MD -MT CMakeFiles/test_suicide.dir/test/suicide.cpp.obj -MF CMakeFiles\test_suicide.dir\test\suicide.cpp.obj.d -o CMakeFiles/test_suicide.dir/test/suicide.cpp.obj -c G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean/test/suicide.cpp
G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean/test/suicide.cpp:78:26: warning: all paths through this function will call itself [-Winfinite-recursion]

   78 | int bye_bye_stack(int i) { return bye_bye_stack(i + 1) + bye_bye_stack(i * 2); }

      |                          ^

1 warning generated.

[5/15] G:\soft\msys64\clang64\bin\x86_64-w64-mingw32-g++.exe --target=x86_64-windows-gnu -DBACKWARD_HAS_BACKTRACE=0 -DBACKWARD_HAS_BACKTRACE_SYMBOL=1 -DBACKWARD_HAS_BFD=0 -DBACKWARD_HAS_DW=0 -DBACKWARD_HAS_DWARF=0 -DBACKWARD_HAS_LIBUNWIND=0 -DBACKWARD_HAS_UNWIND=1 -IG:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean -Wall -Wextra -pedantic-errors -g -O3 -DNDEBUG -std=gnu++11 -MD -MT CMakeFiles/backward_object.dir/backward.cpp.obj -MF CMakeFiles\backward_object.dir\backward.cpp.obj.d -o CMakeFiles/backward_object.dir/backward.cpp.obj -c G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean/backward.cpp
[6/15] G:\soft\msys64\clang64\bin\x86_64-w64-mingw32-g++.exe --target=x86_64-windows-gnu -DBACKWARD_HAS_BACKTRACE=0 -DBACKWARD_HAS_BACKTRACE_SYMBOL=1 -DBACKWARD_HAS_BFD=0 -DBACKWARD_HAS_DW=0 -DBACKWARD_HAS_DWARF=0 -DBACKWARD_HAS_LIBUNWIND=0 -DBACKWARD_HAS_UNWIND=1 -Dbackward_EXPORTS -IG:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean -Wall -Wextra -pedantic-errors -g -O3 -DNDEBUG -std=gnu++11 -MD -MT CMakeFiles/backward.dir/backward.cpp.obj -MF CMakeFiles\backward.dir\backward.cpp.obj.d -o CMakeFiles/backward.dir/backward.cpp.obj -c G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean/backward.cpp
[7/15] G:\soft\msys64\clang64\bin\x86_64-w64-mingw32-g++.exe --target=x86_64-windows-gnu -DBACKWARD_HAS_BACKTRACE=0 -DBACKWARD_HAS_BACKTRACE_SYMBOL=1 -DBACKWARD_HAS_BFD=0 -DBACKWARD_HAS_DW=0 -DBACKWARD_HAS_DWARF=0 -DBACKWARD_HAS_LIBUNWIND=0 -DBACKWARD_HAS_UNWIND=1 -isystem G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean -Wall -Wextra -pedantic-errors -g -O3 -DNDEBUG -std=gnu++11 -MD -MT CMakeFiles/test_stacktrace.dir/test/stacktrace.cpp.obj -MF CMakeFiles\test_stacktrace.dir\test\stacktrace.cpp.obj.d -o CMakeFiles/test_stacktrace.dir/test/stacktrace.cpp.obj -c G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean/test/stacktrace.cpp
[8/15] G:\soft\msys64\clang64\bin\x86_64-w64-mingw32-g++.exe --target=x86_64-windows-gnu -DBACKWARD_HAS_BACKTRACE=0 -DBACKWARD_HAS_BACKTRACE_SYMBOL=1 -DBACKWARD_HAS_BFD=0 -DBACKWARD_HAS_DW=0 -DBACKWARD_HAS_DWARF=0 -DBACKWARD_HAS_LIBUNWIND=0 -DBACKWARD_HAS_UNWIND=1 -isystem G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean -Wall -Wextra -pedantic-errors -g -O3 -DNDEBUG -std=gnu++11 -MD -MT CMakeFiles/test_rectrace.dir/test/rectrace.cpp.obj -MF CMakeFiles\test_rectrace.dir\test\rectrace.cpp.obj.d -o CMakeFiles/test_rectrace.dir/test/rectrace.cpp.obj -c G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean/test/rectrace.cpp
[9/15] C:\WINDOWS\system32\cmd.exe /C "cd . && G:\soft\msys64\clang64\bin\x86_64-w64-mingw32-g++.exe --target=x86_64-windows-gnu -Wall -Wextra -pedantic-errors -g -O3 -DNDEBUG  CMakeFiles/backward_object.dir/backward.cpp.obj CMakeFiles/test_main.dir/test/_test_main.cpp.obj CMakeFiles/test_suicide.dir/test/suicide.cpp.obj -o test_suicide.exe -Wl,--out-implib,libtest_suicide.dll.a -Wl,--major-image-version,0,--minor-image-version,0  -ldbghelp  -lpsapi  -lmsvcr90  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
[10/15] C:\WINDOWS\system32\cmd.exe /C "cd . && G:\soft\msys64\clang64\bin\x86_64-w64-mingw32-g++.exe --target=x86_64-windows-gnu -Wall -Wextra -pedantic-errors -g -O3 -DNDEBUG   -shared -o libbackward.dll -Wl,--out-implib,libbackward.dll.a -Wl,--major-image-version,0,--minor-image-version,0 CMakeFiles/backward.dir/backward.cpp.obj  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
FAILED: libbackward.dll libbackward.dll.a 
C:\WINDOWS\system32\cmd.exe /C "cd . && G:\soft\msys64\clang64\bin\x86_64-w64-mingw32-g++.exe --target=x86_64-windows-gnu -Wall -Wextra -pedantic-errors -g -O3 -DNDEBUG   -shared -o libbackward.dll -Wl,--out-implib,libbackward.dll.a -Wl,--major-image-version,0,--minor-image-version,0 CMakeFiles/backward.dir/backward.cpp.obj  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
ld.lld: error: undefined symbol: __declspec(dllimport) SymGetModuleBase64
>>> referenced by G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean/backward.hpp:0
>>>               CMakeFiles/backward.dir/backward.cpp.obj:(backward::StackTraceImpl<backward::system_tag::windows_tag>::load_here(unsigned long long, void*, void*))
>>> referenced by G:/soft/msys64/clang64/include/c++/v1/__utility/swap.h:0
>>>               CMakeFiles/backward.dir/backward.cpp.obj:(backward::StackTraceImpl<backward::system_tag::windows_tag>::load_here(unsigned long long, void*, void*))

ld.lld: error: undefined symbol: __declspec(dllimport) SymFunctionTableAccess64
>>> referenced by G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean/backward.hpp:0
>>>               CMakeFiles/backward.dir/backward.cpp.obj:(backward::StackTraceImpl<backward::system_tag::windows_tag>::load_here(unsigned long long, void*, void*))
>>> referenced by G:/soft/msys64/clang64/include/c++/v1/__split_buffer:0
>>>               CMakeFiles/backward.dir/backward.cpp.obj:(backward::StackTraceImpl<backward::system_tag::windows_tag>::load_here(unsigned long long, void*, void*))

ld.lld: error: undefined symbol: __declspec(dllimport) StackWalk64
>>> referenced by G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean/backward.hpp:1174
>>>               CMakeFiles/backward.dir/backward.cpp.obj:(backward::StackTraceImpl<backward::system_tag::windows_tag>::load_here(unsigned long long, void*, void*))

ld.lld: error: undefined symbol: __declspec(dllimport) SymInitialize
>>> referenced by G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean/backward.hpp:3608
>>>               CMakeFiles/backward.dir/backward.cpp.obj:(backward::TraceResolverImpl<backward::system_tag::windows_tag>::TraceResolverImpl())

ld.lld: error: undefined symbol: __declspec(dllimport) SymGetOptions
>>> referenced by G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean/backward.hpp:3609
>>>               CMakeFiles/backward.dir/backward.cpp.obj:(backward::TraceResolverImpl<backward::system_tag::windows_tag>::TraceResolverImpl())

ld.lld: error: undefined symbol: __declspec(dllimport) SymSetOptions
>>> referenced by G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean/backward.hpp:3611
>>>               CMakeFiles/backward.dir/backward.cpp.obj:(backward::TraceResolverImpl<backward::system_tag::windows_tag>::TraceResolverImpl())

ld.lld: error: undefined symbol: __declspec(dllimport) ImageNtHeader
>>> referenced by G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean/backward.hpp:3620
>>>               CMakeFiles/backward.dir/backward.cpp.obj:(backward::TraceResolverImpl<backward::system_tag::windows_tag>::TraceResolverImpl())

ld.lld: error: undefined symbol: __declspec(dllimport) SymFromAddr
>>> referenced by G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean/backward.hpp:3641
>>>               CMakeFiles/backward.dir/backward.cpp.obj:(backward::TraceResolverImpl<backward::system_tag::windows_tag>::resolve(backward::ResolvedTrace))

ld.lld: error: undefined symbol: __declspec(dllimport) UnDecorateSymbolName
>>> referenced by G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean/backward.hpp:3657
>>>               CMakeFiles/backward.dir/backward.cpp.obj:(backward::TraceResolverImpl<backward::system_tag::windows_tag>::resolve(backward::ResolvedTrace))

ld.lld: error: undefined symbol: __declspec(dllimport) SymGetLineFromAddr64
>>> referenced by G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean/backward.hpp:3661
>>>               CMakeFiles/backward.dir/backward.cpp.obj:(backward::TraceResolverImpl<backward::system_tag::windows_tag>::resolve(backward::ResolvedTrace))

ld.lld: error: undefined symbol: __declspec(dllimport) SymLoadModule64
>>> referenced by G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean/backward.hpp:3592
>>>               CMakeFiles/backward.dir/backward.cpp.obj:(backward::get_mod_info::operator()(HINSTANCE__*))
x86_64-w64-mingw32-g++: error: linker command failed with exit code 1 (use -v to see invocation)
[11/15] G:\soft\msys64\clang64\bin\x86_64-w64-mingw32-g++.exe --target=x86_64-windows-gnu -DBACKWARD_HAS_BACKTRACE=0 -DBACKWARD_HAS_BACKTRACE_SYMBOL=1 -DBACKWARD_HAS_BFD=0 -DBACKWARD_HAS_DW=0 -DBACKWARD_HAS_DWARF=0 -DBACKWARD_HAS_LIBUNWIND=0 -DBACKWARD_HAS_UNWIND=1 -isystem G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean -Wall -Wextra -pedantic-errors -g -O3 -DNDEBUG -std=gnu++11 -MD -MT CMakeFiles/test_select_signals.dir/test/select_signals.cpp.obj -MF CMakeFiles\test_select_signals.dir\test\select_signals.cpp.obj.d -o CMakeFiles/test_select_signals.dir/test/select_signals.cpp.obj -c G:/soft/vcpkg/buildtrees/backward-cpp/src/v1.6-9fedaf3177.clean/test/select_signals.cpp
[12/15] C:\WINDOWS\system32\cmd.exe /C "cd . && G:\soft\msys64\clang64\bin\x86_64-w64-mingw32-g++.exe --target=x86_64-windows-gnu -Wall -Wextra -pedantic-errors -g -O3 -DNDEBUG  CMakeFiles/test_main.dir/test/_test_main.cpp.obj CMakeFiles/test_stacktrace.dir/test/stacktrace.cpp.obj -o test_stacktrace.exe -Wl,--out-implib,libtest_stacktrace.dll.a -Wl,--major-image-version,0,--minor-image-version,0  -ldbghelp  -lpsapi  -lmsvcr90  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
[13/15] C:\WINDOWS\system32\cmd.exe /C "cd . && G:\soft\msys64\clang64\bin\x86_64-w64-mingw32-g++.exe --target=x86_64-windows-gnu -Wall -Wextra -pedantic-errors -g -O3 -DNDEBUG  CMakeFiles/test_main.dir/test/_test_main.cpp.obj CMakeFiles/test_rectrace.dir/test/rectrace.cpp.obj -o test_rectrace.exe -Wl,--out-implib,libtest_rectrace.dll.a -Wl,--major-image-version,0,--minor-image-version,0  -ldbghelp  -lpsapi  -lmsvcr90  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
ninja: build stopped: subcommand failed.