• 12708阅读
  • 8回复

关于tslib编译的问题 请高手指教 [复制链接]

上一主题 下一主题
离线xjl2008
 
只看楼主 倒序阅读 楼主  发表于: 2009-05-20
先是编译的tslib1.3
我的交叉编译工具  arm-linux-gcc-3.4.1
编译tslib出现了如下怪问题
3.安装tsilib
设置好3.安装tsilib
设置好CC=/usr/local/arm/2.95.3/bin/arm-linux-gcc
CXX=/usr/local/arm/2.95.3/bin/arm-linux-g++
使用./autogen.sh生成configure文件,并运行
./configure --host=arm-linux --target=arm-linux --prefix=$PWD/build --enable-inputapi=no

然后就出现了最后的一个错误:说是找不到Makefile.in文件

root@xjl-desktop:/opt/tslib-1.3# ./configure --host=arm-linux --target=arm-linux --prefix=$PWD/build --enable-inputapi=no
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 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-strip... arm-linux-strip
checking --enable-debug argument... no
checking --enable-inputapi argument... no
./configure: line 2391: AM_DISABLE_STATIC: command not found
./configure: line 2392: AM_ENABLE_SHARED: command not found
checking for arm-linux-gcc... arm-linux-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-linux-gcc accepts -g... yes
checking for arm-linux-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of arm-linux-gcc... gcc3
./configure: line 3513: AC_LIBTOOL_DLOPEN: command not found
./configure: line 3514: AM_PROG_LIBTOOL: command not found
checking for dlopen in -ldl... yes
checking how to run the C preprocessor... arm-linux-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for vprintf... yes
checking for _doprnt... no
checking for strsep... yes
checking for strdup... yes
checking for strtoul... yes
configure: creating ./config.status
config.status: error: cannot find input file: Makefile.in
root@xjl-desktop:/opt/tslib-1.3# ./configure --host=arm-linux --target=arm-linux --prefix=$PWD/build --enable-inputapi=no
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 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-strip... arm-linux-strip
checking --enable-debug argument... no
checking --enable-inputapi argument... no
./configure: line 2391: AM_DISABLE_STATIC: command not found
./configure: line 2392: AM_ENABLE_SHARED: command not found
checking for arm-linux-gcc... arm-linux-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-linux-gcc accepts -g... yes
checking for arm-linux-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of arm-linux-gcc... gcc3
./configure: line 3513: AC_LIBTOOL_DLOPEN: command not found
./configure: line 3514: AM_PROG_LIBTOOL: command not found
checking for dlopen in -ldl... yes
checking how to run the C preprocessor... arm-linux-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for vprintf... yes
checking for _doprnt... no
checking for strsep... yes
checking for strdup... yes
checking for strtoul... yes
configure: creating ./config.status
config.status: error: cannot find input file: Makefile.in



后来我以为是版本的问题 换编译 tslib 1.4



