感谢支持
我们一直在努力

SUSE 10.3下成功重新编译了qtopia 2.2.0

在SUSE 10.3下重新编译了一遍qtopia 2.2.0,基本上参照网上的资料。


主机为SUSE 10.3。感觉busybox和qtopia要用同样的gcc,关键是lib。


来不及细细整理,大致过程如下,最后还摘抄了点错误和解决方法。


zlib


./configure –shared


vi Makefile


CC=/usr/local/arm/3.4.1/bin/arm-linux-gcc


LDSHARED=/usr/local/arm/3.4.1/bin/arm-linux-gcc -shared -Wl,-soname,libz.so.1


CPP=/usr/local/arm/3.4.1/bin/arm-linux-gcc -E


AR=/usr/local/arm/3.4.1/bin/arm-linux-ar rc


RANLIB=/usr/local/arm/3.4.1/bin/arm-linux-ranlib


生成libz.so        libz.so.1      libz.so.1.2.3 


cp libz.so* ../dist/lib/


cp *.h ../dist/inlucde/


cd e2fsprogs-1.40.2


export PATH=$PATH:/usr/local/arm/3.4.1/bin


./configure –host=arm-linux CC=arm-linux-gcc  –enable-elf-shlibs


修改/usr/local/arm/3.4.1/arm-linux/sys-include/linux


中fd.h


添加#include <linux/compiler.h>


make


生成lib/libuuid.so *


cp lib/libuuid.so* ../dist/lib/


cd jpeg-6b/


(export PATH=$PATH:/usr/local/arm/3.4.1/bin)


./configure –host=arm-linux-gcc CC=arm-linux-gcc


make


生成libjpeg.a


cp libjpeg.a ../dist/lib/


cd libpng-1.2.23/


(export PATH=$PATH:/usr/local/arm/3.4.1/bin)


cp scripts/makefile.linux ./Makefile


vi Makefile


AR_RC=arm-linux-ar rc


CC=arm-linux-gcc


RANLIB=arm-linux-ranlib


ZLIBLIB=/home/wangbin/work/qt/zlib-1.2.3


ZLIBINC=/home/wangbin/work/qt/zlib-1.2.3


make


cp libpng12.so ../dist/lib/libpng.so


cp libpng12.so* ../dist/lib/


cp *.h ../dist/inlucde/


cd tslib-1.3/


./autogen.h


./configure –host=arm-linux CC=arm-linux-gcc


cd plugins


sed ‘s/-rpath \$(PLUGIN_DIR)/-rpath \`cd \$(PLUGIN_DIR) \&\& pwd\`/’ Makefile>Makefile.temp


(LDFLAGS :=$(LDFLAGS) -rpath `cd $(PLUGIN_DIR) && pwd`)


rm Makefile -f


mv Makefile.temp Makefile


cd ..


make


cp src/.libs/libts* ../dist/lib/


cp src/*.h ../dist/inlucde/


以下生成本机用的uic designer等工具


cd qt2


export QTDIR=$PWD


export TMAKEDIR=/home/wangbin/work/qt/qtopia-free-2.2.0/tmake


export TMAKEPATH=$TMAKEDIR/lib/linux-g++


export PATH=$PATH:$TMAKEDIR/bin


echo yes|./configure -static -no-xft -no-sm


begin


cd src/tools/


sed ‘s/remove( this->fromLast() )/this->remove( this->fromLast())/’ qvaluestack.h>temp.h


rm -f qvaluestack.h


mv temp.h qvaluestack.h


cd ../../


over


make -C src/moc


make -C src


make -C tools/designer


make -C tools/qvfb


qvfbview.o qvfbview.cpp


qvfbview.cpp: In constructor ‘QVFbView::QVFbView(int, int, int, int, QVFbView::Rotation, bool, QWidget*, const char*, uint)’:


qvfbview.cpp:171: error: cast from ‘unsigned char*’ to ‘int’ loses precision


make: *** [qvfbview.o] 错误 1


if ( (unsigned char *)data ==(unsigned char *) -1 ){


make


cp tools/qvfb/qvfb bin


cd qtopia-free-2.2.0/


vi qtopia/mkspecs/qws/linux-arm-g++/qmake.conf


将此行


      QMAKE_LIBS_QT = -lqte


      修改为


      QMAKE_LIBS_QT = -lqte -lpng -lts -lz -luuid -ljpeg


export QTDIR=/home/wangbin/work/qt/qtopia-free-2.2.0/qt2


export QPEDIR=/home/wangbin/work/qt/qtopia-free-2.2.0/qtopia


export LD_LIBRARY_PATH=$QTDIR/lib:$QPEDIR/lib:$LD_LIBRARY_PATH


export TMAKEDIR=/home/wangbin/work/qt/qtopia-free-2.2.0/tmake


export TMAKEPATH=$TMAKEDIR/lib/qws/linux-arm-g++


export PATH=$PATH:$TMAKEDIR/bin:/usr/local/arm/3.4.1/bin


export PATH=$PATH:$QTDIR/bin:$QPEDIR/bin


cp $QPEDIR/src/qt/qconfig-qpe.h $QTDIR/src/tools


cd $QPEDIR/src/libraries/qtopia


cp custom-linux-ipaq-g++.cpp custom-linux-arm-g++.cpp


cp custom-linux-ipaq-g++.h custom-linux-arm-g++.h


cd /home/wangbin/work/qt/qtopia-free-2.2.0/


export PATH=$PATH:/usr/local/arm/3.4.1/bin


./configure -qte “-embedded -xplatform linux-arm-g++ -qconfig qpe -no-qvfb -depths 16 -system-jpeg -system-libpng -system-zlib -tslib -gif -thread -no-xft -release -I/home/wangbin/work/qt/dist/include -L/home/wangbin/work/qt/dist/lib -lpng -lts -lz -luuid -ljpeg” -qpe “-xplatform linux-arm-g++ -edition pda -displaysize 240×320 -I/home/wangbin/work/qt/dist/include -L/home/wangbin/work/qt/dist/lib -prefix=/home/wangbin/work/qt/dist/qtopia”


vi qtopia-free-2.2.0/qtopia/src/libraries/qtopia/qdawg.cpp


:294:


//   QDawgPrivate::~QDawgPrivate()


    ~QDawgPrivate()


yes


make


make install


qconfig.h


Qpainter要能够旋转的话,去掉QT_NO_TRANSFORMATIONS


所以实际要注释的宏是/qt/src/tools/ qconfig-qpe.h和/qt/src/tools/qfeart

鼠标:


#define QWS_MOUSE_IPAQ
#define QWS_MOUSE_IPAQ_RAW
#define QT_QWS_IPAQ
// Mouse not normally supported or needed.
// (enabling these, eg. so that USB mouse works can be done,
// but cursor should be turned on/off when device connected)
//#ifndef QT_NO_QWS_CURSOR
//#define QT_NO_QWS_CURSOR
//#endif
//#ifndef QT_NO_QWS_MOUSE_AUTO
//#define QT_NO_QWS_MOUSE_AUTO
//#endif
//#ifndef QT_NO_QWS_MOUSE_PC
//#define QT_NO_QWS_MOUSE_PC
//#endif


还要写一个/etc/pointercal文件



Q1:在Build Qt2.3.2时make出现如下问题:


xml/qxml.h:214: 警告:‘class QXmlReader’ 有虚函数却没有虚析构函数
xml/qxml.h:402: 警告:‘class QXmlContentHandler’ 有虚函数却没有虚析构函数
xml/qxml.h:419: 警告:‘class QXmlErrorHandler’ 有虚函数却没有虚析构函数
xml/qxml.h:428: 警告:‘class QXmlDTDHandler’ 有虚函数却没有虚析构函数
xml/qxml.h:436: 警告:‘class QXmlEntityResolver’ 有虚函数却没有虚析构函数
xml/qxml.h:443: 警告:‘class QXmlLexicalHandler’ 有虚函数却没有虚析构函数
xml/qxml.h:456: 警告:‘class QXmlDeclHandler’ 有虚函数却没有虚析构函数
xml/qxml.cpp:1518: 警告:未使用的参数 ‘ret’
/qt/qtx11/include/qvaluestack.h: In member function ‘T QValueStack<T>::pop() [with T = QMap<QString, QString>]’:
xml/qxml.cpp:513:  instantiated from here
/qt/qtx11/include/qvaluestack.h:57: 错误:不能从 ‘QValueListIterator<QMap<QString, QString> >’ 转换到 ‘const char*’,为实参 ‘1’(属于 ‘int remove(const char*)’)
/qt/qtx11/include/qvaluestack.h: In member function ‘T QValueStack<T>::pop() [with T = QString]’:
xml/qxml.cpp:2502:  instantiated from here
/qt/qtx11/include/qvaluestack.h:57: 错误:不能从 ‘QValueListIterator<QString>’ 转换到 ‘const char*’,为实参 ‘1’(属于 ‘int remove(const char*)’)
make[2]: *** [xml/qxml.o] 错误 1
make[2]: Leaving directory `/qt/qtx11/src’
make[1]: *** [sub-src] 错误 2
make[1]: Leaving directory `/qt/qtx11′
make: *** [init] 错误 2


成功编译的方法:


更改qt-2.3.2文件夹中src/tools/qvaluestack.h第57行源代码:
remove (this->formLast() );
为:
this->remove (this->formLast() );


configure时要使用以下语句:


./configure -debug -no-opengl -no-xft


Q2:在Build Qt/Embedded时make出现以下问题:


error: ‘QWSInputMethod’ has not been declared


修正方法:


cd $QTDIR/src/kernel //$DTDIR=/home/opiehome/qt-2.3.10


gedit qwindowsystem_qws.h


在前面增加以下两行:


class QWSInputMethod;


class QWSGestureMethod;


Q3:在cp一些大点的文件时,出现NFS的错误:


nfs: server *** not responding, still trying


修改方法:


nfs mount时候出现的NFS崩溃,按照以下的方式mount
mount -t nfs -o intr,nolock,rsize=1024,wsize=1024 192.168.1.3/root/somedir /host


Q4:在测试时,“./progressbar -qws”后出现如Q3一样的提示 ,按Q3来处理



./../libraries/qtopia/qdawg.cpp:294: 错误:有多余的限定                ‘QDawgPrivate::’                在成员                ‘QDawgPrivate’                上
make[6]: *** [.obj/release-shared/qdawg.o] 错误 1
make[5]: *** [all] 错误 2
make[4]: *** [sub-tools-qdawggen] 错误 2
make[3]: *** [sub-src-components_pro] 错误 2
make[2]: *** [all] 错误 2
make[1]: *** [all] 错误 2
解决办法:
vi /home/qtopia-arm-home/nfs/qtopia-free-2.2.0/qtopia/src/libraries/qtopia/qdawg.cpp
//   QDawgPrivate::~QDawgPrivate()
    ~QDawgPrivate()

赞(0) 打赏
转载请注明出处:服务器评测 » SUSE 10.3下成功重新编译了qtopia 2.2.0
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