2013-12-23 37 views
4

我试图建立牡丹lib中ios7(32位和64位iOS设备)构建牡丹库ios7 arm64

我想:

./configure.py --cpu=armv7 --cc=clang --cc-bin="clang++ -arch armv7 -arch armv7s --sysroot=$(IOS_SYSROOT)" 
-bash: IOS_SYSROOT: command not found 
    INFO: Guessing target OS is darwin (use --os to set) 
    INFO: Canonicalizized --cpu=armv7 to arm/armv7 
    INFO: Target is clang-darwin-arm-armv7 
    INFO: Skipping, by request only - bzip2 cms cvc gnump openssl zlib 
    INFO: Skipping, dependency failure - dyn_engine 
    INFO: Skipping, incompatible CPU - aes_ni aes_ssse3 idea_sse2 md4_x86_32 md5_x86_32 mp_x86_32 mp_x86_64 rdrand serpent_x86_32 sha1_sse2 sha1_x86_32 sha1_x86_64 simd_altivec simd_sse2 
    INFO: Skipping, incompatible OS - asm_x86_32 asm_x86_64 beos_stats cryptoapi_rng dyn_load win32_crit_section win32_stats 
    INFO: Skipping, incompatible compiler - mp_asm64 mp_msvc64 mp_x86_32_msvc 
    INFO: Skipping, loaded only if needed by dependency - aes_isa_eng asm_engine 
    INFO: Skipping, missing TR1 - ssl 
    INFO: Using MP module mp_generic 
    INFO: Using SIMD module simd_scalar 
    INFO: Assuming CPU is little endian 
    INFO: Using symlink to link files into build directory 
    INFO: Botan 1.10.7 build setup is complete 
Claudius-MacBook-Pro:Botan-1.10.7 claudiuluminosu$ make check 
clang++ -arch armv7 -arch armv7s --sysroot= -Ibuild/include -O2 -finline-functions -D_REENTRANT -ansi -Wno-long-long -W -Wall -fPIC -fvisibility=hidden -c src/algo_base/symkey.cpp -o build/lib/algo_base_symkey.o 
In file included from src/algo_base/symkey.cpp:8: 
In file included from build/include/botan/symkey.h:11: 
In file included from build/include/botan/secmem.h:11: 
In file included from build/include/botan/allocate.h:12: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1/string:44: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1/bits/c++config.h:41: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1/bits/os_defines.h:61: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/unistd.h:71: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/_types.h:27: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/sys/_types.h:32: 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/sys/cdefs.h:655:2: error: 
     Unsupported architecture 
#error Unsupported architecture 
^ 
In file included from src/algo_base/symkey.cpp:8: 
In file included from build/include/botan/symkey.h:11: 
In file included from build/include/botan/secmem.h:11: 
In file included from build/include/botan/allocate.h:12: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1/string:44: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1/bits/c++config.h:41: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1/bits/os_defines.h:61: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/unistd.h:71: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/_types.h:27: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/sys/_types.h:33: 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/machine/_types.h:34:2: error: 
     architecture not supported 
#error architecture not supported 
^ 
In file included from src/algo_base/symkey.cpp:8: 
In file included from build/include/botan/symkey.h:11: 
In file included from build/include/botan/secmem.h:11: 
In file included from build/include/botan/allocate.h:12: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1/string:44: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1/bits/c++config.h:41: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1/bits/os_defines.h:61: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/unistd.h:71: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/_types.h:27: 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/sys/_types.h:94:9: error: 
     unknown type name '__int64_t' 
typedef __int64_t  __darwin_blkcnt_t;  /* total blocks */ 
     ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/sys/_types.h:95:9: error: 
     unknown type name '__int32_t' 
typedef __int32_t  __darwin_blksize_t;  /* preferred block size */ 
     ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/sys/_types.h:96:9: error: 
     unknown type name '__int32_t' 
typedef __int32_t  __darwin_dev_t;   /* dev_t */ 
     ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/sys/_types.h:99:9: error: 
     unknown type name '__uint32_t' 
typedef __uint32_t  __darwin_gid_t;   /* [???] process and gro... 
     ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/sys/_types.h:100:9: error: 
     unknown type name '__uint32_t' 
typedef __uint32_t  __darwin_id_t;   /* [XSI] pid_t, uid_t, o... 
     ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/sys/_types.h:101:9: error: 
     unknown type name '__uint64_t' 
typedef __uint64_t  __darwin_ino64_t;  /* [???] Used for 64 bi... 

如何获得IOS_SYSROOT配置?我使用XCode5。不应该默认设置?该怎么办?为什么它使用Mac OS X平台...

这是输出当我运行SETENV-IOS

./setenv-ios.sh 
Configuring for Device (ARMv7) 
XCODE_SDK: iPhoneOS7.0.sdk 
XCODE_DEVELOPER: /Applications/Xcode.app/Contents/Developer 
XCODE_TOOLCHAIN: /Applications/Xcode.app/Contents/Developer/usr/bin 
XCODE_DEVELOPER_TOP: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer 
IOS_ARCH: armv7 
IOS_TOOLCHAIN: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ 
IOS_SYSROOT: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk 
SYSROOT TEST: found valid sysroot, we're go for launch 
TOOL TEST: found all tools, this might actually work 

这可能实际工作......但它没有

+0

看看这是否有助于你http://stackoverflow.com/questions/18995051/how-to-build-protocol-buffer-for-ios7 – Abhishek

回答

1

我不知道但你可以给它一个尝试...

得到IOS_SYSROOT配置

如果您在命令行做:

. ./setenv-ios.sh 
export CPP="cpp" 
export CC="clang -arch armv7 -arch armv7s --sysroot=$IOS_SYSROOT" 
export CXX="clang++ -arch armv7 -arch armv7s s--sysroot=$IOS_SYSROOT" 
./configure --host=x86_64-darwin --host=arm --with-sysroot=$IOS_SYSROOT ... 

如果你想建立的ARM64,你可能会需要添加 -mios版本分钟= 7.0。在编译 Clang时,OpenSSL并不需要它,而Crypto ++和libevent以及libcurl都是这样。

+0

你从哪里得到setenv-ios.sh文件? – user1028028

+0

hi @ user1028028-请通过这个链接,它会帮助你得到setenv-ios.sh http://www.cryptopp.com/wiki/IOS_(Command_Line) – Vizllx

+0

我记得试图用一段时间..但它不起作用。我会再试一次 – user1028028