您的位置:首页 > 编程语言 > Qt开发

Ubuntu 9.04系统下编译 qtopia-src-2.2.0 过程

2009-10-31 14:45 387 查看
Ubuntu 9.04系统下编译 qtopia-src-2.2.0 过程

A: 安装前准备
sudo apt-get -y install x-dev libx11-dev x11proto-xext-dev libxext-dev libqt3-mt-dev uuid uuid-dev

B:安装以下文件包, 如有依赖请先在更新管理器中更新

文件: xlibs-static-dev.tar.gz
大小: 18KB
下载: 下载

C:编译问题处理
问题 1:
make[1]: Entering directory `/home/bruce/qtopia/qt2/src/moc'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/bruce/qtopia/qt2/src/moc'
make[1]: Entering directory `/home/bruce/qtopia/qt2/src'
g++ -c -I/usr/X11R6/include -I/home/bruce/qtopia/qt2/include -I/usr/X11R6/include -pipe -O2 -Wall -W -DNO_DEBUG -fPIC -DQT_BUILTIN_GIF_READER=0 -DQT_NO_IMAGEIO_JPEG -DQT_NO_IMAGEIO_MNG -DQT_NO_XKB -I/home/bruce/qtopia/qt2/src/3rdparty/zlib -I/home/bruce/qtopia/qt2/src/3rdparty/libpng -I3rdparty/kernel -I3rdparty/tools -o tmp/release-shared-linux-g++/tools/qmemoryfile_unix.o tools/qmemoryfile_unix.cpp
tools/qmemoryfile_unix.cpp: In member function ‘QMemoryFileData* QMemoryFile::openData(const QString&, int, uint)’:
tools/qmemoryfile_unix.cpp:149: warning: format not a string literal and no format arguments
tools/qmemoryfile_unix.cpp:152: warning: format not a string literal and no format arguments
tools/qmemoryfile_unix.cpp:181: warning: format not a string literal and no format arguments
tools/qmemoryfile_unix.cpp:190: warning: format not a string literal and no format arguments
tools/qmemoryfile_unix.cpp:235: warning: format not a string literal and no format arguments
In function ‘int open(const char*, int, ...)’,
inlined from ‘QMemoryFileData* QMemoryFile::openData(const QString&, int, uint)’ at tools/qmemoryfile_unix.cpp:143:
/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
make[1]: *** [tmp/release-shared-linux-g++/tools/qmemoryfile_unix.o] Error 1
make[1]: Leaving directory `/home/bruce/qtopia/qt2/src'
* ---------------------------------------------------------------------------
*
* ERROR: Building Qtopia Tools has failed.

=======================================================================

../../libraries/qtopia/qmemoryfile_unix.cpp: In member function ‘QMemoryFileData* QMemoryFile::openData(const QString&, int, uint)’:
../../libraries/qtopia/qmemoryfile_unix.cpp:149: warning: format not a string literal and no format arguments
../../libraries/qtopia/qmemoryfile_unix.cpp:187: warning: format not a string literal and no format arguments
../../libraries/qtopia/qmemoryfile_unix.cpp:232: warning: format not a string literal and no format arguments
In function ‘int open(const char*, int, ...)’,
inlined from ‘QMemoryFileData* QMemoryFile::openData(const QString&, int, uint)’ at ../../libraries/qtopia/qmemoryfile_unix.cpp:141:
/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
make[6]: *** [.obj/release-shared/qmemoryfile_unix.o] Error 1
make[6]: Leaving directory `/media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia/src/tools/qdawggen'
make[5]: *** [all] Error 2
make[5]: Leaving directory `/media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia/src/tools/qdawggen'
make[4]: *** [sub-tools-qdawggen] Error 2
make[4]: Leaving directory `/media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia/src'
make[3]: *** [sub-src-components_pro] Error 2
make[3]: Leaving directory `/media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia'

解决办法:

if (!f)
f = ::open(tmpFile.latin1(), O_CREAT | O_WRONLY);
修改为
if (!f)
f = ::open(tmpFile.latin1(), O_CREAT | O_WRONLY, 0666);

问题 2:
WARNING: defaultbuttons-arm.conf does not exist.
Symlinking header files to include directory
Creating qmake...No makedepend available
make[1]: Entering directory `/media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia/qmake'
make[1]: Leaving directory `/media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia/qmake'

Creating pngscale...Can't exec "/media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia/bin/qmake": No such file or directory at /media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia/configure line 1822.
Error while running qmake on pngscale.pro
解决办法:
ln -s $DQTDIR/qmake/qmake $QPEDIR/bin/qmake

问题 3:
arm-linux-g++ -o fifteen .obj/release-shared/fifteen.o .obj/release-shared/main.o .obj/release-shared/moc_fifteen.o -lqtopia2 -lqtopia -lqpe -L/media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia/lib -L/media/%/EmbedDevelop/qtopia-free-2.2.0/qt2/lib -lqte
/media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia/lib/libqtopia.so: undefined reference to `uuid_generate'
collect2: ld returned 1 exit status
make[6]: *** [fifteen] Error 1
make[6]: Leaving directory `/media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia/src/games/fifteen'
make[5]: *** [all] Error 2
make[5]: Leaving directory `/media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia/src/games/fifteen'
make[4]: *** [sub-games-fifteen] Error 2
make[4]: Leaving directory `/media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia/src'
make[3]: *** [sub-src-components_pro] Error 2
make[3]: Leaving directory `/media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/media/%/EmbedDevelop/qtopia-free-2.2.0/qtopia'

解决办法:
编译e2fsprogs-1.40.2
配置如下:

#./configure --enable-elf-shlibs

#make

#cp -rf lib/libuuid.so* /usr/lib

make后, 一切都会正常。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: