为 iPhone 为 arm64 构建用于 pjsip 的 libyuv
Building libyuv for pjsip for iPhone for arm64
我一直在尝试为 arm64 架构构建 Libyuv,然后将其集成到 PJSIP 库中。但我没有取得任何进展,因为 Pjsip 无法找到 libyuv.a
框架。
在配置 Pjsip 构建时,我使用以下命令:
ARCH='-arch arm64' ./configure-iphone --with-libyuv=/Users/Mayur/Desktop/pjsip/externals/libyuv/out_ios/Release-iphoneos
这是 libyuv.a
所在的文件夹。
但是,在配置时,出现了这一行:
checking for I420Scale in -lyuv... no
对这里的问题有什么建议吗?
参考文献:
为 iPhone 构建 Pjsip : https://trac.pjsip.org/repos/wiki/Getting-Started/iPhone
构建 libyuv : https://trac.pjsip.org/repos/ticket/1776
更新
这就是我构建的方式libyuv.a
GYP_DEFINES="OS=ios target_arch=arm64 target_subarch=arm64" GYP_CROSSCOMPILE=1 GYP_GENERATOR_FLAGS="output_dir=out_ios" ./gyp_libyuv -f 忍者 - -深度=。 libyuv_test.gyp
ninja -j7 -C out_ios/Release-iphoneos libyuv_unittest
这成功创建了库,但我没有找到连接该库的正确方法!
事实证明,如果您使用 PJSIP 的最新版本并按照问题中的描述安装 libyuv
框架,它就可以完美构建。
只需检查修订版 5128,使用以下命令:
svn checkout -r 5128 http://svn.pjsip.org/repos/pjproject/trunk pjproject
它还包含 iOS!
方向的修复
使用以下脚本构建 PJSIP 库。
步骤:
- 复制脚本并制作 .sh 文件。
- 复制 PJSIP Lib 文件夹中的 .sh 文件。
- 运行 chmod 777 .sh_filename
- 运行 脚本 (e.x ./pjsip_auto_2.6.sh)
#!/bin/sh
BASE_DIR=$(pwd)
# Create config_site.h file in path
echo "#define PJ_CONFIG_IPHONE 1
#define PJ_HAS_IPV6 1
#include <pj/config_site_sample.h>" > pjlib/include/pj/config_site.h
# Compile Library and Build For Default iPhone 4 use armv7 architecture
./configure-iphone && make dep && make clean && make
# Build For iPhone 5, use armv7s architecture
ARCH='-arch armv7s' ./configure-iphone && make dep && make clean && make
# Build For iPhone 5s, use arm64 architecture
ARCH='-arch arm64' ./configure-iphone && make dep && make clean && make
# Build For Simulator, use i386 architecture
export DEVPATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
ARCH="-arch i386" CFLAGS="-O2 -m32 -mios-simulator-version-min=5.0" LDFLAGS="-O2 -m32 -mios-simulator-version-min=5.0" ./configure-iphone
make dep && make clean && make
# Build For Simulator, use x86_64 architecture
export DEVPATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
ARCH="-arch x86_64" CFLAGS="-O2 -m32 -mios-simulator-version-min=5.0" LDFLAGS="-O2 -m32 -mios-simulator-version-min=5.0" ./configure-iphone
make dep && make clean && make
# Create (arm64,armv7,armv7s,i386, x86_64, unified) Folder
if [ ! -d libs/arm64 ];
then
mkdir -p libs/arm64
echo "arm64 Folder created"
else
echo "arm64 Folder exists"
fi
if [ ! -d libs/armv7 ];
then
mkdir -p libs/armv7
echo "armv7 Folder created"
else
echo "armv7 Folder exists"
fi
if [ ! -d libs/armv7s ];
then
mkdir -p libs/armv7s
echo "armv7s Folder created"
else
echo "armv7s Folder exists"
fi
if [ ! -d libs/i386 ];
then
mkdir -p libs/i386
echo "i386 Folder created"
else
echo "i386 Folder exists"
fi
if [ ! -d libs/x86_64 ];
then
mkdir -p libs/x86_64
echo "x86_64 Folder created"
else
echo "x86_64 Folder exists"
fi
if [ ! -d libs/unified ];
then
mkdir -p libs/unified
echo "unified Folder created"
else
echo "unified Folder exists"
fi
# Copy From pjlib folder to Libs
cp pjlib/lib/*-arm64-apple-darwin_ios.a libs/arm64/
cp pjlib/lib/*-armv7-apple-darwin_ios.a libs/armv7/
cp pjlib/lib/*-armv7s-apple-darwin_ios.a libs/armv7s/
cp pjlib/lib/*-i386-apple-darwin_ios.a libs/i386/
cp pjlib/lib/*-x86_64-apple-darwin_ios.a libs/x86_64/
# Copy From pjlib-util folder to Libs
cp pjlib-util/lib/*-arm64-apple-darwin_ios.a libs/arm64/
cp pjlib-util/lib/*-armv7-apple-darwin_ios.a libs/armv7/
cp pjlib-util/lib/*-armv7s-apple-darwin_ios.a libs/armv7s/
cp pjlib-util/lib/*-i386-apple-darwin_ios.a libs/i386/
cp pjlib-util/lib/*-x86_64-apple-darwin_ios.a libs/x86_64/
# Copy From pjmedia folder to Libs
cp pjmedia/lib/*-arm64-apple-darwin_ios.a libs/arm64/
cp pjmedia/lib/*-armv7-apple-darwin_ios.a libs/armv7/
cp pjmedia/lib/*-armv7s-apple-darwin_ios.a libs/armv7s/
cp pjmedia/lib/*-i386-apple-darwin_ios.a libs/i386/
cp pjmedia/lib/*-x86_64-apple-darwin_ios.a libs/x86_64/
# Copy From pjnath folder to Libs
cp pjnath/lib/*-arm64-apple-darwin_ios.a libs/arm64/
cp pjnath/lib/*-armv7-apple-darwin_ios.a libs/armv7/
cp pjnath/lib/*-armv7s-apple-darwin_ios.a libs/armv7s/
cp pjnath/lib/*-i386-apple-darwin_ios.a libs/i386/
cp pjnath/lib/*-x86_64-apple-darwin_ios.a libs/x86_64/
# Copy From pjsip folder to Libs
cp pjsip/lib/*-arm64-apple-darwin_ios.a libs/arm64/
cp pjsip/lib/*-armv7-apple-darwin_ios.a libs/armv7/
cp pjsip/lib/*-armv7s-apple-darwin_ios.a libs/armv7s/
cp pjsip/lib/*-i386-apple-darwin_ios.a libs/i386/
cp pjsip/lib/*-x86_64-apple-darwin_ios.a libs/x86_64/
# Copy From third_party folder to Libs
cp third_party/lib/*-arm64-apple-darwin_ios.a libs/arm64/
cp third_party/lib/*-armv7-apple-darwin_ios.a libs/armv7/
cp third_party/lib/*-armv7s-apple-darwin_ios.a libs/armv7s/
cp third_party/lib/*-i386-apple-darwin_ios.a libs/i386/
cp third_party/lib/*-x86_64-apple-darwin_ios.a libs/x86_64/
# Rename file name From Created folder
cd $BASE_DIR/libs/arm64/
rename 's/\-arm64\-apple\-darwin_ios//g' *.a
cd $BASE_DIR/libs/armv7/
rename 's/\-armv7\-apple\-darwin_ios//g' *.a
cd $BASE_DIR/libs/armv7s/
rename 's/\-armv7s\-apple\-darwin_ios//g' *.a
cd $BASE_DIR/libs/i386/
rename 's/\-i386\-apple\-darwin_ios//g' *.a
cd $BASE_DIR/libs/x86_64/
rename 's/\-x86_64\-apple\-darwin_ios//g' *.a
cd $BASE_DIR/libs/
# Combine Libs to united folder
export LIB_NAME="libg7221codec.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libgsmcodec.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libilbccodec.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpj.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjlib-util.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjmedia-audiodev.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjmedia-codec.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjmedia-videodev.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjmedia.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjnath.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjsdp.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjsip-simple.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjsip-ua.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjsip.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjsua.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjsua2.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libresample.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libspeex.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libsrtp.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libyuv.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libwebrtc.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
echo 'Congratulation you have built PJSIP Library successfully'
从 PJSIP 2.5.5 开始,libyuv 包含在 PJSIP 包中,配置脚本参数 --with-libyuv 被删除,查看票 #1937 了解更多信息。
我一直在尝试为 arm64 架构构建 Libyuv,然后将其集成到 PJSIP 库中。但我没有取得任何进展,因为 Pjsip 无法找到 libyuv.a
框架。
在配置 Pjsip 构建时,我使用以下命令:
ARCH='-arch arm64' ./configure-iphone --with-libyuv=/Users/Mayur/Desktop/pjsip/externals/libyuv/out_ios/Release-iphoneos
这是 libyuv.a
所在的文件夹。
但是,在配置时,出现了这一行:
checking for I420Scale in -lyuv... no
对这里的问题有什么建议吗?
参考文献:
为 iPhone 构建 Pjsip : https://trac.pjsip.org/repos/wiki/Getting-Started/iPhone
构建 libyuv : https://trac.pjsip.org/repos/ticket/1776
更新
这就是我构建的方式libyuv.a
GYP_DEFINES="OS=ios target_arch=arm64 target_subarch=arm64" GYP_CROSSCOMPILE=1 GYP_GENERATOR_FLAGS="output_dir=out_ios" ./gyp_libyuv -f 忍者 - -深度=。 libyuv_test.gyp
ninja -j7 -C out_ios/Release-iphoneos libyuv_unittest
这成功创建了库,但我没有找到连接该库的正确方法!
事实证明,如果您使用 PJSIP 的最新版本并按照问题中的描述安装 libyuv
框架,它就可以完美构建。
只需检查修订版 5128,使用以下命令:
svn checkout -r 5128 http://svn.pjsip.org/repos/pjproject/trunk pjproject
它还包含 iOS!
方向的修复使用以下脚本构建 PJSIP 库。
步骤:
- 复制脚本并制作 .sh 文件。
- 复制 PJSIP Lib 文件夹中的 .sh 文件。
- 运行 chmod 777 .sh_filename
- 运行 脚本 (e.x ./pjsip_auto_2.6.sh)
#!/bin/sh
BASE_DIR=$(pwd)
# Create config_site.h file in path
echo "#define PJ_CONFIG_IPHONE 1
#define PJ_HAS_IPV6 1
#include <pj/config_site_sample.h>" > pjlib/include/pj/config_site.h
# Compile Library and Build For Default iPhone 4 use armv7 architecture
./configure-iphone && make dep && make clean && make
# Build For iPhone 5, use armv7s architecture
ARCH='-arch armv7s' ./configure-iphone && make dep && make clean && make
# Build For iPhone 5s, use arm64 architecture
ARCH='-arch arm64' ./configure-iphone && make dep && make clean && make
# Build For Simulator, use i386 architecture
export DEVPATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
ARCH="-arch i386" CFLAGS="-O2 -m32 -mios-simulator-version-min=5.0" LDFLAGS="-O2 -m32 -mios-simulator-version-min=5.0" ./configure-iphone
make dep && make clean && make
# Build For Simulator, use x86_64 architecture
export DEVPATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
ARCH="-arch x86_64" CFLAGS="-O2 -m32 -mios-simulator-version-min=5.0" LDFLAGS="-O2 -m32 -mios-simulator-version-min=5.0" ./configure-iphone
make dep && make clean && make
# Create (arm64,armv7,armv7s,i386, x86_64, unified) Folder
if [ ! -d libs/arm64 ];
then
mkdir -p libs/arm64
echo "arm64 Folder created"
else
echo "arm64 Folder exists"
fi
if [ ! -d libs/armv7 ];
then
mkdir -p libs/armv7
echo "armv7 Folder created"
else
echo "armv7 Folder exists"
fi
if [ ! -d libs/armv7s ];
then
mkdir -p libs/armv7s
echo "armv7s Folder created"
else
echo "armv7s Folder exists"
fi
if [ ! -d libs/i386 ];
then
mkdir -p libs/i386
echo "i386 Folder created"
else
echo "i386 Folder exists"
fi
if [ ! -d libs/x86_64 ];
then
mkdir -p libs/x86_64
echo "x86_64 Folder created"
else
echo "x86_64 Folder exists"
fi
if [ ! -d libs/unified ];
then
mkdir -p libs/unified
echo "unified Folder created"
else
echo "unified Folder exists"
fi
# Copy From pjlib folder to Libs
cp pjlib/lib/*-arm64-apple-darwin_ios.a libs/arm64/
cp pjlib/lib/*-armv7-apple-darwin_ios.a libs/armv7/
cp pjlib/lib/*-armv7s-apple-darwin_ios.a libs/armv7s/
cp pjlib/lib/*-i386-apple-darwin_ios.a libs/i386/
cp pjlib/lib/*-x86_64-apple-darwin_ios.a libs/x86_64/
# Copy From pjlib-util folder to Libs
cp pjlib-util/lib/*-arm64-apple-darwin_ios.a libs/arm64/
cp pjlib-util/lib/*-armv7-apple-darwin_ios.a libs/armv7/
cp pjlib-util/lib/*-armv7s-apple-darwin_ios.a libs/armv7s/
cp pjlib-util/lib/*-i386-apple-darwin_ios.a libs/i386/
cp pjlib-util/lib/*-x86_64-apple-darwin_ios.a libs/x86_64/
# Copy From pjmedia folder to Libs
cp pjmedia/lib/*-arm64-apple-darwin_ios.a libs/arm64/
cp pjmedia/lib/*-armv7-apple-darwin_ios.a libs/armv7/
cp pjmedia/lib/*-armv7s-apple-darwin_ios.a libs/armv7s/
cp pjmedia/lib/*-i386-apple-darwin_ios.a libs/i386/
cp pjmedia/lib/*-x86_64-apple-darwin_ios.a libs/x86_64/
# Copy From pjnath folder to Libs
cp pjnath/lib/*-arm64-apple-darwin_ios.a libs/arm64/
cp pjnath/lib/*-armv7-apple-darwin_ios.a libs/armv7/
cp pjnath/lib/*-armv7s-apple-darwin_ios.a libs/armv7s/
cp pjnath/lib/*-i386-apple-darwin_ios.a libs/i386/
cp pjnath/lib/*-x86_64-apple-darwin_ios.a libs/x86_64/
# Copy From pjsip folder to Libs
cp pjsip/lib/*-arm64-apple-darwin_ios.a libs/arm64/
cp pjsip/lib/*-armv7-apple-darwin_ios.a libs/armv7/
cp pjsip/lib/*-armv7s-apple-darwin_ios.a libs/armv7s/
cp pjsip/lib/*-i386-apple-darwin_ios.a libs/i386/
cp pjsip/lib/*-x86_64-apple-darwin_ios.a libs/x86_64/
# Copy From third_party folder to Libs
cp third_party/lib/*-arm64-apple-darwin_ios.a libs/arm64/
cp third_party/lib/*-armv7-apple-darwin_ios.a libs/armv7/
cp third_party/lib/*-armv7s-apple-darwin_ios.a libs/armv7s/
cp third_party/lib/*-i386-apple-darwin_ios.a libs/i386/
cp third_party/lib/*-x86_64-apple-darwin_ios.a libs/x86_64/
# Rename file name From Created folder
cd $BASE_DIR/libs/arm64/
rename 's/\-arm64\-apple\-darwin_ios//g' *.a
cd $BASE_DIR/libs/armv7/
rename 's/\-armv7\-apple\-darwin_ios//g' *.a
cd $BASE_DIR/libs/armv7s/
rename 's/\-armv7s\-apple\-darwin_ios//g' *.a
cd $BASE_DIR/libs/i386/
rename 's/\-i386\-apple\-darwin_ios//g' *.a
cd $BASE_DIR/libs/x86_64/
rename 's/\-x86_64\-apple\-darwin_ios//g' *.a
cd $BASE_DIR/libs/
# Combine Libs to united folder
export LIB_NAME="libg7221codec.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libgsmcodec.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libilbccodec.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpj.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjlib-util.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjmedia-audiodev.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjmedia-codec.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjmedia-videodev.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjmedia.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjnath.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjsdp.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjsip-simple.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjsip-ua.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjsip.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjsua.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libpjsua2.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libresample.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libspeex.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libsrtp.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libyuv.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
export LIB_NAME="libwebrtc.a"
lipo -arch armv7 armv7/$LIB_NAME -arch armv7s armv7s/$LIB_NAME -arch arm64 arm64/$LIB_NAME -arch i386 i386/$LIB_NAME -arch x86_64 x86_64/$LIB_NAME -create -output unified/$LIB_NAME
echo 'Congratulation you have built PJSIP Library successfully'
从 PJSIP 2.5.5 开始,libyuv 包含在 PJSIP 包中,配置脚本参数 --with-libyuv 被删除,查看票 #1937 了解更多信息。