Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SENTRY_BUILD_RUNTIMESTATIC:ON fails to build #357

Closed
1 of 3 tasks
Jake-Shadle opened this issue Aug 21, 2020 · 2 comments · Fixed by #360
Closed
1 of 3 tasks

SENTRY_BUILD_RUNTIMESTATIC:ON fails to build #357

Jake-Shadle opened this issue Aug 21, 2020 · 2 comments · Fixed by #360

Comments

@Jake-Shadle
Copy link

Description

Defining SENTRY_BUILD_RUNTIMESTATIC=ON fails to build crashpad due to some objects linking with the dynamic runtime instead of the static runtime.

When does the problem happen

  • During build
  • During run-time
  • When capturing a hard crash

Environment

  • OS: x86_64-pc-windows-msvc
  • Compiler: MSVC 19.16.27043.0
  • CMake version and config: 3.18.2, "-DBUILD_SHARED_LIBS=OFF" "-DSENTRY_BUILD_TESTS=OFF" "-DSENTRY_BUILD_EXAMPLES=OFF" "-DSENTRY_TRANSPORT=none" "-DSENTRY_BACKEND=crashpad" "-DSENTRY_BUILD_RUNTIMESTATIC=ON"

Steps To Reproduce

I think the only thing needed is to build with SENTRY_BACKEND=crashpad and SENTRY_BUILD_RUNTIMESTATIC=ON.

Log output

