交叉编译enca

来源:互联网 发布:mac桌面显示时间 编辑:程序博客网 时间:2024/06/06 06:35
enca具有自动检测文本编码,另外还有编码转换功能


下载源码 http://down1.chinaunix.net/distfiles/enca-1.9.tar.bz2,解压 交叉编译
第一步不是交叉编译,我们得先编译出pc机上的tools,为交叉编译做准备
./configure 
make check


然后我们备份下tools目录 cp tools tools_bak


./configure --host=arm-linux
这时候会出错
checking for "/dev/random"... configure: error: cannot check for file existence when cross compiling 
打开configure文件,把
if test "${ac_cv_file__dev_random+set}" = set; then :
$as_echo_n "(cached) " >&6
下的三行
else
test "$cross_compiling" = yes &&
as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
删除,就可以绕过这个检测,接下下会出现类似的错误,解决方法同上,都是找到相应
行,删除导致检测错误的三行代码。


然后make check就可以了,生成的lib在lib/.libs/下面
enca可执行文件在src/.libs/下面


作者:帅得不敢出门
0 0
原创粉丝点击