depthlove / depthlove.github.io

depthlove blog
https://depthlove.github.io
8 stars 1 forks source link

WebRTC 开发(五)编译与运行 Mac 工程 | Minmin.Sun Blog #246

Open depthlove opened 5 years ago

depthlove commented 5 years ago

https://depthlove.github.io/2019/10/18/webrtc-development-5-run-mac-project/

在 WebRTC 开发(四)源码下载与更新 一文中,我们获取到了可以在 iOS,macOS 平台运行的 WebRTC 源码。其中,在执行命令 fetch --nohooks webrtc_ios 时,我们可以明确看到代码支持的平台 ios, mac。 12345678910111213suntongmiandeMacBook-Pro:webrtc suntongmian$ fetch --noho

ZhangQiJin commented 4 years ago

你好请问你使用的macos系统和xcode版本是多少

depthlove commented 4 years ago

@ZhangQiJin 你好请问你使用的macos系统和xcode版本是多少

我有2台 MacBook Pro,配置分别为 13寸 macOS 10.14.6, 15寸 macOS 10.15.1,对应安装的 Xcode 版本为 Xcode 10.3,Xcode 11.2。在这两台 Mac 设备上都可以正常运行。

ZhangQiJin commented 4 years ago

@ZhangQiJin 你好请问你使用的macos系统和xcode版本是多少

我有2台 MacBook Pro,配置分别为 13寸 macOS 10.14.6, 15寸 macOS 10.15.1,对应安装的 Xcode 版本为 Xcode 10.3,Xcode 11.2。在这两台 Mac 设备上都可以正常运行。 我的系统使用的macOS 10.15.1 Xcode 11.2.1 编译的是68版本会报错,我看到了你的文章之后我在编译76版本试试目前才编译1000多个文件,

depthlove commented 4 years ago

@ZhangQiJin

@ZhangQiJin 你好请问你使用的macos系统和xcode版本是多少

我有2台 MacBook Pro,配置分别为 13寸 macOS 10.14.6, 15寸 macOS 10.15.1,对应安装的 Xcode 版本为 Xcode 10.3,Xcode 11.2。在这两台 Mac 设备上都可以正常运行。 我的系统使用的macOS 10.15.1 Xcode 11.2.1 编译的是68版本会报错,我看到了你的文章之后我在编译76版本试试目前才编译1000多个文件,

了解了。

ZhangQiJin commented 4 years ago

当我使用macOS = 10.15.1 Xcode = 11.2编译 remotes/branch-heads/68时会有如下错误 PhaseScriptExecution Action\ \"Compile\ and\ copy\ AppRTCMobile\ via\ ninja\" /Users/3tee1/Library/Developer/Xcode/DerivedData/all-aahwnpnfxzwhnkdcptwsxoktrbzw/Build/Intermediates.noindex/products.build/mac/AppRTCMobile.build/Script-52241E04DAFD8727A124995D.sh (in target 'AppRTCMobile' from project 'products') cd /Users/work/code/webrtc_mac_72/webrtc-checkout/src/out/mac /bin/sh -c /Users/3tee1/Library/Developer/Xcode/DerivedData/all-aahwnpnfxzwhnkdcptwsxoktrbzw/Build/Intermediates.noindex/products.build/mac/AppRTCMobile.build/Script-52241E04DAFD8727A124995D.sh

