移植tslib

来源:互联网 发布:matlab mac 2016 破解 编辑:程序博客网 时间:2024/05/17 04:20

问题

ttttt@ttttt-VirtualBox:~/tslib$sudo apt-get install autoconf automake

ttttt@ttttt-VirtualBox:~/tslib$ ./autogen.sh
Can't exec "libtoolize": 没有那个文件或目录 at /usr/bin/autoreconf line 196.
Use of uninitialized value in pattern match (m//) at /usr/bin/autoreconf line 196.
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

 

ttttt@ttttt-VirtualBox:~/tslib$ ./configure --prefix=/usr/local/tslib --host=arm-linux --target=arm-linux ac_cv_func_malloc_0_nonnull=yes
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
configure: error: cannot find install-sh, install.sh, or shtool in "." "./.." "./../.."

ttttt@ttttt-VirtualBox:~/tslib$ make
make: *** 没有指明目标并且找不到 makefile。 停止。

第一次试验

#sudo apt-get install libtool

ttttt@ttttt-VirtualBox:~/tslib$ ./autogen.sh
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./config.guess'
libtoolize: copying file `./config.sub'
libtoolize: copying file `./install-sh'
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in `m4/internal'.
libtoolize: copying file `m4/internal/libtool.m4'
libtoolize: copying file `m4/internal/ltoptions.m4'
libtoolize: copying file `m4/internal/ltsugar.m4'
libtoolize: copying file `m4/internal/ltversion.m4'
libtoolize: copying file `m4/internal/lt~obsolete.m4'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.

ttttt@ttttt-VirtualBox:~/tslib$ ./configure --prefix=/usr/local/tslib --host=arm-linux --target=arm-linux ac_cv_func_malloc_0_nonnull=yes
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-strip... arm-linux-strip
checking for...........

ttttt@ttttt-VirtualBox:~/tslib$ make                       
ttttt@ttttt-VirtualBox:~/tslib$ sudo make intall
make: *** 没有规则可以创建目标“intall”。 停止。

ttttt@ttttt-VirtualBox:/usr/local$ ls
bin  etc  games  include  lib  man  sbin  share  src

 

参考:

#export PREFIX=/path_to_your_tslib_1.4_dir
#export CC=/path/to/your/cross-compiler-bin-dir
/*
autogen.sh is an important .sh file,it produce ./configure file according to current env setting
*/
#./autogen.sh
错误现象:./autogen.sh: 9: autoreconf: not found
解决办法:#sudo apt-get install autoconf
错误现象:Can't exec "automake": 没有该文件或目录 at /usr/bin/autoreconf line 183
解决办法:#sudo apt-get install automake
错误现象:configure.ac:25: error: possibly undefined macro: AC_DISABLE_STATIC
解决办法:#sudo apt-get install libtool
#echo "ac_cv_func_malloc_0_nonnull=yes" >arm-none-linux-gnueabi.cache
   
/*(it is better to see what parameter that the ./configure program take,use "./configure --help")
*you can add "--enable-debug"([default=no]),and/or "--enable-static"([default=no])
*/
#./configure --host=arm-none-linux-gnueabi --prefix=$PREFIX --cache-file=arm-none-linux-gnueabi.cache
#make
错误:undefined reference to rpl_malloc
解决办法(2种):
    * configure的时候加上--with-gnu-ld这个参数
    * 或者在config.h里加上#undef rpl_malloc
#make install


 

把tslib/etc目录下的ts.conf 的 "#module_raw input"的注释符号“#”去掉。但记住不要在前面留有空格,否则会出现错误 。

 

ttttt@ttttt-VirtualBox:/usr$ ls
bin  games  include  lib  local  sbin  share  src
ttttt@ttttt-VirtualBox:/usr$ cd local
ttttt@ttttt-VirtualBox:/usr/local$ tslib
未找到 'tslib' 命令,您要输入的是否是:
 命令 'slib' 来自于包 'slib' (universe)
tslib:找不到命令
ttttt@ttttt-VirtualBox:/usr/local$ cd tslib
ttttt@ttttt-VirtualBox:/usr/local/tslib$ ls
bin  etc  include  lib
ttttt@ttttt-VirtualBox:/usr/local/tslib$

最后解决。。。。

原创粉丝点击