-
-
Notifications
You must be signed in to change notification settings - Fork 200
Closed
Labels
Description
Description
We tried to update to sentry-native on a cross-platform application, and we found that iOS fails to build after the update. The problem comes down to a change in the function signature of breakpad_backend_callback() which was introduced by #1083
Reverting to version 0.7.13 (the last release before #1083 was merged) results in a successful build.
When does the problem happen
- During build
- During run-time
- When capturing a hard crash
Environment
- OS: iOS
- Compiler: Xcode 16.4 / Apple clang version 17.0.0
- CMake version and config: CMake version 3.26.3 with
-DCMAKE_SYSTEM_NAME=iOS -DSENTRY_BACKEND=breakdpad
Steps To Reproduce
The build failure can be reproduced by checking out the latest sentry-native and running:
git submodule update --init --recursive
cmake -B sentry-native-xcode -GXcode -DCMAKE_SYSTEM_NAME=iOS -DSENTRY_BACKEND=breakpad
xcodebuild -project sentry-native-xcode/Sentry-Native.xcodeproj -sdk iphonesimulator
This results in a build failure as follows:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -ivfsstatcache /var/folders/p1/lmk7890x3f3gqvb_yqzd98jh0000gn/C/com.apple.DeveloperTools/16.4-16F6/Xcode/SDKStatCaches.noindex/iphonesimulator18.5-22F76-d5fc8ad4295d2ef488fb7d0f804ce0c4.sdkstatcache -fmessage-length\=164 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fcolor-diagnostics -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -Wno-implicit-fallthrough -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -Wno-sign-conversion -Wno-infinite-recursion -Wno-move -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-range-loop-analysis -Wno-semicolon-before-method-body @/Users/naomi/Work/sentry-native/sentry-native-xcode/build/sentry_fuzz_json.build/Debug-iphonesimulator/Objects-normal/x86_64/82b82416624d2658e5098eb0a28c15c5-common-args.resp -MMD -MT dependencies -MF /Users/naomi/Work/sentry-native/sentry-native-xcode/build/sentry_fuzz_json.build/Debug-iphonesimulator/Objects-normal/x86_64/sentry_backend_breakpad.d --serialize-diagnostics /Users/naomi/Work/sentry-native/sentry-native-xcode/build/sentry_fuzz_json.build/Debug-iphonesimulator/Objects-normal/x86_64/sentry_backend_breakpad.dia -c /Users/naomi/Work/sentry-native/src/backends/sentry_backend_breakpad.cpp -o /Users/naomi/Work/sentry-native/sentry-native-xcode/build/sentry_fuzz_json.build/Debug-iphonesimulator/Objects-normal/x86_64/sentry_backend_breakpad.o
/Users/naomi/Work/sentry-native/src/backends/sentry_backend_breakpad.cpp:275:15: error: no matching constructor for initialization of
'google_breakpad::ExceptionHandler'
275 | = new google_breakpad::ExceptionHandler(current_run_folder->path,
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
276 | nullptr, breakpad_backend_callback, nullptr, true, nullptr);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/naomi/Work/sentry-native/src/backends/sentry_backend_breakpad.cpp:47:
/Users/naomi/Work/sentry-native/external/breakpad/src/client/ios/exception_handler_no_mach.h:85:3: note: candidate constructor not viable: no
known conversion from 'bool (const char *, const char *, void *, breakpad_ucontext_t *, bool)' (aka 'bool (const char *, const char *, void *,
__darwin_ucontext *, bool)') to 'MinidumpCallback' (aka 'bool (*)(const char *, const char *, void *, bool)') for 3rd argument
85 | ExceptionHandler(const string& dump_path,
| ^
86 | FilterCallback filter, MinidumpCallback callback,
| ~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/naomi/Work/sentry-native/external/breakpad/src/client/ios/exception_handler_no_mach.h:92:3: note: candidate constructor not viable:
requires 3 arguments, but 6 were provided
92 | ExceptionHandler(DirectCallback callback,
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~
93 | void* callback_context,
| ~~~~~~~~~~~~~~~~~~~~~~~
94 | bool install_handler);
| ~~~~~~~~~~~~~~~~~~~~
/Users/naomi/Work/sentry-native/external/breakpad/src/client/ios/exception_handler_no_mach.h:136:12: note: candidate constructor not viable:
requires 1 argument, but 6 were provided
136 | explicit ExceptionHandler(const ExceptionHandler&);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Log output
CMake configuration outputs the following:
-- Sentry SDK version (full): 0.12.2
-- Sentry SDK version (base): 0.12.2
-- Sentry SDK version major='0' minor='12' patch='2'
-- The C compiler identification is AppleClang 17.0.0.17000013
-- The CXX compiler identification is AppleClang 17.0.0.17000013
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- SENTRY_TRANSPORT=none
-- SENTRY_BACKEND=breakpad
-- SENTRY_LIBRARY_TYPE=SHARED
-- SENTRY_SDK_NAME=
-- SENTRY_HANDLER_STACK_SIZE=64
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of long
-- Check size of long - done
-- Configuring done (10.6s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/naomi/Work/sentry-native/sentry-native-xcode
Metadata
Metadata
Assignees
Labels
Projects
Status
No status