2013-05-16 47 views
1

我正試圖將libkml library導入到我的iOS項目中。我意識到expat庫不能鏈接(?),所以必須重新構建expat源代碼。爲iOS編譯expat - 命令/ bin/sh失敗,退出代碼爲77

我發現了一個SO鏈接,君子提到,他能成功鏈接外籍人士與他的iOS SDK 5.1:How to compile expat with iOS SDK 5.1?

我嘗試同樣使用script available in github如上面提到的鏈接。

但是,我在腳本的運行階段出現錯誤。我無法充分利用它,但我需要幫助來解決這個問題。

使用的腳本與github鏈接相同。項目中的C++標準庫設置爲「Compiler default」,我認爲它是LLVM C++。下面是config.log的輸出結果,我無法理解我的理解程度。請幫我解決這個問題,並建立庫鏈接到我的項目:

This file contains any messages produced by compilers while 
running configure, to aid debugging if configure makes a mistake. 

It was created by expat configure 2.0.1, which was 
generated by GNU Autoconf 2.59. Invocation command line was 

    $ ./configure --prefix=/Users/raj/Projects/test/bin/iPhoneSimulator5.0-i386.sdk --host=i386-apple-darwin --enable-static 

## --------- ## 
## Platform. ## 
## --------- ## 

hostname = Rajs-MacBook-Pro.local 
uname -m = x86_64 
uname -r = 12.3.0 
uname -s = Darwin 
uname -v = Darwin Kernel Version 12.3.0: Sun Jan 6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 

/usr/bin/uname -p = i386 
/bin/uname -X  = unknown 

/bin/arch    = unknown 
/usr/bin/arch -k  = unknown 
/usr/convex/getsysinfo = unknown 
hostinfo    = Mach kernel version: 
    Darwin Kernel Version 12.3.0: Sun Jan 6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 
Kernel configured for up to 8 processors. 
4 processors are physically available. 
8 processors are logically available. 
Processor type: i486 (Intel 80486) 
Processors active: 0 1 2 3 4 5 6 7 
Primary memory available: 4.00 gigabytes 
Default processor set: 100 tasks, 561 threads, 8 processors 
Load average: 2.90, Mach factor: 5.09 
/bin/machine   = unknown 
/usr/bin/oslevel  = unknown 
/bin/universe   = unknown 

PATH: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin 
PATH: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec 
PATH: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin 
PATH: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/local/bin 
PATH: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/bin 
PATH: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/local/bin 
PATH: /Applications/Xcode.app/Contents/Developer/usr/bin 
PATH: /Applications/Xcode.app/Contents/Developer/usr/local/bin 
PATH: /Applications/Xcode.app/Contents/Developer/Tools 
PATH: /usr/bin 
PATH: /bin 
PATH: /usr/sbin 
PATH: /sbin 


## ----------- ## 
## Core tests. ## 
## ----------- ## 

configure:2092: checking build system type 
configure:2110: result: i386-apple-darwin12.3.0 
configure:2118: checking host system type 
configure:2132: result: i386-apple-darwin 
configure:2148: checking for i386-apple-darwin-gcc 
configure:2174: result: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc 
configure:2456: checking for C compiler version 
configure:2459: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc --version </dev/null >&5 
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00) 
Copyright (C) 2007 Free Software Foundation, Inc. 
This is free software; see the source for copying conditions. There is NO 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 

configure:2462: $? = 0 
configure:2464: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -v </dev/null >&5 
Using built-in specs. 
Target: i686-apple-darwin11 
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.11~182/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~182/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1 
Thread model: posix 
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00) 
configure:2467: $? = 0 
configure:2469: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -V </dev/null >&5 
llvm-gcc-4.2: argument to `-V' is missing 
configure:2472: $? = 1 
configure:2495: checking for C compiler default output file name 
configure:2498: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -arch i386 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -I/Users/raj/Projects/test/include -arch i386 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/raj/Projects/test/lib conftest.c >&5 
ld: library not found for -lcrt1.10.6.o 
collect2: ld returned 1 exit status 
configure:2501: $? = 1 
configure: failed program was: 
| /* confdefs.h. */ 
| 
| #define PACKAGE_NAME "expat" 
| #define PACKAGE_TARNAME "expat" 
| #define PACKAGE_VERSION "2.0.1" 
| #define PACKAGE_STRING "expat 2.0.1" 
| #define PACKAGE_BUGREPORT "[email protected]" 
| /* end confdefs.h. */ 
| 
| int 
| main() 
| { 
| 
| ; 
| return 0; 
| } 
configure:2540: error: C compiler cannot create executables 
See `config.log' for more details. 

## ---------------- ## 
## Cache variables. ## 
## ---------------- ## 

ac_cv_build=i386-apple-darwin12.3.0 
ac_cv_build_alias=i386-apple-darwin12.3.0 
ac_cv_env_CC_set=set 
ac_cv_env_CC_value=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc 
ac_cv_env_CFLAGS_set=set 
ac_cv_env_CFLAGS_value='-arch i386 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -I/Users/raj/Projects/test/include' 
ac_cv_env_CPPFLAGS_set= 
ac_cv_env_CPPFLAGS_value= 
ac_cv_env_CPP_set=set 
ac_cv_env_CPP_value=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-cpp-4.2 
ac_cv_env_CXXCPP_set=set 
ac_cv_env_CXXCPP_value=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-cpp-4.2 
ac_cv_env_CXXFLAGS_set=set 
ac_cv_env_CXXFLAGS_value='-arch i386 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -I/Users/raj/Projects/test/include' 
ac_cv_env_CXX_set=set 
ac_cv_env_CXX_value=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ 
ac_cv_env_F77_set= 
ac_cv_env_F77_value= 
ac_cv_env_FFLAGS_set= 
ac_cv_env_FFLAGS_value= 
ac_cv_env_LDFLAGS_set=set 
ac_cv_env_LDFLAGS_value='-arch i386 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/raj/Projects/test/lib' 
ac_cv_env_build_alias_set= 
ac_cv_env_build_alias_value= 
ac_cv_env_host_alias_set=set 
ac_cv_env_host_alias_value=i386-apple-darwin 
ac_cv_env_target_alias_set= 
ac_cv_env_target_alias_value= 
ac_cv_host=i386-apple-darwin 
ac_cv_host_alias=i386-apple-darwin 
ac_cv_prog_CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc 

## ----------------- ## 
## Output variables. ## 
## ----------------- ## 

AR='' 
AS='' 
CC='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc' 
CFLAGS='-arch i386 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -I/Users/raj/Projects/test/include' 
CPP='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-cpp-4.2' 
CPPFLAGS='' 
CXX='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++' 
CXXCPP='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-cpp-4.2' 
CXXFLAGS='-arch i386 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -I/Users/raj/Projects/test/include' 
DEFS='' 
DLLTOOL='' 
ECHO='echo' 
ECHO_C='' 
ECHO_N='-n' 
ECHO_T='' 
EGREP='' 
EXEEXT='' 
F77='' 
FFLAGS='' 
FILEMAP='' 
INSTALL_DATA='' 
INSTALL_PROGRAM='' 
INSTALL_SCRIPT='' 
LDFLAGS='-arch i386 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/raj/Projects/test/lib' 
LIBAGE='5' 
LIBCURRENT='6' 
LIBOBJS='' 
LIBREVISION='2' 
LIBS='' 
LIBTOOL='' 
LN_S='' 
LTLIBOBJS='' 
OBJDUMP='' 
OBJEXT='' 
PACKAGE_BUGREPORT='[email protected]' 
PACKAGE_NAME='expat' 
PACKAGE_STRING='expat 2.0.1' 
PACKAGE_TARNAME='expat' 
PACKAGE_VERSION='2.0.1' 
PATH_SEPARATOR=':' 
RANLIB='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ranlib' 
SHELL='/bin/sh' 
STRIP='' 
ac_ct_AR='' 
ac_ct_AS='' 
ac_ct_CC='' 
ac_ct_CXX='' 
ac_ct_DLLTOOL='' 
ac_ct_F77='' 
ac_ct_OBJDUMP='' 
ac_ct_RANLIB='' 
ac_ct_STRIP='' 
bindir='${exec_prefix}/bin' 
build='i386-apple-darwin12.3.0' 
build_alias='' 
build_cpu='i386' 
build_os='darwin12.3.0' 
build_vendor='apple' 
datadir='${prefix}/share' 
exec_prefix='NONE' 
host='i386-apple-darwin' 
host_alias='i386-apple-darwin' 
host_cpu='i386' 
host_os='darwin' 
host_vendor='apple' 
includedir='${prefix}/include' 
infodir='${prefix}/info' 
libdir='${exec_prefix}/lib' 
libexecdir='${exec_prefix}/libexec' 
localstatedir='${prefix}/var' 
mandir='${prefix}/man' 
oldincludedir='/usr/include' 
prefix='/Users/raj/Projects/test/bin/iPhoneSimulator5.0-i386.sdk' 
program_transform_name='s,x,x,' 
sbindir='${exec_prefix}/sbin' 
sharedstatedir='${prefix}/com' 
sysconfdir='${prefix}/etc' 
target_alias='' 

## ----------- ## 
## confdefs.h. ## 
## ----------- ## 

#define PACKAGE_BUGREPORT "[email protected]" 
#define PACKAGE_NAME "expat" 
#define PACKAGE_STRING "expat 2.0.1" 
#define PACKAGE_TARNAME "expat" 
#define PACKAGE_VERSION "2.0.1" 

configure: exit 77 

回答

0

正如錯誤中指出的,我錯過了C編譯器。然後我下載了Xcode命令行工具,那麼這些錯誤可能會被修復。

相關問題