宿主机平台:Ubuntu 12.04.4 LTS
目标机:Easy-ARM IMX283
目标机内核:Linux 2.6.35.3
tslib 1.4 下载 https://gitlab.com/tslib/tslib/-/archive/1.4/tslib-1.4.tar.gz
tslib编译依赖
sudo apt-get install autoconf automake autogen libtool libsysfs-dev
解压,automake生成makefile
tar xzf tslib-1.4.tar.gz cd tslib-1.4 ./autogen.sh
出现以下问题
反映的是一些宏定义没有定义,aclocal是个扫描程序, 负责扫描configure.ac中所有的宏定义并展开;
出现上述应该是相关宏定义工具没有安装(但所有依赖工具均安装OK)或者 aclocal 出现问题;
查询 aclocal 路径
aclocal --print-ac-dir
但在对应目录却发现没有次目录 ,应该是不同版本安装、或系统升级导致文件夹丢失
chmod 777 /usr/local/share
将 usr/share/aclocal 文件夹拷贝到 /usr/local/share 下;
在此运行 ./autogen.sh
2. 编译配置、编译及安装
新建安装文件目录
mkdir -p install chmod 777 install
编译配置
./configure --prefix=$(pwd)/install --host=arm-fsl-linux-gnueabi ac_cv_func_malloc_0_nonnull=yes
然后编译 make,出现错误
input-raw.c: In function ‘check_fd‘: input-raw.c:188: error: ‘ABS_MT_PRESSURE‘ undeclared (first use in this function) input-raw.c:188: error: (Each undeclared identifier is reported only once input-raw.c:188: error: for each function it appears in.) input-raw.c:199: error: ‘ABS_MT_SLOT‘ undeclared (first use in this function) input-raw.c: In function ‘ts_input_read_mt‘: input-raw.c:515: error: ‘ABS_MT_PRESSURE‘ undeclared (first use in this function) input-raw.c:520: error: ‘ABS_MT_TOOL_X‘ undeclared (first use in this function) input-raw.c:525: error: ‘ABS_MT_TOOL_Y‘ undeclared (first use in this function) input-raw.c:540: error: ‘ABS_MT_DISTANCE‘ undeclared (first use in this function) input-raw.c:577: error: ‘ABS_MT_SLOT‘ undeclared (first use in this function) make[2]: *** [input-raw.lo] 错误 1 make[2]:正在离开目录 `/home/vmuser/wtools/tslib-1.4/plugins‘ make[1]: *** [all-recursive] 错误 1 make[1]:正在离开目录 `/home/vmuser/wtools/tslib-1.4‘ make: *** [all] 错误 2
make make install
制作安装脚本 build-tslib.sh 如下
#! /bin/bash chmod +x autogen.sh configure ./autogen.sh #./configure --prefix=/opt/tslib --host=arm-fsl-linux-gnueabi ac_cv_func_malloc_0_nonnull=yes mkdir -p install chmod 777 install ./configure --prefix=$(pwd)/install --host=arm-fsl-linux-gnueabi ac_cv_func_malloc_0_nonnull=yes make make install echo "Done! Now the tslib install in /install"
原文:https://www.cnblogs.com/silencehuan/p/11207996.html