• «
  • 1
  • 2
  • »
  • Pages: 1/2     Go
主题 : 关于在Ubuntu上编译Qtopia失败的原因 was: 求助,看了N久还是编译不过X86 qt附上log,请大家帮助 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 10940
精华: 0
发帖: 11
金钱: 80 两
威望: 31 点
贡献值: 0 点
综合积分: 22 分
注册时间: 2009-11-22
最后登录: 2019-04-13
楼主  发表于: 2009-11-27 09:15

 关于在Ubuntu上编译Qtopia失败的原因 was: 求助,看了N久还是编译不过X86 qt附上log,请大家帮助

我用的ubuntu 9.10+gcc version 4.4.1
[ 此帖被kasim在2010-04-08 11:29重新编辑 ]
附件: config.rar (12 K) 下载次数:19
级别: 新手上路
UID: 10940
精华: 0
发帖: 11
金钱: 80 两
威望: 31 点
贡献值: 0 点
综合积分: 22 分
注册时间: 2009-11-22
最后登录: 2019-04-13
1楼  发表于: 2009-11-27 09:43
我试着分步              ./build和./build-konq
第一个PASS了第二个exit 1,看了3小时,现在都迷糊了,请大家一定帮帮我阿     
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
2楼  发表于: 2009-11-27 11:42
/usr/bin/ld: cannot find -lqpe
collect2: ld returned 1 exit status
configure:24348: $? = 1
configure:24354: error: Cannot link small Qtopia Application. For more details look at
the end of config.log

ld找不到x86版本的libqpe.so, 可能是因为之前的x86版本的qtopia编译出错了。用build 2 >&1 |tee build.log来编译x86版本的qtopia,把生成的build.log打包传上来
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 10940
精华: 0
发帖: 11
金钱: 80 两
威望: 31 点
贡献值: 0 点
综合积分: 22 分
注册时间: 2009-11-22
最后登录: 2019-04-13
3楼  发表于: 2009-11-27 12:40
生成好了,大大帮忙看看
附件: fish.zip (163 K) 下载次数:6
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
4楼  发表于: 2009-11-27 13:13
Qtopia编译失败的原因在下面:
g++  -c -I/usr/X11R6/include -I/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/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_SM_SUPPORT -DQT_NO_XKB  -I/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2/src/3rdparty/zlib -I/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/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 file included from /usr/include/fcntl.h:217,
                 from tools/qmemoryfile_unix.cpp:50:
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] 错误 1
make[1]:正在离开目录 `/opt/FriendlyARM/mini2440/x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2/src'

在Ubuntu 9.10上, gcc会严格检查open()的参数传递,如果第二个参数为O_CREAT的话(就像qtopia-2.2.0-FriendlyARM/qt2/src/tools/qmemoryfile_unix.cpp的143行这样),必须传入第三个参数mode。因此,你可以手动修改qtopia-2.2.0-FriendlyARM/qt2/src/tools/qmemoryfile_unix.cpp 143行的
复制代码
  1. f = ::open(tmpFile.latin1(), O_CREAT | O_WRONLY);


复制代码
  1. f = ::open(tmpFile.latin1(), O_CREAT | O_WRONLY, 0644);  //default '644' mode for newly created file

然后在qtopia-2.2.0-FriendlyARM下用make && make install 重新编译qtopia.
注意修改过源代码后不要用build或build-all来编译,那样会重新解压缩源代码而覆盖你的修改。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 10940
精华: 0
发帖: 11
金钱: 80 两
威望: 31 点
贡献值: 0 点
综合积分: 22 分
注册时间: 2009-11-22
最后登录: 2019-04-13
5楼  发表于: 2009-11-27 14:21
先谢谢大大了,我按照你说的方法修改了源文件,重新生成了qtopia-2.2.0.tar.gz,编译还是过不去,我把log传上来,麻烦再帮忙看下
附件: fish.zip (144 K) 下载次数:7
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
6楼  发表于: 2009-11-27 15:08

 回 5楼(gaosiyu0607) 的帖子

如果你想重新打包源代码,不要在已经build过一次的基础上重新打包。唯一的办法是
1)手动解压x86-qtopia.tgz
2) 然后手动修改源代码,
3) 然后重新打包成x86-qtopia.tgz.

除了重新打包,更好的做法是按照Qtopia源代码包的说明,(在已经configure过一次源代码的基础上)
Qtopia is now configured.

Type "make"              to build the qtopia bundle (and the tools, if required).
Type "make install"      to install Qtopia.
Type "make cleaninstall" to install Qtopia after removing the image first (avoid stale files in the image).
Type "make clean"        to clean the qtopia bundle.

Type "make tools"        to build the tools bundle.
Type "make cleantools"   to clean the tools bundle.

To manually build a particular component (eg. because it failed to build)
source the set...Env script. eg. . ./setQpeEnv; cd $QPEDIR; make
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
路漫漫其修远兮,吾将上下而求索!
级别: 新手上路
UID: 14671
精华: 0
发帖: 40
金钱: 200 两
威望: 40 点
贡献值: 0 点
综合积分: 80 分
注册时间: 2010-02-20
最后登录: 2015-06-26
7楼  发表于: 2010-04-06 03:08
总版主,您好。

周末我按照韦东山老师书上的步骤又编译了几遍Arm-Qtopia.
我的环境是Ubuntu9.10,编译器是4.3.2

可能是我机器上最基本的软件都没装,但我做了我力所能及的。
我对Linux环境还是新手,对碰到的错误不知从何下手,请总版主和各位Linux前辈帮忙看看我的build-all 的输出文件。
在此先谢谢了!
configLog.rar (18 K) 下载次数:5
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
8楼  发表于: 2010-04-06 10:24

 回 7楼(franktu) 的帖子

从config.log看,
error: Cannot link small Qtopia Application. For more details look at
the end of config.log

是由
/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lqpe

造成的。
你没有成功的编译出ARM版本的libqpe.so。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
路漫漫其修远兮,吾将上下而求索!
级别: 新手上路
UID: 14671
精华: 0
发帖: 40
金钱: 200 两
威望: 40 点
贡献值: 0 点
综合积分: 80 分
注册时间: 2010-02-20
最后登录: 2015-06-26
9楼  发表于: 2010-04-06 22:29

 如何单独编译出ARM版本的libqpe.so

谢谢总版主!

我从书上和网上都不能找到合适的方法得到libqpe.so。
能否指点一下,如何单独编译出ARM版本的libqpe.so?
我是否要先编译x86-Qtopia,然后才能编译ARM-Qtopia?
在我的环境中,编译x86-Qtopia也是没有通过的。

谢谢!
  • «
  • 1
  • 2
  • »
  • Pages: 1/2     Go