Сборка библиотеки Botan для ios7 arm64

Я пытаюсь создать библиотеку Botan для ios7 (как 32-, так и 64-битные устройства ios)

Я старался:

   ./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. разве это не должно быть установлено по умолчанию? Что делать? Почему он использует платформу MacOSX...

Это вывод, когда я запускаю 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

Это может на самом деле работать ... но это не так


person user1028028    schedule 23.12.2013    source источник
comment
посмотрите, поможет ли это вам stackoverflow. ком/вопросы/18995051/   -  person Abhishek    schedule 01.01.2014


Ответы (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-version-min=7.0. OpenSSL не нуждался в этом при компиляции под Clang, а Crypto++ и libevent, и libcurl нужны.

person Vizllx    schedule 03.01.2014
comment
Откуда вы берете файл setenv-ios.sh? - person user1028028; 03.01.2014
comment
привет @user1028028- перейдите по этой ссылке, это поможет вам получить setenv-ios.sh cryptopp.com/wiki/IOS_(Command_Line) - person Vizllx; 08.01.2014
comment
Я помню, как пытался использовать это некоторое время назад... но это не сработало. я попробую снова - person user1028028; 08.01.2014
comment
я действительно не знаю, каким образом вы пытаетесь ... если возможно, опубликуйте какой-нибудь код ... потому что это сработало для меня ... - person Vizllx; 08.01.2014
comment
Вы можете дать мне сборку библиотеки? закачал на файлообменник что ли? - person user1028028; 08.01.2014