./autogen.sh 后就出现了错误
Can't exec "libtoolize": 没有该文件或目录 at /usr/bin/autoreconf line 188.
Use of uninitialized value $libtoolize in pattern match (m//) at /usr/bin/autoreconf line 188.
configure.ac:25: error: possibly undefined macro: AC_DISABLE_STATIC
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:26: error: possibly undefined macro: AC_ENABLE_SHARED
configure.ac:27: error: possibly undefined macro: AC_LIBTOOL_DLOPEN
configure.ac:28: error: possibly undefined macro: AC_PROG_LIBTOOL
autoreconf: /usr/bin/autoconf failed with exit status: 1





promis
离线hercules

只看该作者 1楼 发表于: 2009-05-20
configure -v看一下具体的错误
我的QQ号:337396132
欢迎大家加我为好友,一起学习Qt
离线xjl2008
只看该作者 2楼 发表于: 2009-05-21
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
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 --enable-debug argument... no
checking --enable-inputapi argument... yes
./configure: line 2391: AM_DISABLE_STATIC: command not found
./configure: line 2392: AM_ENABLE_SHARED: command not found
checking for gcc... arm-linux-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: in `/opt/tslib-1.3':
configure: error: cannot run C compiled programs.   //是我机器的c编译器有问题吗
If you meant to cross compile, use `--host'.
See `config.log' for more details.
谢谢你这么快回复了我的帖子 ./configure -v 之后 信息如上
promis
离线hercules

只看该作者 3楼 发表于: 2009-05-21
config.log能否贴出来呢?
我的QQ号:337396132
欢迎大家加我为好友,一起学习Qt
离线xjl2008
只看该作者 4楼 发表于: 2009-05-21
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.63.  Invocation command line was

  $ ./configure -v

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

hostname = xjl-desktop
uname -m = i686
uname -r = 2.6.28-11-generic
uname -s = Linux
uname -v = #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009

/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: /arm/usr/local/arm/3.4.1/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games


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

configure:1877: checking for a BSD-compatible install
configure:1945: result: /usr/bin/install -c
configure:1956: checking whether build environment is sane
configure:1999: result: yes
configure:2024: checking for a thread-safe mkdir -p
configure:2063: result: /bin/mkdir -p
configure:2076: checking for gawk
configure:2106: result: no
configure:2076: checking for mawk
configure:2092: found /usr/bin/mawk
configure:2103: result: mawk
configure:2114: checking whether make sets $(MAKE)
configure:2136: result: yes
configure:2352: checking --enable-debug argument
configure:2361: result: no
configure:2369: checking --enable-inputapi argument
configure:2378: result: yes
configure:2458: checking for gcc
configure:2485: result: arm-linux-gcc
configure:2717: checking for C compiler version
configure:2725: arm-linux-gcc --version >&5
arm-linux-gcc (GCC) 3.4.1
Copyright (C) 2004 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:2729: $? = 0
configure:2736: arm-linux-gcc -v >&5
Reading specs from /arm/usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/specs
Configured with: /work/crosstool-0.27/build/arm-linux/gcc-3.4.1-glibc-2.3.2/gcc-3.4.1/configure --target=arm-linux --host=i686-host_pc-linux-gnu --prefix=/usr/local/arm/3.4.1 --with-headers=/usr/local/arm/3.4.1/arm-linux/include --with-local-prefix=/usr/local/arm/3.4.1/arm-linux --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-c99 --enable-long-long
Thread model: posix
gcc version 3.4.1
configure:2740: $? = 0
configure:2747: arm-linux-gcc -V >&5
arm-linux-gcc: `-V' option must have argument
configure:2751: $? = 1
configure:2774: checking for C compiler default output file name
configure:2796: arm-linux-gcc    conftest.c  >&5
configure:2800: $? = 0
configure:2838: result: a.out
configure:2857: checking whether the C compiler works
configure:2867: ./a.out
./configure: line 2869: ./a.out: cannot execute binary file
configure:2871: $? = 126
configure:2878: error: in `/opt/tslib-1.3':
configure:2882: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

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

ac_cv_env_CC_set=set
ac_cv_env_CC_value=arm-linux-gcc
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
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=
ac_cv_env_LDFLAGS_value=
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=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=mawk
ac_cv_prog_ac_ct_CC=arm-linux-gcc
ac_cv_prog_make_make_set=yes

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

ACLOCAL='${SHELL} /opt/tslib-1.3/missing --run aclocal-1.10'
ALLOCA=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='${SHELL} /opt/tslib-1.3/missing --run tar'
AUTOCONF='${SHELL} /opt/tslib-1.3/missing --run autoconf'
AUTOHEADER='${SHELL} /opt/tslib-1.3/missing --run autoheader'
AUTOMAKE='${SHELL} /opt/tslib-1.3/missing --run automake-1.10'
AWK='mawk'
CC='arm-linux-gcc'
CCDEPMODE=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CYGPATH_W='echo'
DEBUGFLAGS=''
DEFS=''
DEPDIR=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
GREP=''
INPUTAPIFLAG='-DUSE_INPUT_API'
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
LT_AGE='1'
LT_CURRENT='1'
LT_RELEASE='0.0'
LT_REVISION='0'
MAKEINFO='${SHELL} /opt/tslib-1.3/missing --run makeinfo'
MKDIR_P='/bin/mkdir -p'
OBJEXT=''
PACKAGE='libts'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PLUGINS=' linear.la dejitter.la variance.la mousebuts.la'
PLUGIN_DIR='${datadir}/ts/plugins'
SET_MAKE=''
SHELL='/bin/bash'
STRIP=''
TS_CONF='${sysconfdir}/ts.conf'
VERSION='0.0.1'
ac_ct_CC='arm-linux-gcc'
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include=''
am__isrc=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='$(SHELL) /opt/tslib-1.3/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='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

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

#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE "libts"
#define VERSION "0.0.1"

configure: exit 1


这就是config.log的内容
promis
离线hercules

只看该作者 5楼 发表于: 2009-05-21
你换一个其他版本的tool chain试试?
我的QQ号:337396132
欢迎大家加我为好友,一起学习Qt
离线xjl2008
只看该作者 6楼 发表于: 2009-06-01
也不知道咋回事,一样的东西,一样的交叉编译环境,居然在在同学机子上就,可以编译通过          纳闷
promis
离线xjl2008
只看该作者 7楼 发表于: 2009-06-01
我以前用的是arm-linux-gcc 3.4.1 现在换成了 2.95.3
export CC=/arm/2.95.3/bin/arm-linux-gcc
export CXX=/arm/2.95.3/bin/arm-linux-g++
export PATH=/arm/2.95.3/bin/:$PATH

./autogen.sh
Libtoolize..../autogen.sh: 4: libtoolize: not found
Done.
Aclocal...configure.in:41: warning: macro `AM_DISABLE_STATIC' not found in library
configure.in:42: warning: macro `AM_ENABLE_SHARED' not found in library
configure.in:64: warning: macro `AM_PROG_LIBTOOL' not found in library
Done.
Autoheader...Done.
Automake...plugins/Makefile.am:12: `:='-style assignments are not portable
plugins/Makefile.am:14: `:='-style assignments are not portable
plugins/Makefile.am:17: `:='-style assignments are not portable
plugins/Makefile.am:22: Libtool library used but `LIBTOOL' is undefined
plugins/Makefile.am:22:   The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'
plugins/Makefile.am:22:   to `configure.in' and run `aclocal' and `autoconf' again.
plugins/Makefile.am:22:   If `AC_PROG_LIBTOOL' is in `configure.in', make sure
plugins/Makefile.am:22:   its definition is in aclocal's search path.
plugins/Makefile.am:12: `CFLAGS' is a user variable, you should not override it;
plugins/Makefile.am:12: use `AM_CFLAGS' instead.
plugins/Makefile.am:14: `LDFLAGS' is a user variable, you should not override it;
plugins/Makefile.am:14: use `AM_LDFLAGS' instead.
src/Makefile.am:12: `:='-style assignments are not portable
src/Makefile.am:17: Libtool library used but `LIBTOOL' is undefined
src/Makefile.am:17:   The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'
src/Makefile.am:17:   to `configure.in' and run `aclocal' and `autoconf' again.
src/Makefile.am:17:   If `AC_PROG_LIBTOOL' is in `configure.in', make sure
src/Makefile.am:17:   its definition is in aclocal's search path.
src/Makefile.am:12: `CFLAGS' is a user variable, you should not override it;
src/Makefile.am:12: use `AM_CFLAGS' instead.
tests/Makefile.am:12: `:='-style assignments are not portable
tests/Makefile.am:12: `CFLAGS' is a user variable, you should not override it;
tests/Makefile.am:12: use `AM_CFLAGS' instead.
Done.
Autoconf...Done.
Now you can do ./configure, make, make install.

./configure --host=arm-linux --target=arm-linux --prefix=/arm/tslib --enable-inputapi=no
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 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-strip... arm-linux-strip
checking --enable-debug argument... no
checking --enable-inputapi argument... no
./configure: line 2391: AM_DISABLE_STATIC: command not found
./configure: line 2392: AM_ENABLE_SHARED: command not found
checking for arm-linux-gcc... /arm/2.95.3/bin/arm-linux-gcc
checking for C compiler default output file name...
configure: error: in `/arm/tslib-1.3':
configure: error: C compiler cannot create executables
See `config.log' for more details.
promis
离线xjl2008
只看该作者 8楼 发表于: 2009-06-02
呵呵 终于编译 tslib1.4 通过了  今天仔细查看了下原因 ,原来我机器上没装 libtool工具
sudo -s apt-get install libtool 安装完毕之后./autogen.sh 后一切顺利!
别忘了:配置的时候加这个echo "ac_cv_func_malloc_0_nonnull=yes">arm-linux.cache
./configure ---cache-file=arm-linux.cache  其他的都一样,要是没这个,报
: undefined reference to `rpl_malloc'
collect2: ld returned 1 exit status
promis
快速回复
限100 字节
 
上一个 下一个