cannot find -lqte 解决方法

来源:互联网 发布:linux怎样提取dsdt 编辑:程序博客网 时间:2024/05/29 15:51

 

  最近在Ubuntu9.10上使用交叉编译器arm-linux-gcc-4.4.1 移植Qtopia2.2.0到S3c6410平台,使用常规配置方法,在编译过程中出现了

/×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××/

 

/usr/local/arm/4.4.1/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lqte
collect2: ld returned 1 exit status
make[5]: *** [../../../lib/libqpe.so.1.5.3] Error 1

make[5]: Leaving directory `/root/yizhi/qtopia-free-2.2.0/qtopia/src/libraries/qtopia'
make[4]: *** [all] Error 2

 

/ ××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××/

 

这样的错误提示,认真查看出错信息,发现在qtopia-free-2.2.0/qt2/lib目录下面没有形成 qte的库,这就说明在编译qt2目录下的文件时,出现了问题,就是说qte 没有成功的编译,因为只有成功的编译了qte才能继续编译qtopia.

 

既然是这样就来查找为什么没有成功编译qte?

 

幸好在build编译脚本里面写make 命令时,把打印信息写到了日志文件qtopia2.2.0Makelog里面

 

我的build脚本文件如下:

 

/×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××/

 

cd  qtopia-free-2.2.0


#set complie  environment  variable  
export QTDIR=/root/yizhi/qtopia-free-2.2.0/qt2
export QPEDIR=/root/yizhi/qtopia-free-2.2.0/qtopia
export LD_LIBRARY_PATH=$QTDIR/lib:$QPEDIR/lib:$LD_LIBRARY_PATH
export TMAKEDIR=/root/yizhi/qtopia-free-2.2.0/tmake
export TMAKEPATH=$TMAKEDIR/lib/qws/linux-arm-g++
export PATH=/usr/local/arm/4.4.1/bin:$PATH
#mkdir /root/yizhi/qtopia

 

echo yes | ./configure -qte '-embedded -no-xft -qconfig qpe -depths 16,32 -system-jpeg -qt-zlib -qt-libpng -gif -no-g++-exceptions -no-qvfb -xplatform linux-arm-g++ -tslib -I/usr/local/tslib/include -L/usr/local/tslib/lib ' -qpe 'edition pda -displaysize 480x272 -fontfamilies "helvetica fixed micro smallsmooth smoothtimes unifont" -xplatform linux-arm-g++ -luuid' -qt2 '-no-opengl -no-xft' -dqt '-no-xft -thread'

 

 

make 2>&1 | tee ../qtopia2.2.0Makelog && make install

 

/××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××/

 

打开qtopia2.2.0Makelog文件,Ctrl+F  出现查找对话框,输入 error关键字,果然在文件的上半部分存在未解决的error信息,呵呵

终于找到原因了,原来是缺少系统头文件 asm/page.h,

 

 

解决办法:

 

 gedit  ./ qtopia-free-2.2.0/qt2/src/kernel/qpixmapcache.cpp 

 

 修改第125行为

 

 

 

 

 

 

即:

 

#define PAGE_SHIFT       12

#define PAGE_SIZE    (1UL << PAGE_SHIFT)

#define PAGE_MASK    (~(PAGE_SIZE-1))

//# include <asm/page.h> // PAGE_SIZE,PAGE_MASK,PAGE_ALIGN

 

原因是新内核已经不包含该头文件了。

 

其他的地方也用到了该头文件,同样需要去掉

 

gedit ./qtopia-free-2.2.0/qt2/tools/qvfb/qvfbview.cpp

 

移动到第39行,修改为

 

 

 

 

 

 

就是定义了asm/page.h 文件里面存在的一些宏,这里就不需要asm/page.h文件了。

 

 

出现问题后,仔细,认真的查找,解决问题,终究会编译过去的,呵呵