[2020-08-21T15:16:26Z] running: "cmake" "c:\\.cargo\\registry\\src\\github.aaakk.us.kg-1ecc6299db9ec823\\sentry-contrib-native-sys-0.1.0\\sentry-native" "-G" "Visual Studio 15 2017" "-Thost=x64" "-Ax64" "-DBUILD_SHARED_LIBS=OFF" "-DSENTRY_BUILD_TESTS=OFF" "-DSENTRY_BUILD_EXAMPLES=OFF" "-DSENTRY_TRANSPORT=none" "-DSENTRY_BACKEND=crashpad" "-DSENTRY_BUILD_RUNTIMESTATIC=ON" "-DCMAKE_INSTALL_PREFIX=C:\\build\\target\\debug\\build\\sentry-contrib-native-sys-9aa5fadec5675fc0\\out" "-DCMAKE_C_FLAGS= -nologo -MT -Brepro" "-DCMAKE_C_FLAGS_RELWITHDEBINFO= -nologo -MT -Brepro" "-DCMAKE_CXX_FLAGS= -nologo -MT -Brepro" "-DCMAKE_CXX_FLAGS_RELWITHDEBINFO= -nologo -MT -Brepro" "-DCMAKE_ASM_FLAGS= -nologo -MT -Brepro" "-DCMAKE_ASM_FLAGS_RELWITHDEBINFO= -nologo -MT -Brepro" "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
[2020-08-21T15:16:26Z] -- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.18363.
[2020-08-21T15:16:26Z] -- The C compiler identification is MSVC 19.16.27043.0
[2020-08-21T15:16:26Z] -- The CXX compiler identification is MSVC 19.16.27043.0
[2020-08-21T15:16:26Z] -- The ASM compiler identification is MSVC
[2020-08-21T15:16:26Z] -- Found assembler: C:/buildtools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe
[2020-08-21T15:16:26Z] -- Detecting C compiler ABI info
[2020-08-21T15:16:26Z] -- Detecting C compiler ABI info - done
[2020-08-21T15:16:26Z] -- Check for working C compiler: C:/buildtools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe - skipped
[2020-08-21T15:16:26Z] -- Detecting C compile features
[2020-08-21T15:16:26Z] -- Detecting C compile features - done
[2020-08-21T15:16:26Z] -- Detecting CXX compiler ABI info
[2020-08-21T15:16:26Z] -- Detecting CXX compiler ABI info - done
[2020-08-21T15:16:26Z] -- Check for working CXX compiler: C:/buildtools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe - skipped
[2020-08-21T15:16:26Z] -- Detecting CXX compile features
[2020-08-21T15:16:26Z] -- Detecting CXX compile features - done
[2020-08-21T15:16:26Z] -- SENTRY_TRANSPORT=none
[2020-08-21T15:16:26Z] -- SENTRY_BACKEND=crashpad
[2020-08-21T15:16:26Z] -- Looking for sys/types.h
[2020-08-21T15:16:26Z] -- Looking for sys/types.h - found
[2020-08-21T15:16:26Z] -- Looking for stdint.h
[2020-08-21T15:16:26Z] -- Looking for stdint.h - found
[2020-08-21T15:16:26Z] -- Looking for stddef.h
[2020-08-21T15:16:26Z] -- Looking for stddef.h - found
[2020-08-21T15:16:26Z] -- Check size of long
[2020-08-21T15:16:26Z] -- Check size of long - done
[2020-08-21T15:16:26Z] -- The ASM_MASM compiler identification is MSVC
[2020-08-21T15:16:26Z] -- Found assembler: C:/buildtools/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/ml64.exe
[2020-08-21T15:16:26Z] -- Configuring done
[2020-08-21T15:16:26Z] -- Generating done
[2020-08-21T15:16:26Z] -- Build files have been written to: C:/build/target/debug/build/sentry-contrib-native-sys-9aa5fadec5675fc0/out/build
[2020-08-21T15:16:26Z] running: "cmake" "--build" "." "--target" "install" "--config" "RelWithDebInfo" "--"
[2020-08-21T15:16:26Z] Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
[2020-08-21T15:16:26Z] Copyright (C) Microsoft Corporation. All rights reserved.
[2020-08-21T15:16:26Z] 
[2020-08-21T15:16:26Z]   Checking Build System
[2020-08-21T15:16:26Z]   Building Custom Rule C:/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/sentry-contrib-native-sys-0.1.0/sentry-native/external/crashpad/compat/CMakeLists.txt
[2020-08-21T15:16:26Z]   strings.cc
[2020-08-21T15:16:26Z]   time.cc
[2020-08-21T15:16:26Z]   Generating Code...
[2020-08-21T15:16:26Z]   crashpad_compat.vcxproj -> C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\compat\RelWithDebInfo\crashpad_compat.lib
[2020-08-21T15:16:26Z]   Building Custom Rule C:/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/sentry-contrib-native-sys-0.1.0/sentry-native/external/crashpad/third_party/zlib/CMakeLists.txt
[2020-08-21T15:16:26Z]   adler32.c
[2020-08-21T15:16:26Z]   compress.c
[2020-08-21T15:16:26Z]   crc32.c
[2020-08-21T15:16:26Z]   deflate.c
[2020-08-21T15:16:26Z]   gzclose.c
[2020-08-21T15:16:26Z]   gzlib.c
[2020-08-21T15:16:26Z]   gzread.c
[2020-08-21T15:16:26Z]   gzwrite.c
[2020-08-21T15:16:26Z]   infback.c
[2020-08-21T15:16:26Z]   inffast.c
[2020-08-21T15:16:26Z]   inflate.c
[2020-08-21T15:16:26Z]   inftrees.c
[2020-08-21T15:16:26Z]   trees.c
[2020-08-21T15:16:26Z]   uncompr.c
[2020-08-21T15:16:26Z]   zutil.c
[2020-08-21T15:16:26Z]   crc_folding.c
[2020-08-21T15:16:26Z]   fill_window_sse.c
[2020-08-21T15:16:26Z]   x86.c
[2020-08-21T15:16:26Z]   Generating Code...
[2020-08-21T15:16:26Z]   crashpad_zlib.vcxproj -> C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\third_party\zlib\RelWithDebInfo\crashpad_zlib.lib
[2020-08-21T15:16:26Z]   Building Custom Rule C:/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/sentry-contrib-native-sys-0.1.0/sentry-native/external/crashpad/third_party/mini_chromium/CMakeLists.txt
[2020-08-21T15:16:26Z]   alias.cc
[2020-08-21T15:16:26Z]   file_path.cc
[2020-08-21T15:16:26Z]   scoped_file.cc
[2020-08-21T15:16:26Z]   logging.cc
[2020-08-21T15:16:26Z]   memory.cc
[2020-08-21T15:16:26Z]   rand_util.cc
[2020-08-21T15:16:26Z]   string16.cc
[2020-08-21T15:16:26Z]   string_number_conversions.cc
[2020-08-21T15:16:26Z]   stringprintf.cc
[2020-08-21T15:16:26Z]   utf_string_conversions.cc
[2020-08-21T15:16:26Z]   lock.cc
[2020-08-21T15:16:26Z]   icu_utf.cc
[2020-08-21T15:16:26Z]   thread_local_storage.cc
[2020-08-21T15:16:26Z]   utf_string_conversion_utils.cc
[2020-08-21T15:16:26Z]   process_metrics_win.cc
[2020-08-21T15:16:26Z]   scoped_clear_last_error_win.cc
[2020-08-21T15:16:26Z]   string_util_win.cc
[2020-08-21T15:16:26Z]   lock_impl_win.cc
[2020-08-21T15:16:26Z]   thread_local_storage_win.cc
[2020-08-21T15:16:26Z]   Generating Code...
[2020-08-21T15:16:26Z]   mini_chromium.vcxproj -> C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\third_party\mini_chromium\RelWithDebInfo\mini_chromium.lib
[2020-08-21T15:16:26Z]   Building Custom Rule C:/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/sentry-contrib-native-sys-0.1.0/sentry-native/external/crashpad/util/CMakeLists.txt
[2020-08-21T15:16:26Z]   Assembling C:\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\sentry-contrib-native-sys-0.1.0\sentry-native\external\crashpad\util\misc\capture_context_win.asm...
[2020-08-21T15:16:26Z]   Assembling C:\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\sentry-contrib-native-sys-0.1.0\sentry-native\external\crashpad\util\win\safe_terminate_process.asm...
[2020-08-21T15:16:26Z]   delimited_file_reader.cc
[2020-08-21T15:16:26Z]   file_helper.cc
[2020-08-21T15:16:26Z]   file_io.cc
[2020-08-21T15:16:26Z]   file_reader.cc
[2020-08-21T15:16:26Z]   file_seeker.cc
[2020-08-21T15:16:26Z]   file_writer.cc
[2020-08-21T15:16:26Z]   output_stream_file_writer.cc
[2020-08-21T15:16:26Z]   scoped_remove_file.cc
[2020-08-21T15:16:26Z]   string_file.cc
[2020-08-21T15:16:26Z]   initialization_state_dcheck.cc
[2020-08-21T15:16:26Z]   lexing.cc
[2020-08-21T15:16:26Z]   metrics.cc
[2020-08-21T15:16:26Z]   pdb_structures.cc
[2020-08-21T15:16:26Z]   random_string.cc
[2020-08-21T15:16:26Z]   range_set.cc
[2020-08-21T15:16:26Z]   reinterpret_bytes.cc
[2020-08-21T15:16:26Z]   scoped_forbid_return.cc
[2020-08-21T15:16:26Z]   time.cc
[2020-08-21T15:16:26Z]   uuid.cc
[2020-08-21T15:16:26Z]   zlib.cc
[2020-08-21T15:16:26Z]   Generating Code...
[2020-08-21T15:16:26Z]   Compiling...
[2020-08-21T15:16:26Z]   http_body.cc
[2020-08-21T15:16:26Z]   http_body_gzip.cc
[2020-08-21T15:16:26Z]   http_multipart_builder.cc
[2020-08-21T15:16:26Z]   http_transport.cc
[2020-08-21T15:16:26Z]   url.cc
[2020-08-21T15:16:26Z]   checked_address_range.cc
[2020-08-21T15:16:26Z]   process_memory.cc
[2020-08-21T15:16:26Z]   process_memory_range.cc
[2020-08-21T15:16:26Z]   aligned_allocator.cc
[2020-08-21T15:16:26Z]   string_number_conversion.cc
[2020-08-21T15:16:26Z]   strlcpy.cc
[2020-08-21T15:16:26Z]   strnlen.cc
[2020-08-21T15:16:26Z]   base94_output_stream.cc
[2020-08-21T15:16:26Z]   file_encoder.cc
[2020-08-21T15:16:26Z]   file_output_stream.cc
[2020-08-21T15:16:26Z]   log_output_stream.cc
[2020-08-21T15:16:26Z]   zlib_output_stream.cc
[2020-08-21T15:16:26Z]   split_string.cc
[2020-08-21T15:16:26Z]   thread.cc
[2020-08-21T15:16:26Z]   thread_log_messages.cc
[2020-08-21T15:16:26Z]   Generating Code...
[2020-08-21T15:16:26Z]   Compiling...
[2020-08-21T15:16:26Z]   worker_thread.cc
[2020-08-21T15:16:26Z]   directory_reader_win.cc
[2020-08-21T15:16:26Z]   file_io_win.cc
[2020-08-21T15:16:26Z]   filesystem_win.cc
[2020-08-21T15:16:26Z]   clock_win.cc
[2020-08-21T15:16:26Z]   paths_win.cc
[2020-08-21T15:16:26Z]   time_win.cc
[2020-08-21T15:16:26Z]   http_transport_win.cc
[2020-08-21T15:16:26Z]   process_memory_win.cc
[2020-08-21T15:16:26Z]   semaphore_win.cc
[2020-08-21T15:16:26Z]   thread_win.cc
[2020-08-21T15:16:26Z]   command_line.cc
[2020-08-21T15:16:26Z]   critical_section_with_debug_info.cc
[2020-08-21T15:16:26Z]   exception_handler_server.cc
[2020-08-21T15:16:26Z]   get_function.cc
[2020-08-21T15:16:26Z]   get_module_information.cc
[2020-08-21T15:16:26Z]   handle.cc
[2020-08-21T15:16:26Z]   initial_client_data.cc
[2020-08-21T15:16:26Z]   loader_lock.cc
[2020-08-21T15:16:26Z]   module_version.cc
[2020-08-21T15:16:26Z]   Generating Code...
[2020-08-21T15:16:26Z]   Compiling...
[2020-08-21T15:16:26Z]   nt_internals.cc
[2020-08-21T15:16:26Z]   ntstatus_logging.cc
[2020-08-21T15:16:26Z]   process_info.cc
[2020-08-21T15:16:26Z]   registration_protocol_win.cc
[2020-08-21T15:16:26Z]   scoped_handle.cc
[2020-08-21T15:16:26Z]   scoped_local_alloc.cc
[2020-08-21T15:16:26Z]   scoped_process_suspend.cc
[2020-08-21T15:16:26Z]   scoped_set_event.cc
[2020-08-21T15:16:26Z]   session_end_watcher.cc
[2020-08-21T15:16:26Z]   Generating Code...
[2020-08-21T15:16:26Z] safe_terminate_process.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\util\crashpad_util.vcxproj]
[2020-08-21T15:16:26Z]   crashpad_util.vcxproj -> C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\util\RelWithDebInfo\crashpad_util.lib
[2020-08-21T15:16:26Z]   Building Custom Rule C:/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/sentry-contrib-native-sys-0.1.0/sentry-native/external/crashpad/client/CMakeLists.txt
[2020-08-21T15:16:26Z]   annotation.cc
[2020-08-21T15:16:26Z]   annotation_list.cc
[2020-08-21T15:16:26Z]   crash_report_database.cc
[2020-08-21T15:16:26Z]   crashpad_info.cc
[2020-08-21T15:16:26Z]   prune_crash_reports.cc
[2020-08-21T15:16:26Z]   settings.cc
[2020-08-21T15:16:26Z]   crash_report_database_win.cc
[2020-08-21T15:16:26Z]   crashpad_client_win.cc
[2020-08-21T15:16:26Z]   Generating Code...
[2020-08-21T15:16:26Z]   crashpad_client.vcxproj -> C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\client\RelWithDebInfo\crashpad_client.lib
[2020-08-21T15:16:26Z]   Building Custom Rule C:/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/sentry-contrib-native-sys-0.1.0/sentry-native/external/crashpad/third_party/getopt/CMakeLists.txt
[2020-08-21T15:16:26Z]   getopt.cc
[2020-08-21T15:16:26Z]   crashpad_getopt.vcxproj -> C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\third_party\getopt\RelWithDebInfo\crashpad_getopt.lib
[2020-08-21T15:16:26Z]   Building Custom Rule C:/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/sentry-contrib-native-sys-0.1.0/sentry-native/external/crashpad/snapshot/CMakeLists.txt
[2020-08-21T15:16:26Z]   annotation_snapshot.cc
[2020-08-21T15:16:26Z]   capture_memory.cc
[2020-08-21T15:16:26Z]   cpu_context.cc
[2020-08-21T15:16:26Z]   crashpad_info_client_options.cc
[2020-08-21T15:16:26Z]   handle_snapshot.cc
[2020-08-21T15:16:26Z]   memory_snapshot.cc
[2020-08-21T15:16:26Z]   exception_snapshot_minidump.cc
[2020-08-21T15:16:26Z]   memory_snapshot_minidump.cc
[2020-08-21T15:16:26Z]   minidump_annotation_reader.cc
[2020-08-21T15:16:26Z]   minidump_context_converter.cc
[2020-08-21T15:16:26Z]   minidump_simple_string_dictionary_reader.cc
[2020-08-21T15:16:26Z]   minidump_string_list_reader.cc
[2020-08-21T15:16:26Z]   minidump_string_reader.cc
[2020-08-21T15:16:26Z]   module_snapshot_minidump.cc
[2020-08-21T15:16:26Z]   process_snapshot_minidump.cc
[2020-08-21T15:16:26Z]   system_snapshot_minidump.cc
[2020-08-21T15:16:26Z]   thread_snapshot_minidump.cc
[2020-08-21T15:16:26Z]   unloaded_module_snapshot.cc
[2020-08-21T15:16:26Z]   crashpad_info_reader.cc
[2020-08-21T15:16:26Z]   capture_memory_delegate_win.cc
[2020-08-21T15:16:26Z]   Generating Code...
[2020-08-21T15:16:26Z]   Compiling...
[2020-08-21T15:16:26Z]   cpu_context_win.cc
[2020-08-21T15:16:26Z]   exception_snapshot_win.cc
[2020-08-21T15:16:26Z]   memory_map_region_snapshot_win.cc
[2020-08-21T15:16:26Z]   module_snapshot_win.cc
[2020-08-21T15:16:26Z]   pe_image_annotations_reader.cc
[2020-08-21T15:16:26Z]   pe_image_reader.cc
[2020-08-21T15:16:26Z]   pe_image_resource_reader.cc
[2020-08-21T15:16:26Z]   process_reader_win.cc
[2020-08-21T15:16:26Z]   process_snapshot_win.cc
[2020-08-21T15:16:26Z]   process_subrange_reader.cc
[2020-08-21T15:16:26Z]   system_snapshot_win.cc
[2020-08-21T15:16:26Z]   thread_snapshot_win.cc
[2020-08-21T15:16:26Z]   Generating Code...
[2020-08-21T15:16:26Z]   crashpad_snapshot.vcxproj -> C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\snapshot\RelWithDebInfo\crashpad_snapshot.lib
[2020-08-21T15:16:26Z]   Building Custom Rule C:/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/sentry-contrib-native-sys-0.1.0/sentry-native/external/crashpad/minidump/CMakeLists.txt
[2020-08-21T15:16:26Z]   minidump_annotation_writer.cc
[2020-08-21T15:16:26Z]   minidump_byte_array_writer.cc
[2020-08-21T15:16:26Z]   minidump_context_writer.cc
[2020-08-21T15:16:26Z]   minidump_crashpad_info_writer.cc
[2020-08-21T15:16:26Z]   minidump_exception_writer.cc
[2020-08-21T15:16:26Z]   minidump_extensions.cc
[2020-08-21T15:16:26Z]   minidump_file_writer.cc
[2020-08-21T15:16:26Z]   minidump_handle_writer.cc
[2020-08-21T15:16:26Z]   minidump_memory_info_writer.cc
[2020-08-21T15:16:26Z]   minidump_memory_writer.cc
[2020-08-21T15:16:26Z]   minidump_misc_info_writer.cc
[2020-08-21T15:16:26Z]   minidump_module_crashpad_info_writer.cc
[2020-08-21T15:16:26Z]   minidump_module_writer.cc
[2020-08-21T15:16:26Z]   minidump_rva_list_writer.cc
[2020-08-21T15:16:26Z]   minidump_simple_string_dictionary_writer.cc
[2020-08-21T15:16:26Z]   minidump_stream_writer.cc
[2020-08-21T15:16:26Z]   minidump_string_writer.cc
[2020-08-21T15:16:26Z]   minidump_system_info_writer.cc
[2020-08-21T15:16:26Z]   minidump_thread_id_map.cc
[2020-08-21T15:16:26Z]   minidump_thread_writer.cc
[2020-08-21T15:16:26Z]   Generating Code...
[2020-08-21T15:16:26Z]   Compiling...
[2020-08-21T15:16:26Z]   minidump_unloaded_module_writer.cc
[2020-08-21T15:16:26Z]   minidump_user_extension_stream_data_source.cc
[2020-08-21T15:16:26Z]   minidump_user_stream_writer.cc
[2020-08-21T15:16:26Z]   minidump_writable.cc
[2020-08-21T15:16:26Z]   minidump_writer_util.cc
[2020-08-21T15:16:26Z]   Generating Code...
[2020-08-21T15:16:26Z]   crashpad_minidump.vcxproj -> C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\minidump\RelWithDebInfo\crashpad_minidump.lib
[2020-08-21T15:16:26Z]   Building Custom Rule C:/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/sentry-contrib-native-sys-0.1.0/sentry-native/external/crashpad/handler/CMakeLists.txt
[2020-08-21T15:16:26Z]   crash_report_upload_thread.cc
[2020-08-21T15:16:26Z]   handler_main.cc
[2020-08-21T15:16:26Z]   minidump_to_upload_parameters.cc
[2020-08-21T15:16:26Z]   prune_crash_reports_thread.cc
[2020-08-21T15:16:26Z]   user_stream_data_source.cc
[2020-08-21T15:16:26Z]   crash_report_exception_handler.cc
[2020-08-21T15:16:26Z]   Generating Code...
[2020-08-21T15:16:26Z]   crashpad_handler_lib.vcxproj -> C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\RelWithDebInfo\crashpad_handler_lib.lib
[2020-08-21T15:16:26Z]   Building Custom Rule C:/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/sentry-contrib-native-sys-0.1.0/sentry-native/external/crashpad/tools/CMakeLists.txt
[2020-08-21T15:16:26Z]   tool_support.cc
[2020-08-21T15:16:26Z]   crashpad_tools.vcxproj -> C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\tools\RelWithDebInfo\crashpad_tools.lib
[2020-08-21T15:16:26Z]   Building Custom Rule C:/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/sentry-contrib-native-sys-0.1.0/sentry-native/external/crashpad/handler/CMakeLists.txt
[2020-08-21T15:16:26Z]   main.cc
[2020-08-21T15:16:26Z] crashpad_handler_lib.lib(handler_main.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] crashpad_handler_lib.lib(crash_report_upload_thread.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] crashpad_handler_lib.lib(prune_crash_reports_thread.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] crashpad_handler_lib.lib(crash_report_exception_handler.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] crashpad_handler_lib.lib(minidump_to_upload_parameters.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] crashpad_handler_lib.lib(user_stream_data_source.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] msvcprt.lib(MSVCP140.dll) : error LNK2005: "private: static void __cdecl std::ios_base::_Ios_base_dtor(class std::ios_base *)" (?_Ios_base_dtor@ios_base@std@@CAXPEAV12@@Z) already defined in libcpmt.lib(ios.obj) [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] msvcprt.lib(MSVCP140.dll) : error LNK2005: "public: virtual __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::~basic_streambuf<char,struct std::char_traits<char> >(void)" (??1?$basic_streambuf@DU?$char_traits@D@std@@@std@@UEAA@XZ) already defined in crashpad_minidump.lib(minidump_writable.obj) [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] msvcprt.lib(MSVCP140.dll) : error LNK2005: "public: int __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::sputc(char)" (?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QEAAHD@Z) already defined in libcpmt.lib(locale.obj) [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] msvcprt.lib(MSVCP140.dll) : error LNK2005: "protected: char * __cdecl std::basic_streambuf<char,struct std::char_traits<char> >::_Pninc(void)" (?_Pninc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ) already defined in libcpmt.lib(locale.obj) [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] msvcprt.lib(MSVCP140.dll) : error LNK2005: "public: __cdecl std::basic_ostream<char,struct std::char_traits<char> >::basic_ostream<char,struct std::char_traits<char> >(class std::basic_streambuf<char,struct std::char_traits<char> > *,bool)" (??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z) already defined in crashpad_minidump.lib(minidump_writable.obj) [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] msvcprt.lib(MSVCP140.dll) : error LNK2005: "public: virtual __cdecl std::basic_ostream<char,struct std::char_traits<char> >::~basic_ostream<char,struct std::char_traits<char> >(void)" (??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ) already defined in crashpad_minidump.lib(minidump_writable.obj) [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] msvcprt.lib(MSVCP140.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::basic_ostream<char,struct std::char_traits<char> >::operator<<(int)" (??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z) already defined in crashpad_minidump.lib(minidump_writable.obj) [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] msvcprt.lib(MSVCP140.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::basic_ostream<char,struct std::char_traits<char> >::operator<<(unsigned __int64)" (??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@_K@Z) already defined in crashpad_minidump.lib(minidump_writable.obj) [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] msvcprt.lib(MSVCP140.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::basic_ostream<char,struct std::char_traits<char> >::operator<<(void const *)" (??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z) already defined in crashpad_minidump.lib(minidump_writable.obj) [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] msvcprt.lib(MSVCP140.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::basic_ostream<char,struct std::char_traits<char> >::flush(void)" (?flush@?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV12@XZ) already defined in mini_chromium.lib(logging.obj) [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] msvcprt.lib(MSVCP140.dll) : error LNK2005: "public: int __cdecl std::ios_base::flags(void)const " (?flags@ios_base@std@@QEBAHXZ) already defined in libcpmt.lib(locale.obj) [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] msvcprt.lib(MSVCP140.dll) : error LNK2005: "public: __int64 __cdecl std::ios_base::width(void)const " (?width@ios_base@std@@QEBA_JXZ) already defined in libcpmt.lib(locale.obj) [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] msvcprt.lib(MSVCP140.dll) : error LNK2005: "public: __int64 __cdecl std::ios_base::width(__int64)" (?width@ios_base@std@@QEAA_J_J@Z) already defined in libcpmt.lib(iomanip.obj) [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] crashpad_handler_lib.lib(handler_main.obj) : warning LNK4217: locally defined symbol _invalid_parameter_noinfo_noreturn imported in function "void __cdecl std::_Destroy_range<class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > &)" (??$_Destroy_range@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@std@@@std@@YAXPEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@0@0AEAV?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@0@@Z) [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] crashpad_handler_lib.lib(crash_report_upload_thread.obj) : warning LNK4049: locally defined symbol _invalid_parameter_noinfo_noreturn imported [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] crashpad_handler_lib.lib(crash_report_exception_handler.obj) : warning LNK4049: locally defined symbol _invalid_parameter_noinfo_noreturn imported [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] crashpad_handler_lib.lib(minidump_to_upload_parameters.obj) : warning LNK4049: locally defined symbol _invalid_parameter_noinfo_noreturn imported [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] crashpad_handler_lib.lib(handler_main.obj) : warning LNK4217: locally defined symbol __acrt_iob_func imported in function "int __cdecl crashpad::HandlerMain(int,char * * const,class std::vector<class std::unique_ptr<class crashpad::UserStreamDataSource,struct std::default_delete<class crashpad::UserStreamDataSource> >,class std::allocator<class std::unique_ptr<class crashpad::UserStreamDataSource,struct std::default_delete<class crashpad::UserStreamDataSource> > > > const *)" (?HandlerMain@crashpad@@YAHHQEAPEADPEBV?$vector@V?$unique_ptr@VUserStreamDataSource@crashpad@@U?$default_delete@VUserStreamDataSource@crashpad@@@std@@@std@@V?$allocator@V?$unique_ptr@VUserStreamDataSource@crashpad@@U?$default_delete@VUserStreamDataSource@crashpad@@@std@@@std@@@2@@std@@@Z) [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] crashpad_handler_lib.lib(handler_main.obj) : warning LNK4217: locally defined symbol __stdio_common_vfprintf imported in function fprintf [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] crashpad_handler_lib.lib(handler_main.obj) : warning LNK4217: locally defined symbol strncmp imported in function "private: struct crashpad::TSimpleStringDictionary<256,256,64>::Entry * __cdecl crashpad::TSimpleStringDictionary<256,256,64>::GetEntryForKey(class base::BasicStringPiece<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >)" (?GetEntryForKey@?$TSimpleStringDictionary@$0BAA@$0BAA@$0EA@@crashpad@@AEAAPEAUEntry@12@V?$BasicStringPiece@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@base@@@Z) [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] crashpad_handler_lib.lib(crash_report_upload_thread.obj) : warning LNK4217: locally defined symbol _time64 imported in function "private: void __cdecl crashpad::CrashReportUploadThread::ProcessPendingReport(struct crashpad::CrashReportDatabase::Report const &)" (?ProcessPendingReport@CrashReportUploadThread@crashpad@@AEAAXAEBUReport@CrashReportDatabase@2@@Z) [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
[2020-08-21T15:16:26Z] C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\RelWithDebInfo\crashpad_handler.exe : fatal error LNK1169: one or more multiply defined symbols found [C:\build\target\debug\build\sentry-contrib-native-sys-9aa5fadec5675fc0\out\build\crashpad_build\handler\crashpad_handler.vcxproj]
@Swatinem
Copy link
Member

Swatinem commented Aug 25, 2020

I’m a bit surprised why this here doesn’t work:

# set static runime if enabled
if(SENTRY_BUILD_RUNTIMESTATIC AND MSVC)
set_property(TARGET crashpad_client PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set_property(TARGET crashpad_compat PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set_property(TARGET crashpad_getopt PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set_property(TARGET crashpad_handler PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set_property(TARGET crashpad_minidump PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set_property(TARGET crashpad_snapshot PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set_property(TARGET crashpad_tools PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set_property(TARGET crashpad_util PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set_property(TARGET crashpad_zlib PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set_property(TARGET mini_chromium PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()

nevermind, noticed the difference and remembered that we split the handler from the handler_lib recently.

@Jake-Shadle
Copy link
Author

Ahh ok that makes sense. Might be worth adding a regression test for this in CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants