交叉编译 Python 2 Xcode 时出现问题:kivy-ios 发行版抛出错误

2024-01-09

我正在尝试编译 kity-ios本教程 http://kivy.org/docs/guide/packaging-ios.html。但跑完之后tools/build-all.sh,我收到以下错误:

EDIT:

(...)
checking for armv7-apple-darwin-gcc...  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2
checking whether the C compiler works... no
configure: error: in `/Users/marcelosalloum/Projects/kivy-ios/tmp/Python-2.7.1':
configure: error: C compiler cannot create executables
See `config.log' for more details.

当我检查 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 python configure 2.7, which was
generated by GNU Autoconf 2.65.  Invocation command line was

  $ ./configure CC= /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 LD=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld CFLAGS=-march=armv7 -mcpu=arm176jzf -mcpu=cortex-a8 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -miphoneos-version-min=7.0 -O3 LDFLAGS=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -miphoneos-version-min=7.0 -Lextralibs/ -lsqlite3 --without-pymalloc --disable-toolbox-glue --host=armv7-apple-darwin --prefix=/python --without-doc-strings

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

hostname = MacBook-Pro-de-Marcelo-Salloum.local
uname -m = x86_64
uname -r = 12.5.0
uname -s = Darwin
uname -v = Darwin Kernel Version 12.5.0: Mon Jul 29 16:33:49 PDT 2013; root:xnu-2050.48.11~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
/usr/bin/hostinfo      = Mach kernel version:
     Darwin Kernel Version 12.5.0: Mon Jul 29 16:33:49 PDT 2013; root:xnu-2050.48.11~1/RELEASE_X86_64
Kernel configured for up to 2 processors.
2 processors are physically available.
2 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1
Primary memory available: 4.00 gigabytes
Default processor set: 122 tasks, 600 threads, 2 processors
Load average: 1.76, Mach factor: 0.43
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /Library/Frameworks/Python.framework/Versions/2.7/bin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /Library/Frameworks/Python.framework/Versions/2.7/bin
PATH: /Library/Frameworks/Python.framework/Versions/Current/bin
PATH: /opt/local/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/local/bin
PATH: /opt/X11/bin
PATH: /usr/local/git/bin
PATH: /usr/texbin
PATH: /Users/marcelosalloum/gsutil
PATH: /usr/local/mysql/bin
PATH: /opt/local/bin/gcc-mp-4.8
PATH: /usr/local/bin
PATH: /usr/local/bin


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

configure:2747: checking for --enable-universalsdk
configure:2788: result: no
configure:2797: checking for --with-universal-archs
configure:2814: result: 32-bit
configure:2971: checking MACHDEP
configure:3119: result: darwin
configure:3125: checking EXTRAPLATDIR
configure:3140: result: $(PLATMACDIRS)
configure:3151: checking machine type as reported by uname -m
configure:3154: result: x86_64
configure:3167: checking for --without-gcc
configure:3211: result: no
configure:3232: checking for armv7-apple-darwin-gcc
configure:3259: result:  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2
configure:3528: checking for C compiler version
configure:3537:  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 --version >&5
./configure: line 3539: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2: No such file or directory
configure:3548: $? = 127
configure:3537:  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 -v >&5
./configure: line 3539: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2: No such file or directory
configure:3548: $? = 127
configure:3537:  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 -V >&5
./configure: line 3539: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2: No such file or directory
configure:3548: $? = 127
configure:3537:  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 -qversion >&5
./configure: line 3539: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2: No such file or directory
configure:3548: $? = 127
configure:3568: checking whether the C compiler works
configure:3590:  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 -march=armv7 -mcpu=arm176jzf -mcpu=cortex-a8 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -miphoneos-version-min=7.0 -O3 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/lib/gcc/arm-apple-darwin11/4.2.1/include/ -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -miphoneos-version-min=7.0 -Lextralibs/ -lsqlite3 conftest.c  >&5
./configure: line 3592: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2: No such file or directory
configure:3594: $? = 127
configure:3632: result: no
configure: failed program was:
| /* confdefs.h */
| #define _GNU_SOURCE 1
| #define _NETBSD_SOURCE 1
| #define __BSD_VISIBLE 1
| #define _BSD_TYPES 1
| #define _DARWIN_C_SOURCE 1
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3637: error: in `/Users/marcelosalloum/Projects/kivy-ios/tmp/Python-2.7.1':
configure:3641: error: C compiler cannot create executables
See `config.log' for more details.

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

ac_cv_env_CC_set=set
ac_cv_env_CC_value=' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2'
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-march=armv7 -mcpu=arm176jzf -mcpu=cortex-a8 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -miphoneos-version-min=7.0 -O3'
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value='-I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/lib/gcc/arm-apple-darwin11/4.2.1/include/ -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/'
ac_cv_env_CPP_set=set
ac_cv_env_CPP_value=' /usr/bin/cpp -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/lib/gcc/arm-apple-darwin11/4.2.1/include/ -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/'
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -miphoneos-version-min=7.0 -Lextralibs/ -lsqlite3'
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
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=armv7-apple-darwin
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_prog_CC=' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2'

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