note: Compile and copy AppRTCMobile via ninja ninja: Entering directory `.' [1/198] STAMP obj/api/audio_codecs/opus/audio_decoder_opus.inputdeps.stamp [2/198] STAMP obj/examples/apprtc_signaling.inputdeps.stamp [3/198] STAMP obj/examples/AppRTCMobile_lib.inputdeps.stamp [4/198] LIBTOOL-STATIC obj/media/librtc_software_fallback_wrappers.a [5/198] OBJC obj/examples/apprtc_signaling/ARDAppEngineClient.o [6/198] OBJC obj/examples/apprtc_signaling/ARDBitrateTracker.o [7/198] CXX obj/api/audio_codecs/opus/audio_encoder_opus/audio_encoder_opus.o [8/198] CXX obj/api/audio_codecs/opus/audio_decoder_opus/audio_decoder_opus.o [9/198] OBJC obj/examples/apprtc_signaling/ARDAppClient.o [10/198] OBJC obj/examples/apprtc_signaling/RTCMediaConstraints+JSON.o [11/198] OBJC obj/examples/AppRTCMobile_lib/APPRTCAppDelegate.o FAILED: obj/examples/AppRTCMobile_lib/APPRTCAppDelegate.o ../../third_party/llvm-build/Release+Asserts/bin/clang -MMD -MF obj/examples/AppRTCMobile_lib/APPRTCAppDelegate.o.d -DV8_DEPRECATION_WARNINGS -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -D_LIBCPP_HAS_NO_ALIGNED_ALLOCATION -DCR_XCODE_VERSION=1121 -DCR_CLANG_REVISION=\"332335-1\" -DSTDC_CONSTANT_MACROS -DSTDC_FORMAT_MACROS -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -DWEBRTC_ENABLE_PROTOBUF=1 -DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE -DHAVE_SCTP -DUSE_BUILTIN_SW_CODECS -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=1 -DWEBRTC_POSIX -DWEBRTC_MAC -I../.. -Igen -I../../third_party/libyuv/include -I../../examples/objc/AppRTCMobile/common -I../../examples/objc/AppRTCMobile -I../../sdk/objc/Framework/Classes -I../../sdk/objc/Framework/Classes/Audio -I../../sdk/objc/Framework/Classes/Common -I../../sdk/objc/Framework/Classes/Metal -I../../sdk/objc/Framework/Classes/PeerConnection -I../../sdk/objc/Framework/Classes/UI -I../../sdk/objc/Framework/Classes/Video -I../../sdk/objc/Framework/Classes/VideoToolbox -I../../sdk/objc/Framework/Headers -fno-strict-aliasing -fstack-protector-strong -Wno-builtin-macro-redefined -DDATE= -DTIME= -DTIMESTAMP= -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -arch x86_64 -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wunguarded-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wno-enum-compare-switch -Wno-null-pointer-arithmetic -Wno-ignored-pragma-optimize -O0 -fno-omit-frame-pointer -gdwarf-2 -isysroot ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.9.0 -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang enforce-in-thirdparty-webkit -Xclang -plugin-arg-find-bad-constructs -Xclang check-enum-max-value -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wc++11-narrowing -Wimplicit-fallthrough -Wthread-safety -Winconsistent-missing-override -Wundef -Wunused-lambda-capture -Wno-sign-compare -Wno-unused-variable -Wstrict-overflow -Wmissing-field-initializers -std=c11 -Wobjc-missing-property-synthesis -Wstrict-prototypes -fobjc-arc -c ../../examples/objc/AppRTCMobile/mac/APPRTCAppDelegate.m -o obj/examples/AppRTCMobile_lib/APPRTCAppDelegate.o In file included from ../../examples/objc/AppRTCMobile/mac/APPRTCAppDelegate.m:11: In file included from ../../examples/objc/AppRTCMobile/mac/APPRTCAppDelegate.h:11: In file included from ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13: In file included from ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:12: ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKitErrors.h:10:1: error: expected '(' API_UNAVAILABLE_BEGIN(ios) ^ ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/os/availability.h:104:40: note: expanded from macro 'API_UNAVAILABLE_BEGIN'

define API_UNAVAILABLE_BEGIN(...) _Pragma("clang attribute push") API_UNAVAILABLE_BEGIN_GET_MACRO(VA_ARGS,API_UNAVAILABLE_BEGIN7,API_UNAVAILABLE_BEGIN6, API_UNAVAILABLE_BEGIN5, API_UNAVAILABLE_BEGIN4, API_UNAVAILABLE_BEGIN3, API_UNAVAILABLE_BEGIN2, API_UNAVAILABLE_BEGIN1, 0)(__VA_ARGS__)

                                   ^
:92:22: note: expanded from here clang attribute push ^ In file included from ../../examples/objc/AppRTCMobile/mac/APPRTCAppDelegate.m:11: In file included from ../../examples/objc/AppRTCMobile/mac/APPRTCAppDelegate.h:11: In file included from ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13: In file included from ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:12: ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKitErrors.h:10:1: error: expected 'push' or 'pop' after '#pragma clang attribute' ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/os/availability.h:104:273: note: expanded from macro 'API_UNAVAILABLE_BEGIN' #define API_UNAVAILABLE_BEGIN(...) _Pragma("clang attribute push") __API_UNAVAILABLE_BEGIN_GET_MACRO(__VA_ARGS__,__API_UNAVAILABLE_BEGIN7,__API_UNAVAILABLE_BEGIN6, __API_UNAVAILABLE_BEGIN5, __API_UNAVAILABLE_BEGIN4, __API_UNAVAILABLE_BEGIN3, __API_UNAVAILABLE_BEGIN2, __API_UNAVAILABLE_BEGIN1, 0)(__VA_ARGS__) ^ In file included from ../../examples/objc/AppRTCMobile/mac/APPRTCAppDelegate.m:11: In file included from ../../examples/objc/AppRTCMobile/mac/APPRTCAppDelegate.h:11: In file included from ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13: In file included from ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:13: In file included from ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSGraphicsContext.h:9: ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:12:1: error: expected '(' API_UNAVAILABLE_BEGIN(ios) ^ ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/os/availability.h:104:40: note: expanded from macro 'API_UNAVAILABLE_BEGIN' #define API_UNAVAILABLE_BEGIN(...) _Pragma("clang attribute push") __API_UNAVAILABLE_BEGIN_GET_MACRO(__VA_ARGS__,__API_UNAVAILABLE_BEGIN7,__API_UNAVAILABLE_BEGIN6, __API_UNAVAILABLE_BEGIN5, __API_UNAVAILABLE_BEGIN4, __API_UNAVAILABLE_BEGIN3, __API_UNAVAILABLE_BEGIN2, __API_UNAVAILABLE_BEGIN1, 0)(__VA_ARGS__) ^ :108:22: note: expanded from here clang attribute push ^ In file included from ../../examples/objc/AppRTCMobile/mac/APPRTCAppDelegate.m:11: In file included from ../../examples/objc/AppRTCMobile/mac/APPRTCAppDelegate.h:11: In file included from ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13: In file included from ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:13: In file included from ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSGraphicsContext.h:9: ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:12:1: error: expected 'push' or 'pop' after '#pragma clang attribute' ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/os/availability.h:104:273: note: expanded from macro 'API_UNAVAILABLE_BEGIN' #define API_UNAVAILABLE_BEGIN(...) _Pragma("clang attribute push") __API_UNAVAILABLE_BEGIN_GET_MACRO(__VA_ARGS__,__API_UNAVAILABLE_BEGIN7,__API_UNAVAILABLE_BEGIN6, __API_UNAVAILABLE_BEGIN5, __API_UNAVAILABLE_BEGIN4, __API_UNAVAILABLE_BEGIN3, __API_UNAVAILABLE_BEGIN2, __API_UNAVAILABLE_BEGIN1, 0)(__VA_ARGS__) ^ In file included from ../../examples/objc/AppRTCMobile/mac/APPRTCAppDelegate.m:11: In file included from ../../examples/objc/AppRTCMobile/mac/APPRTCAppDelegate.h:11: In file included from ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13: In file included from ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:12: ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKitErrors.h:53:1: error: '#pragma clang attribute pop' with no matching '#pragma clang attribute push' API_UNAVAILABLE_END ^ ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/os/availability.h:105:33: note: expanded from macro 'API_UNAVAILABLE_END' #define API_UNAVAILABLE_END _Pragma("clang attribute pop") ^ :104:8: note: expanded from here clang attribute pop ^ In file included from ../../examples/objc/AppRTCMobile/mac/APPRTCAppDelegate.m:11: In file included from ../../examples/objc/AppRTCMobile/mac/APPRTCAppDelegate.h:11: In file included from ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13: In file included from ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:13: ../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AppKit.framework/Headers/
tiny-ricky-fysq commented 4 years ago

请问下 macos 版本下 xcode debug 打断点 无效,是否遇到类似问题

xiaoyunque commented 4 years ago

@tiny-ricky-fysq 请问下 macos 版本下 xcode debug 打断点 无效,是否遇到类似问题

请问后来怎么解决的呢?我也打断点无效

cxm19881208 commented 3 years ago

../../third_party/llvm-build/Release+Asserts/include/c++/v1/wchar.h:165:60: error: unknown type name 'size_t' wchar_t __libcpp_wmemchr(const wchar_t s, wchar_t __c, size_t n) {return (wchar_t)wmemchr(s, c, __n);} ^ ../../third_party/llvm-build/Release+Asserts/include/c++/v1/wchar.h:167:57: error: unknown type name 'size_t' const wchar_t wmemchr(const wchar_t s, wchar_t __c, size_t n) {return __libcpp_wmemchr(s, c, __n);} ^ ../../third_party/llvm-build/Release+Asserts/include/c++/v1/wchar.h:169:57: error: unknown type name 'size_t' wchar_t wmemchr( wchar_t* s, wchar_t __c, size_t n) {return __libcpp_wmemchr(s, c, n);} ^ In file included from ../../api/video/video_stream_encoder_create.cc:11: In file included from ../../api/video/video_stream_encoder_create.h:14: In file included from ../../third_party/llvm-build/Release+Asserts/include/c++/v1/map:473: In file included from ../../third_party/llvm-build/Release+Asserts/include/c++/v1/tree:15: In file included from ../../third_party/llvm-build/Release+Asserts/include/c++/v1/iterator:416: ../../third_party/llvm-build/Release+Asserts/include/c++/v1/iosfwd:176:14: error: use of undeclared identifier 'mbstate_t' typedef fpos streampos; ^ ../../third_party/llvm-build/Release+Asserts/include/c++/v1/iosfwd:177:14: error: use of undeclared identifier 'mbstate_t' typedef fpos wstreampos; ^ ../../third_party/llvm-build/Release+Asserts/include/c++/v1/iosfwd:179:14: error: use of undeclared identifier 'mbstate_t' typedef fpos u16streampos; ^ ../../third_party/llvm-build/Release+Asserts/include/c++/v1/iosfwd:180:14: error: use of undeclared identifier 'mbstate_t' 我这里编译framework为什么c++文件都报错找不到定义