带有 autoconf 的 ARM 编译器 [英] ARM compiler with autoconf

查看:34
本文介绍了带有 autoconf 的 ARM 编译器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 autoconf 为 ARM 架构编译一些文件.我在 Ubuntu 12.04 中编译它们,目标系统是 BeagleBoard XM.我运行以下命令:

I am trying to compile some files for ARM architecture with autoconf. I am compiling them in Ubuntu 12.04 and the target system is a BeagleBoard XM. I run the following command:

./configure --host=arm-linux-gnueabi -prefix=${CSTOOL_DIR}/linux_arm_tool

并得到这个结果:

configure: WARNING: if you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-linux-gnueabi-strip... arm-linux-gnueabi-strip   
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for arm-linux-gnueabi-gcc... arm-linux-gnueabi-gcc
checking whether the C compiler works... no
configure: error: in `/home/edgar/Desktop/smartsantander/commserver':
configure: error: C compiler cannot create executables
See `config.log' for more details

这里是 config.log 文件:

And here is the config.log file:

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

It was created by commserver configure 3.2, which was
generated by GNU Autoconf 2.68.  Invocation command line was

  $ ../configure --target=i686-pc-linux-gnu --host=arm-linux-gnueabi --build=i686-pc-linux-gnu -prefix=/linux_arm_tool

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

hostname = ear-it
uname -m = i686
uname -r = 3.5.0-27-generic
uname -s = Linux
uname -v = #46~precise1-Ubuntu SMP Tue Mar 26 19:33:56 UTC 2013

/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/lib/lightdm/lightdm
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
PATH: /home/ear-it/Desktop/arm-2008q3/arm-none-linux-gnueabi/bin
PATH: /home/ear-it/Desktop/arm-2008q3/arm-none-linux-gnueabi/bin/


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