AR=''
ARCH_RUN_32BIT=''
ARFLAGS=''
BASECFLAGS=''
BLDLIBRARY=''
BLDSHARED=''
BUILDEXEEXT=''
CC=' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2'
CCSHARED=''
CFLAGS='-march=armv7 -mcpu=arm176jzf -mcpu=cortex-a8 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -miphoneos-version-min=7.0 -O3'
CFLAGSFORSHARED=''
CONFIGURE_MACOSX_DEPLOYMENT_TARGET=''
CONFIG_ARGS=' '\''CC= /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2'\'' '\''LD=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ld'\'' '\''CFLAGS=-march=armv7 -mcpu=arm176jzf -mcpu=cortex-a8 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -miphoneos-version-min=7.0 -O3'\'' '\''LDFLAGS=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -miphoneos-version-min=7.0 -Lextralibs/ -lsqlite3'\'' '\''--without-pymalloc'\'' '\''--disable-toolbox-glue'\'' '\''--host=armv7-apple-darwin'\'' '\''--prefix=/python'\'' '\''--without-doc-strings'\'' '\''host_alias=armv7-apple-darwin'\'' '\''CPPFLAGS=-I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/lib/gcc/arm-apple-darwin11/4.2.1/include/ -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/'\'' '\''CPP= /usr/bin/cpp -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/lib/gcc/arm-apple-darwin11/4.2.1/include/ -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/'\'''
CPP=' /usr/bin/cpp -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/lib/gcc/arm-apple-darwin11/4.2.1/include/ -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/'
CPPFLAGS='-I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/lib/gcc/arm-apple-darwin11/4.2.1/include/ -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/'
CXX=''
DEFS=''
DLINCLDIR=''
DLLLIBRARY=''
DYNLOADFILE=''
ECHO_C='\c'
ECHO_N=''
ECHO_T=''
EGREP=''
EXEEXT=''
EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
EXTRAMACHDEPPATH='$(PLATMACPATH)'
EXTRAPLATDIR='$(PLATMACDIRS)'
FRAMEWORKALTINSTALLFIRST=''
FRAMEWORKALTINSTALLLAST=''
FRAMEWORKINSTALLAPPSPREFIX=''
FRAMEWORKINSTALLFIRST=''
FRAMEWORKINSTALLLAST=''
FRAMEWORKUNIXTOOLSPREFIX='/python'
GNULD=''
GREP=''
HAVE_GETHOSTBYNAME=''
HAVE_GETHOSTBYNAME_R=''
HAVE_GETHOSTBYNAME_R_3_ARG=''
HAVE_GETHOSTBYNAME_R_5_ARG=''
HAVE_GETHOSTBYNAME_R_6_ARG=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
INSTSONAME=''
LDCXXSHARED=''
LDFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -miphoneos-version-min=7.0 -Lextralibs/ -lsqlite3'
LDLAST=''
LDLIBRARY=''
LDLIBRARYDIR=''
LDSHARED=''
LIBC=''
LIBFFI_INCLUDEDIR=''
LIBM=''
LIBOBJS=''
LIBRARY=''
LIBS=''
LIBTOOL_CRUFT=''
LINKCC=''
LINKFORSHARED=''
LIPO_32BIT_FLAGS=''
LN=''
LTLIBOBJS=''
MACHDEP='darwin'
MACHDEP_OBJS=''
MAINCC=''
OBJEXT=''
OPT=''
OTHER_LIBTOOL_OPT=''
PACKAGE_BUGREPORT='http://bugs.python.org/'
PACKAGE_NAME='python'
PACKAGE_STRING='python 2.7'
PACKAGE_TARNAME='python'
PACKAGE_URL=''
PACKAGE_VERSION='2.7'
PATH_SEPARATOR=':'
PKG_CONFIG=''
PYTHONFRAMEWORK=''
PYTHONFRAMEWORKDIR='no-framework'
PYTHONFRAMEWORKIDENTIFIER='org.python.python'
PYTHONFRAMEWORKINSTALLDIR=''
PYTHONFRAMEWORKPREFIX=''
RANLIB=''
RUNSHARED=''
SGI_ABI=''
SHELL='/bin/sh'
SHLIBS=''
SIGNAL_OBJS=''
SO=''
SOVERSION='1.0'
SRCDIRS=''
SVNVERSION=''
THREADHEADERS=''
THREADOBJ=''
TRUE=''
UNICODE_OBJS=''
UNIVERSALSDK=''
UNIVERSAL_ARCH_FLAGS=''
USE_SIGNAL_MODULE=''
USE_THREAD_MODULE=''
VERSION='2.7'
ac_ct_CC=''
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host_alias='armv7-apple-darwin'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/python'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

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

/* confdefs.h */
#define _GNU_SOURCE 1
#define _NETBSD_SOURCE 1
#define __BSD_VISIBLE 1
#define _BSD_TYPES 1
#define _DARWIN_C_SOURCE 1

configure: exit 77

重要的是要知道我是通过 Macports 安装 kivy 依赖项,而不是按照建议安装 Homebrew。尽管我认为它会起作用。

EDIT:

该脚本在中搜索arm llvm编译器/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2但该路径中不存在该文件。我怎样才能找到它或如何解决这个问题?


我在我的 Mac 上测试过。遇到同样的错误。也许你应该遵循食谱并使用啤酒?正确理解我的意思:如果维护者这样写,我相信这是由于某种原因。也许你问他?我自己以前没有使用过brew,但是这一页 http://tedwise.com/2010/08/28/homebrew-vs-macports/据说它比 fink 和 macports 的侵入性要小,所以你可以尝试一下。不保证任何事情......;-)

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

交叉编译 Python 2 Xcode 时出现问题:kivy-ios 发行版抛出错误 的相关文章

随机推荐