crashpad build for tvOS

37 views
Skip to first unread message

tomek

unread,
Aug 28, 2021, 10:08:37 AM8/28/21
to Chromium-discuss
Hi, I'm trying to build crashpad for tvOS, I've used iOS setup with little changes
like replacing -mios-version-min flag to -mtvos-version-min or changing sdk from iphoneos to appletvos and sdk platform from iPhoneOS to AppleTVOS, based on that I'm using ./build/ios/setup_ios_gn.py script to generate configs and based on Debug-iphoneos I'm creating Debug-appletvos one then I'm running build command: ninja -c out/Debug-appletvos.
Example compile command after the changes looks like this:
clang++ -MMD -MF obj/util/mach/util.exception_ports.o.d -DZLIB_CONST -DCRASHPAD_ZLIB_SOURCE_SYSTEM -Igen/third_party/crashpad/crashpad -Igen -I../.. -I../../third_party/mini_chromium/mini_chromium -Igen
 -I../../compat/mac -I../../compat/ios -I../../compat/non_win  -Wall -Wendif-labels -Werror -Wextra -Wextra-semi -Wheader-hygiene -Wnewline-eof -Wno-missing-field-initializers -Wno-unused-parameter -Wsi
gn-compare -Wstring-conversion -Wvla -fno-exceptions -fno-rtti -fno-strict-aliasing -fobjc-call-cxx-cdtors -fstack-protector-all -fvisibility-inlines-hidden -fvisibility=hidden -isysroot /Applications/X
code.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.3.sdk -arch arm64 -mtvos-version-min=14.0 -g -Wexit-time-destructors -Wimplicit-fallthrough -std=c++14 -c ../../util/m
ach/exception_ports.cc -o obj/util/mach/util.exception_ports.o

unfortunately it fails with:

../../util/mach/exception_ports.cc:61:30: error: 'task_get_exception_ports' is unavailable: not available on tvOS
there are more similar problems:
'fork' has been explicitly marked unavailable here
pid_t    fork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
or
error: 'mach_msg' is unavailable: not available on tvOS

I'm aware of that I did some hacking within ios related build files to make it compile for tvos so might be I still need to do something more but I would like to ask if anyone did tried to build crashpad or other project which relies on mini_chromium for tvOS? Do I need to put more focus on build files to make it using some posix implementations or it's just not supported right now?

BTW. I'm working on macOS Big Sur v11.4

Thanks for any hints/advice!
Regards,
tomek/

tomek

unread,
Aug 30, 2021, 3:18:17 AM8/30/21
to Chromium-discuss, tomek
Sorry for spam, I've been pointed that there is a group dedicated for crashpad dev, so I've reposted that question to that group, for anyone interested please visit: https://groups.google.com/a/chromium.org/g/crashpad-dev/c/SSq9CriDJGo
Regards,
tomek/
Reply all
Reply to author
Forward
0 new messages