Cross compile webrtc for ios on mac os.
2013-11-06 23:07
465 查看
编译步骤
下载depot_tools
svn co http://src.chromium.org/svn/trunk/tools/depot_tools
设置PATH变量
export PATH=$PATH:`pwd`/depot_tools
设置代码路径
gclient config http://webrtc.googlecode.com/svn/trunk
设置项目组织方式为xcode
export GYP_GENERATORS="xcode"
开始同步代码
gclient sync --nohooks
gclient runhook --force
生成支持ios的项目文件
./build/gyp_chromium --depth=. -DOS=ios -Dtarget_arch=arm -Dinclude_tests=0 -Denable_protobuf=0 -Denable_video=1 webrtc/webrtc.gyp
gclient runhook 后遇到的问题
bogon:trunk probestar$ ./build/gyp_chromium --depth=. -DOS=ios -Dtarget_arch=arm -Dinclude_tests=0 -Denable_protobuf=0 -Denable_video=1 webrtc/webrtc.gyp
Updating projects from gyp files...
Traceback (most recent call last):
File "./build/gyp_chromium", line 161, in <module>
sys.exit(gyp.main(args))
File "/Users/probestar/Documents/WorkSpace/webrtc/trunk/tools/gyp/pylib/gyp/__init__.py", line 527, in main
return gyp_main(args)
File "/Users/probestar/Documents/WorkSpace/webrtc/trunk/tools/gyp/pylib/gyp/__init__.py", line 512, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "/Users/probestar/Documents/WorkSpace/webrtc/trunk/tools/gyp/pylib/gyp/generator/ninja.py", line 2133, in GenerateOutput
pool.map(CallGenerateOutputForConfig, arglists)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 225, in map
return self.map_async(func, iterable, chunksize).get()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 522, in get
raise self._value
AssertionError: Multiple codesigning identities for identity: iPhone Developer
多个iPhone Developer证书,在Mac OS中的钥匙串中删除多余的证书即可。
报错
Traceback (most recent call last):
File "trunk/build/gyp_chromium", line 148, in <module>
not 'OS=ios' in os.environ.get('GYP_DEFINES'):
TypeError: argument of type 'NoneType' is not iterable
Error: Command /usr/bin/python trunk/build/gyp_chromium --depth=trunk trunk/all.gyp -Dextra_gyp_flag=0 returned non-zero exit status 1 in /Users/probestar/Documents/WorkSpace/webrtc
没有做环境配置
export GYP_DEFINES="$GYP_DEFINES OS=ios target_arch=armv7"
export GYP_GENERATOR_FLAGS="$GYP_GENERATOR_FLAGS output_dir=out_ios"
export GYP_CROSSCOMPILE=1
cd trunk
export GYP_DEFINES="build_with_libjingle=1 build_with_chromium=0 libjingle_objc=1"
export GYP_GENERATORS="xcode"
gclient runhook -- force
没有生成项目文件
缺少环境配置,默认生成ninja的项目
export GYP_GENERATORS="xcode"
gclient runhook 阶段报错
Updating projects from gyp files...
gyp: trunk/third_party/libsrtp/libsrtp.gyp not found (cwd: /Users/probestar/Documents/WorkSpace/webrtc)
Error: Command /usr/bin/python trunk/build/gyp_chromium --depth=trunk trunk/all.gyp -Dextra_gyp_flag=0 returned non-zero exit status 1 in /Users/probestar/Documents/WorkSpace/webrtc
缺少文件,删除.gclient中的target_os一行,重新gclient sync即可
下载depot_tools
svn co http://src.chromium.org/svn/trunk/tools/depot_tools
设置PATH变量
export PATH=$PATH:`pwd`/depot_tools
设置代码路径
gclient config http://webrtc.googlecode.com/svn/trunk
设置项目组织方式为xcode
export GYP_GENERATORS="xcode"
开始同步代码
gclient sync --nohooks
gclient runhook --force
生成支持ios的项目文件
./build/gyp_chromium --depth=. -DOS=ios -Dtarget_arch=arm -Dinclude_tests=0 -Denable_protobuf=0 -Denable_video=1 webrtc/webrtc.gyp
gclient runhook 后遇到的问题
bogon:trunk probestar$ ./build/gyp_chromium --depth=. -DOS=ios -Dtarget_arch=arm -Dinclude_tests=0 -Denable_protobuf=0 -Denable_video=1 webrtc/webrtc.gyp
Updating projects from gyp files...
Traceback (most recent call last):
File "./build/gyp_chromium", line 161, in <module>
sys.exit(gyp.main(args))
File "/Users/probestar/Documents/WorkSpace/webrtc/trunk/tools/gyp/pylib/gyp/__init__.py", line 527, in main
return gyp_main(args)
File "/Users/probestar/Documents/WorkSpace/webrtc/trunk/tools/gyp/pylib/gyp/__init__.py", line 512, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "/Users/probestar/Documents/WorkSpace/webrtc/trunk/tools/gyp/pylib/gyp/generator/ninja.py", line 2133, in GenerateOutput
pool.map(CallGenerateOutputForConfig, arglists)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 225, in map
return self.map_async(func, iterable, chunksize).get()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 522, in get
raise self._value
AssertionError: Multiple codesigning identities for identity: iPhone Developer
多个iPhone Developer证书,在Mac OS中的钥匙串中删除多余的证书即可。
报错
Traceback (most recent call last):
File "trunk/build/gyp_chromium", line 148, in <module>
not 'OS=ios' in os.environ.get('GYP_DEFINES'):
TypeError: argument of type 'NoneType' is not iterable
Error: Command /usr/bin/python trunk/build/gyp_chromium --depth=trunk trunk/all.gyp -Dextra_gyp_flag=0 returned non-zero exit status 1 in /Users/probestar/Documents/WorkSpace/webrtc
没有做环境配置
export GYP_DEFINES="$GYP_DEFINES OS=ios target_arch=armv7"
export GYP_GENERATOR_FLAGS="$GYP_GENERATOR_FLAGS output_dir=out_ios"
export GYP_CROSSCOMPILE=1
cd trunk
export GYP_DEFINES="build_with_libjingle=1 build_with_chromium=0 libjingle_objc=1"
export GYP_GENERATORS="xcode"
gclient runhook -- force
没有生成项目文件
缺少环境配置,默认生成ninja的项目
export GYP_GENERATORS="xcode"
gclient runhook 阶段报错
Updating projects from gyp files...
gyp: trunk/third_party/libsrtp/libsrtp.gyp not found (cwd: /Users/probestar/Documents/WorkSpace/webrtc)
Error: Command /usr/bin/python trunk/build/gyp_chromium --depth=trunk trunk/all.gyp -Dextra_gyp_flag=0 returned non-zero exit status 1 in /Users/probestar/Documents/WorkSpace/webrtc
缺少文件,删除.gclient中的target_os一行,重新gclient sync即可
相关文章推荐
- 《learn objective-c on the Mac for OS X and IOS》<译名>《objective-C基础教程》
- Learn Objective-C on the Mac For OS X and iOS (1)
- Set up NginX and PHP for development on Mac OS X
- Multithreading on iOS And Mac OS X Using NSOperations
- QtCreator on Windows to Cross Compile for Linux ARM with CodeSourcery Toolchain
- FFMpeg & x264 compile for using with Android NDK on Mac OSX
- Installing MSSQL Module for PHP on Mac OS X
- 转载Download iOSOpenDev for Mac OS X
- There was a problem with the editor 'vi' for Git on Mac OS X
- Appium for IOS testing on Mac
- To compile mplayer on Mac OS X
- 【Link】Building for MacOSX, but linking against dylib built for iOS Simulator file
- Compile LineageOS for Oneplus 3 on Fedora 25
- Cross Platform Development with Delphi XE7 & FireMonkey for Windows & MAC OS X
- MonoGame Cross Platform Implementation of XNA for iOS, Android, Mac , Linux, Windows, Windows8, OUYA
- 书讯: CFHipsterRef: Low-Level Programming on iOS & Mac OS X
- iOS 如何在苹果电脑上安装svn 服务器(how to install svn server on the computer of mac os x)
- compile freeswitch based on macOS
- Issue 71 - pymssql - Undefined symbols on Mac, CentOS, Redhat with pre-compiled build - A fast MS SQL Server client library for Python directly using C API instead of ODBC. It is Python DB-API 2.0 compliant. Works on Linux, *BSD, Solaris, Mac OS X and Win
- Guide for Xdebug Installation on Mac OS X