好吧,我正在尝试为 android-python27 项目建立一些脚本之间的依赖关系,以便将 charm 库集成到 apk 中。当我运行名为 pbc.sh 的脚本时,出现以下错误:
checking whether the C compiler works... no
configure: error: in `/home/pol/Desktop/buildDir/pbc':
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 pbc configure 0.5.14, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ ./configure --host=arm-linux-androideabi --target=arm-linux-androideabi --enable-shared --prefix=/home/pol/Desktop/buildDir/obj LDFLAGS=-L/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm/usr/lib -L/home/pol/Desktop/buildDir/obj/lib
## --------- ##
## Platform. ##
## --------- ##
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
PATH: /usr/local/games
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2303: checking for a BSD-compatible install
configure:2371: result: /usr/bin/install -c
configure:2382: checking whether build environment is sane
configure:2432: result: yes
configure:2481: checking for arm-linux-androideabi-strip
configure:2511: result: no
configure:2521: checking for strip
configure:2537: found /usr/bin/strip
configure:2548: result: strip
configure:2573: checking for a thread-safe mkdir -p
configure:2612: result: /bin/mkdir -p
configure:2625: checking for gawk
configure:2655: result: no
configure:2625: checking for mawk
configure:2641: found /usr/bin/mawk
configure:2652: result: mawk
configure:2663: checking whether make sets $(MAKE)
configure:2685: result: yes
configure:2798: checking build system type
configure:2812: result: x86_64-unknown-linux-gnu
configure:2832: checking host system type
configure:2845: result: arm-unknown-linux-androideabi
configure:2886: checking how to print strings
configure:2913: result: printf
configure:2946: checking for style of include used by make
configure:2974: result: GNU
configure:3005: checking for arm-linux-androideabi-gcc
configure:3032: result: arm-linux-androideabi-gcc --sysroot=/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm -I/home/pol/Desktop/buildDir/obj/include -L/home/pol/Desktop/buildDir/obj/lib -L/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm/usr/lib
configure:3301: checking for C compiler version
configure:3310: arm-linux-androideabi-gcc --sysroot=/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm -I/home/pol/Desktop/buildDir/obj/include -L/home/pol/Desktop/buildDir/obj/lib -L/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm/usr/lib --version >&5
./configure: line 3312: arm-linux-androideabi-gcc: command not found
configure:3321: $? = 127
configure:3310: arm-linux-androideabi-gcc --sysroot=/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm -I/home/pol/Desktop/buildDir/obj/include -L/home/pol/Desktop/buildDir/obj/lib -L/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm/usr/lib -v >&5
./configure: line 3312: arm-linux-androideabi-gcc: command not found
configure:3321: $? = 127
configure:3310: arm-linux-androideabi-gcc --sysroot=/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm -I/home/pol/Desktop/buildDir/obj/include -L/home/pol/Desktop/buildDir/obj/lib -L/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm/usr/lib -V >&5
./configure: line 3312: arm-linux-androideabi-gcc: command not found
configure:3321: $? = 127
configure:3310: arm-linux-androideabi-gcc --sysroot=/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm -I/home/pol/Desktop/buildDir/obj/include -L/home/pol/Desktop/buildDir/obj/lib -L/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm/usr/lib -qversion >&5
./configure: line 3312: arm-linux-androideabi-gcc: command not found
configure:3321: $? = 127
configure:3341: checking whether the C compiler works
configure:3363: arm-linux-androideabi-gcc --sysroot=/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm -I/home/pol/Desktop/buildDir/obj/include -L/home/pol/Desktop/buildDir/obj/lib -L/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm/usr/lib --sysroot=/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm -I/home/pol/Desktop/buildDir/obj/include -L/home/pol/Desktop/buildDir/obj/lib -L/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm/usr/lib -L/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm/usr/lib -L/home/pol/Desktop/buildDir/obj/lib conftest.c >&5
./configure: line 3365: arm-linux-androideabi-gcc: command not found
configure:3367: $? = 127
configure:3405: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "pbc"
| #define PACKAGE_TARNAME "pbc"
| #define PACKAGE_VERSION "0.5.14"
| #define PACKAGE_STRING "pbc 0.5.14"
| #define PACKAGE_BUGREPORT "[email protected]"
| #define PACKAGE_URL ""
| #define PACKAGE "pbc"
| #define VERSION "0.5.14"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3410: error: in `/home/pol/Desktop/buildDir/pbc':
configure:3412: error: C compiler cannot create executables
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_env_CC_set=set
ac_cv_env_CC_value='arm-linux-androideabi-gcc --sysroot=/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm -I/home/pol/Desktop/buildDir/obj/include -L/home/pol/Desktop/buildDir/obj/lib -L/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm/usr/lib'
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='--sysroot=/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm -I/home/pol/Desktop/buildDir/obj/include -L/home/pol/Desktop/buildDir/obj/lib -L/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm/usr/lib'
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value='-L/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm/usr/lib -L/home/pol/Desktop/buildDir/obj/lib'
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_YACC_set=
ac_cv_env_YACC_value=
ac_cv_env_YFLAGS_set=
ac_cv_env_YFLAGS_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=arm-linux-androideabi
ac_cv_env_target_alias_set=set
ac_cv_env_target_alias_value=arm-linux-androideabi
ac_cv_host=arm-unknown-linux-androideabi
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=mawk
ac_cv_prog_CC='arm-linux-androideabi-gcc --sysroot=/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm -I/home/pol/Desktop/buildDir/obj/include -L/home/pol/Desktop/buildDir/obj/lib -L/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm/usr/lib'
ac_cv_prog_ac_ct_STRIP=strip
ac_cv_prog_make_make_set=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} /home/pol/Desktop/buildDir/pbc/missing --run aclocal-1.11'
ALLOCA=''
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AR=''
AS=''
AUTOCONF='${SHELL} /home/pol/Desktop/buildDir/pbc/missing --run autoconf'
AUTOHEADER='${SHELL} /home/pol/Desktop/buildDir/pbc/missing --run autoheader'
AUTOMAKE='${SHELL} /home/pol/Desktop/buildDir/pbc/missing --run automake-1.11'
AWK='mawk'
CC='arm-linux-androideabi-gcc --sysroot=/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm -I/home/pol/Desktop/buildDir/obj/include -L/home/pol/Desktop/buildDir/obj/lib -L/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm/usr/lib'
CCDEPMODE=''
CFLAGS='--sysroot=/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm -I/home/pol/Desktop/buildDir/obj/include -L/home/pol/Desktop/buildDir/obj/lib -L/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm/usr/lib'
CPP=''
CPPFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR='.deps'
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
FGREP=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD=''
LDFLAGS='-L/home/pol/Desktop/buildDir/android-ndk-r8e/platforms/android-9/arch-arm/usr/lib -L/home/pol/Desktop/buildDir/obj/lib'
LEX=''
LEXLIB=''
LEX_OUTPUT_ROOT=''
LIBOBJS=''
LIBPBC_DLL=''
LIBPBC_LDFLAGS=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /home/pol/Desktop/buildDir/pbc/missing --run makeinfo'
MANIFEST_TOOL=''
MKDIR_P='/bin/mkdir -p'
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE='pbc'
PACKAGE_BUGREPORT='[email protected]'
PACKAGE_NAME='pbc'
PACKAGE_STRING='pbc 0.5.14'
PACKAGE_TARNAME='pbc'
PACKAGE_URL=''
PACKAGE_VERSION='0.5.14'
PATH_SEPARATOR=':'
PBC_LDFLAGS=''
RANLIB=''
SED=''
SET_MAKE=''
SHELL='/bin/bash'
STRIP='strip'
VERSION='0.5.14'
YACC=''
YFLAGS=''
ac_ct_AR=''
ac_ct_CC=''
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include='include'
am__isrc=''
am__leading_dot='.'
am__nodep='_no'
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='unknown'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='arm-unknown-linux-androideabi'
host_alias='arm-linux-androideabi'
host_cpu='arm'
host_os='linux-androideabi'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /home/pol/Desktop/buildDir/pbc/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='/bin/mkdir -p'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/home/pol/Desktop/buildDir/obj'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias='arm-linux-androideabi'
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "pbc"
#define PACKAGE_TARNAME "pbc"
#define PACKAGE_VERSION "0.5.14"
#define PACKAGE_STRING "pbc 0.5.14"
#define PACKAGE_BUGREPORT "[email protected]"
#define PACKAGE_URL ""
#define PACKAGE "pbc"
#define VERSION "0.5.14"
configure: exit 77
我对 Linux 还不太熟悉,所以我不知道如何解决这个问题。任何建议都会很有帮助,我将不胜感激。
答案1
您需要先安装 gcc-arm-linux-androideabi 工具链包,可以通过软件中心(或其他包管理器)或通过命令行使用
sudo apt-get install gcc-arm-linux-androideabi