configure:1801: checking for a BSD-compatible install
configure:1869: result: /usr/bin/install -c
configure:1880: checking whether build environment is sane
configure:1930: result: yes
configure:1979: checking for arm-linux-gnueabi-strip
configure:1995: found /usr/bin/arm-linux-gnueabi-strip
configure:2006: result: arm-linux-gnueabi-strip
configure:2071: checking for a thread-safe mkdir -p
configure:2110: result: /bin/mkdir -p
configure:2123: checking for gawk
configure:2153: result: no
configure:2123: checking for mawk
configure:2139: found /usr/bin/mawk
configure:2150: result: mawk
configure:2161: checking whether make sets $(MAKE)
configure:2183: result: yes
configure:2272: checking for arm-linux-gnueabi-gcc
configure:2288: found /usr/bin/arm-linux-gnueabi-gcc
configure:2299: result: arm-linux-gnueabi-gcc
configure:2568: checking for C compiler version
configure:2577: arm-linux-gnueabi-gcc --version >&5
arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 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:2588: $? = 0
configure:2577: arm-linux-gnueabi-gcc -v >&5
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabi/4.6/lto-wrapper
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/arm-linux-gnueabi/include/c++/4.6.3 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-float=softfp --with-fpu=vfpv3-d16 --with-mode=thumb --disable-werror --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=arm-linux-gnueabi --program-prefix=arm-linux-gnueabi- --includedir=/usr/arm-linux-gnueabi/include --with-headers=/usr/arm-linux-gnueabi/include --with-libs=/usr/arm-linux-gnueabi/lib
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) 
configure:2588: $? = 0
configure:2577: arm-linux-gnueabi-gcc -V >&5
arm-linux-gnueabi-gcc: fatal error: no input files
compilation terminated.
configure:2588: $? = 4
configure:2577: arm-linux-gnueabi-gcc -qversion >&5
arm-linux-gnueabi-gcc: fatal error: no input files
compilation terminated.
configure:2588: $? = 4
configure:2608: checking whether the C compiler works
configure:2630: arm-linux-gnueabi-gcc -O3 -m32 -s -w   conftest.c  >&5
cc1: error: unrecognized command line option '-m32'
configure:2634: $? = 1
configure:2672: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "commserver"
| #define PACKAGE_TARNAME "commserver"
| #define PACKAGE_VERSION "3.2"
| #define PACKAGE_STRING "commserver 3.2"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "commserver"
| #define VERSION "3.2"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:2677: error: in `/home/ear-it/Desktop/smartsantander/commserver/build':
configure:2679: error: C compiler cannot create executables
See `config.log' for more details

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

ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=i686-pc-linux-gnu
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=arm-linux-gnueabi
ac_cv_env_target_alias_set=set
ac_cv_env_target_alias_value=i686-pc-linux-gnu
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-gnueabi-gcc
ac_cv_prog_STRIP=arm-linux-gnueabi-strip
ac_cv_prog_make_make_set=yes

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

ACLOCAL='${SHELL} /home/ear-it/Desktop/smartsantander/commserver/missing --run aclocal-1.11'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AUTOCONF='${SHELL} /home/ear-it/Desktop/smartsantander/commserver/missing --run autoconf'
AUTOHEADER='${SHELL} /home/ear-it/Desktop/smartsantander/commserver/missing --run autoheader'
AUTOMAKE='${SHELL} /home/ear-it/Desktop/smartsantander/commserver/missing --run automake-1.11'
AWK='mawk'
CC='arm-linux-gnueabi-gcc'
CCDEPMODE=''
CFLAGS='-O3 -m32 -s -w'
CPPFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /home/ear-it/Desktop/smartsantander/commserver/missing --run makeinfo'
MKDIR_P='/bin/mkdir -p'
OBJEXT=''
PACKAGE='commserver'
PACKAGE_BUGREPORT=''
PACKAGE_NAME='commserver'
PACKAGE_STRING='commserver 3.2'
PACKAGE_TARNAME='commserver'
PACKAGE_URL=''
PACKAGE_VERSION='3.2'
PATH_SEPARATOR=':'
SET_MAKE=''
SHELL='/bin/bash'
STRIP='arm-linux-gnueabi-strip'
VERSION='3.2'
ac_ct_CC=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include=''
am__isrc=' -I$(srcdir)'
am__leading_dot='.'
am__nodep=''
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build_alias='i686-pc-linux-gnu'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host_alias='arm-linux-gnueabi'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /home/ear-it/Desktop/smartsantander/commserver/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='/linux_arm_tool'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias='i686-pc-linux-gnu'

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

/* confdefs.h */
#define PACKAGE_NAME "commserver"
#define PACKAGE_TARNAME "commserver"
#define PACKAGE_VERSION "3.2"
#define PACKAGE_STRING "commserver 3.2"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define PACKAGE "commserver"
#define VERSION "3.2"

configure: exit 77

推荐答案

参见 unrecognized command line option '-m32'.您不会将 -m32 传递给 ARM 编译器.这很可能是程序包中的一个错误,或者可能是您使用 configure 执行的操作.从 Makefile.in 中的任何位置删除它.

See unrecognized command line option '-m32'. You don't pass -m32 to an ARM compiler. This is a most likely a mistake in the package or possibly something you are doing with configure. Remove that from Makefile.in or where ever it is in the package.

config.log 在您开始使用时特别不直观.文件末尾有一个很大的部分,其中 configure 转储所有 变量.您必须继续向上滚动,直到找到实际失败的命令.向后搜索的一些短语是缓存变量.有关详细信息,请参阅config.log".通常,此时会显示一些程序,编译选项和输出.在上面的示例中,您可以在此处找到被拒绝的 -m32.

The config.log is especially un-intuitive when you begin to use it. There is a large section at the end of the file where configure dumps all variables. You have to keep scrolling up until you find the command that actually failed. Some phrases to search backwards are Cache variables. and See 'config.log' for more details. Generally, at this point, some program is shown, compile options and output. In your example above, this is where you can find the -m32 being rejected.

这篇关于带有 autoconf 的 ARM 编译器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