Can';t在支持SIMD/NEON的Xcode 5/Clang工具链上编译iOS版libjpeg turbo

Can';t在支持SIMD/NEON的Xcode 5/Clang工具链上编译iOS版libjpeg turbo,ios,xcode,clang,libjpeg-turbo,Ios,Xcode,Clang,Libjpeg Turbo,与Xcode 5和LLVM-GCC-4.2的删除以及Clang对其的替换类似,为iOS设备构建libjpeg-turbo现在在编译NEON支持时失败 配置步骤: export PLATFORM="iPhoneOS" export IPHONE_SDK="7.0" export IPHONE_MIN_VERSION="5.0" export DEVELOPER=`xcode-select --print-path` export DEVROOT="${DEVELOPER}/Platforms/$

与Xcode 5和LLVM-GCC-4.2的删除以及Clang对其的替换类似,为iOS设备构建libjpeg-turbo现在在编译NEON支持时失败

配置步骤:

export PLATFORM="iPhoneOS"
export IPHONE_SDK="7.0"
export IPHONE_MIN_VERSION="5.0"

export DEVELOPER=`xcode-select --print-path`
export DEVROOT="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer"
export SDKROOT="${DEVROOT}/SDKs/${PLATFORM}${IPHONE_SDK}.sdk"
export CC=`xcrun -find gcc`
export LD=`xcrun -find ld`
export IOS_CFLAGS="-arch armv7"
export CFLAGS="-O3 ${IOS_CFLAGS} -isysroot ${SDKROOT}"
export LDFLAGS="${IOS_CFLAGS} -isysroot ${SDKROOT}"
export CPPFLAGS="${CFLAGS}"
export CFLAGS="${CFLAGS} -miphoneos-version-min=${IPHONE_MIN_VERSION}"

./configure --with-jpeg8 --host arm-apple-darwin --enable-static --disable-shared
...
checking if we have SIMD optimisations for cpu type... yes (arm)
checking if the assembler is GNU-compatible and can be used... yes
...
构建步骤:

make -j4
    /Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in java
echo timestamp > classnodist_noinst.stamp
Making all in simd
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -E -I.. -I../simd ./jsimdcfg.inc.h | grep -E "^[\;%]|^\ %" | sed 's%_cpp_protection_%%' | sed 's@% define@%define@g' > jsimdcfg.inc
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
if /bin/sh ../libtool --mode=compile --tag=CC /Applications/Xcode.app/Contents/Developer/usr/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. -I..  -I..  -O3 -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk  -O3 -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -miphoneos-version-min=5.0 -MT jsimd_arm.lo -MD -MP -MF ".deps/jsimd_arm.Tpo" -c -o jsimd_arm.lo jsimd_arm.c; \
    then mv -f ".deps/jsimd_arm.Tpo" ".deps/jsimd_arm.Plo"; else rm -f ".deps/jsimd_arm.Tpo"; exit 1; fi
/bin/sh ../libtool --mode=compile gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/usr/bin/gcc  -O3 -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -miphoneos-version-min=5.0 -c -o jsimd_arm_neon.lo jsimd_arm_neon.S
libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'
make[3]: *** [jsimd_arm_neon.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
 /Applications/Xcode.app/Contents/Developer/usr/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -O3 -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -O3 -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -miphoneos-version-min=5.0 -MT jsimd_arm.lo -MD -MP -MF .deps/jsimd_arm.Tpo -c jsimd_arm.c -o jsimd_arm.o
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

你知道怎么解决这个问题吗?如果禁用SIMD支持,则构建会成功,但这显然不太好。

在OSX上交叉编译iOS时存在一个已知问题:

简而言之,你需要跑步

$autoreconf-fiv

在运行configure之前,在libjpeg-turbo目录中

在OSX 10.9和Xcode 5上,以下是成功编译库所需的工具版本。新版本将无法工作

  • autoconf 2.69
  • nasm 2.08.01
  • 汽车制造1.13
或者,您可以只使用DMG附带的预构建二进制文件:

在OSX上交叉编译iOS时存在一个已知问题:

简而言之,你需要跑步

$autoreconf-fiv

在运行configure之前,在libjpeg-turbo目录中

在OSX 10.9和Xcode 5上,以下是成功编译库所需的工具版本。新版本将无法工作

  • autoconf 2.69
  • nasm 2.08.01
  • 汽车制造1.13
或者,您可以只使用DMG附带的预构建二进制文件:

它已由libjpeg-turbo的维护人员修复:

我们需要的是一种与CLANG兼容的气体预处理器:

它已由libjpeg-turbo的维护人员修复:

我们需要的是一种与CLANG兼容的气体预处理器:

在安装autoconf、automake和libtool后,我让“autoreconf-fiv”正常工作,但libjpeg turbo 1.3.0仍然没有按照building.txt中的说明进行构建(包括修复IOS_GCC以指向Xcode 5中的新GCC工具位置):“配置在检查C编译器是否工作时失败…否”。如果你能为iOS交叉编译,你能提供完整的说明吗?你能附加'config.log'吗?它显示了控制台中打印的更多信息。这是构建脚本()和输出()。我还在libjpeg-turbo用户邮件列表中询问:我在安装autoconf、automake和libtool后让“autoeconf-fiv”工作,但libjpeg-turbo 1.3.0仍然没有按照building.txt中的说明进行构建(包括修复IOS_GCC以指向Xcode 5中新的GCC工具位置):“配置在检查C编译器是否工作时失败…否”。如果您能够为IOS交叉编译,您可以提供完整的说明吗?能否附加'config.log'?它显示了控制台中打印的更多信息。这是构建脚本()和输出()我还在libjpeg turbo用户邮件列表中询问: