有人在gutsy下成功编译qtopia-opensource没?

内核编译和嵌入式产品的设计与开发
回复
scofield
帖子: 35
注册时间: 2006-07-14 17:32
送出感谢: 0
接收感谢: 0

有人在gutsy下成功编译qtopia-opensource没?

#1

帖子 scofield » 2007-11-13 16:06

试过编译qtopia-opensource-4.2.0和qtopia-core-opensource-src-4.3.1,都在make的时候提示error,4.3.1的错误信息忘了,4.2.0的如下:lan.cpp:550: error: ‘union iwreq::<anonymous>’ has no member named ‘ifrn_name’
编译的步骤如下:
1.tar zxvf qtopia-opensource--src-4.2.0.tar.gz
2.cd qtopia-opensource-4.2.0
3. ./configure
4. make
然后make了好长时间就提示出错了
头像
ChenJunsheng
帖子: 52
注册时间: 2006-08-19 8:27
送出感谢: 0
接收感谢: 0

#2

帖子 ChenJunsheng » 2007-11-13 16:17

没有编译过,QT我一窍不通,不过不是有源码吗?
看看lan.cpp 第550行的那个类吧
scofield
帖子: 35
注册时间: 2006-07-14 17:32
送出感谢: 0
接收感谢: 0

#3

帖子 scofield » 2007-11-13 16:32

550行代码如下:
549 struct iwreq wrq;
550 strcpy( wrq.ifr_name, dev.toLatin1().constData() );

那个类没找到在哪定义的,lan.cpp这个文件里没有找到
头像
ChenJunsheng
帖子: 52
注册时间: 2006-08-19 8:27
送出感谢: 0
接收感谢: 0

#4

帖子 ChenJunsheng » 2007-11-13 16:40

如果有全部的源码,这个结构体应该有声明的,找找看。
或者整个工程搜索一下iwreq,应该有的。
我在Windows下面被SourceInsight宠坏了,现在在Linux下面都不知道怎么干这些事情。据说Emac+Ctag可以做到。
scofield
帖子: 35
注册时间: 2006-07-14 17:32
送出感谢: 0
接收感谢: 0

#5

帖子 scofield » 2007-11-13 16:58

找到了,lan.cpp包含了一个wireless.h头文件,这个文件在/usr/include/linux里面,iwreq结构体的定义如下:

struct iwreq
{
union
{
char ifrn_name[IFNAMSIZ]; /* if name, e.g. "eth0" */
} ifr_ifrn;

/* Data part (defined just above) */
union iwreq_data u;
};
头像
ChenJunsheng
帖子: 52
注册时间: 2006-08-19 8:27
送出感谢: 0
接收感谢: 0

#6

帖子 ChenJunsheng » 2007-11-13 17:04

刚才去下载了Qtopia 4.20,我看了一下代码
lan.cpp的550行前后是这样的

代码: 全选

#ifndef NO_WIRELESS_LAN
                    struct iwreq wrq;
                    strcpy( wrq.ifr_name, dev.toLatin1().constData() );
                    int ret = ioctl( sock, SIOCGIWNAME, &wrq );
                    //ret is <0 if this device is not a wireless device
                    if ( ret < 0 ) {
#endif
而这个NO_WIRELESS_LAN在我下载的这个工程里面是已经定义过的,所以这段代码应该是不会走进去的。
至于iwreq,应该是在linux/wireless.h里面声明的一个结构体。你可以看看lan.cpp第39行include的头文件。
scofield
帖子: 35
注册时间: 2006-07-14 17:32
送出感谢: 0
接收感谢: 0

#7

帖子 scofield » 2007-11-13 18:27

还是不行,make时还是有错,我把错误的一段贴出来,如下
  • make[5]: Entering directory `/home/gaojing/arm/qtopia-opensource-4.2.0/src/plugins/network/lan'
    g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQTOPIA_POSIX_LOCKS -DQT_KEYPAD_NAVIGATION -DQT_NO_PLUGIN_CHECK -DQT_EXTERNAL_SOUND_SERVER -DQPE_NO_COMPAT -DBUILDER=\"gaojing@ubuntu\" -DQTOPIA_PHONE -DQTOPIA_INFRARED -DQT_NO_SXE -DQTOPIA_FREE -DQTOPIA_KEYPAD_NAVIGATION -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SVG_LIB -DQT_SQL_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQTOPIA_TARGET=\"lan\" -DQT_SHARED -I/home/gaojing/arm/qtopia-opensource-4.2.0/qtopiacore/qt/mkspecs/qws/linux-generic-g++ -I. -I/home/gaojing/arm/qtopia-opensource-4.2.0/qtopiacore/target/include/QtCore -I/home/gaojing/arm/qtopia-opensource-4.2.0/qtopiacore/target/include/QtCore -I/home/gaojing/arm/qtopia-opensource-4.2.0/qtopiacore/target/include/QtNetwork -I/home/gaojing/arm/qtopia-opensource-4.2.0/qtopiacore/target/include/QtNetwork -I/home/gaojing/arm/qtopia-opensource-4.2.0/qtopiacore/target/include/QtGui -I/home/gaojing/arm/qtopia-opensource-4.2.0/qtopiacore/target/include/QtGui -I/home/gaojing/arm/qtopia-opensource-4.2.0/qtopiacore/target/include/QtXml -I/home/gaojing/arm/qtopia-opensource-4.2.0/qtopiacore/target/include/QtXml -I/home/gaojing/arm/qtopia-opensource-4.2.0/qtopiacore/target/include/QtSql -I/home/gaojing/arm/qtopia-opensource-4.2.0/qtopiacore/target/include/QtSql -I/home/gaojing/arm/qtopia-opensource-4.2.0/qtopiacore/target/include/QtSvg -I/home/gaojing/arm/qtopia-opensource-4.2.0/qtopiacore/target/include/QtSvg -I/home/gaojing/arm/qtopia-opensource-4.2.0/qtopiacore/target/include -I/home/gaojing/arm/qtopia-opensource-4.2.0/qtopiacore/target/include -I/home/gaojing/arm/qtopia-opensource-4.2.0/include -I/home/gaojing/arm/qtopia-opensource-4.2.0/include/classic -I.moc/release-shared -I.ui/release-shared -I/home/gaojing/arm/qtopia-opensource-4.2.0/include/qtopiabase -I/home/gaojing/arm/qtopia-opensource-4.2.0/include/qtopia -I/home/gaojing/arm/qtopia-opensource-4.2.0/qtopiacore/qt/src/3rdparty/zlib -I/home/gaojing/arm/qtopia-opensource-4.2.0/include/qtopiacomm -o .obj/release-shared/lan.o lan.cpp
    /usr/include/linux/wireless.h:650: error: ‘__s32’ does not name a type
    /usr/include/linux/wireless.h:651: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:652: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:653: error: ‘__u16’ does not name a type
    /usr/include/linux/wireless.h:663: error: ‘__u16’ does not name a type
    /usr/include/linux/wireless.h:664: error: ‘__u16’ does not name a type
    /usr/include/linux/wireless.h:677: error: ‘__s32’ does not name a type
    /usr/include/linux/wireless.h:678: error: ‘__s16’ does not name a type
    /usr/include/linux/wireless.h:679: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:680: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:688: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:690: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:691: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:692: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:704: error: ‘__u32’ does not name a type
    /usr/include/linux/wireless.h:705: error: ‘__u32’ does not name a type
    /usr/include/linux/wireless.h:706: error: ‘__u32’ does not name a type
    /usr/include/linux/wireless.h:707: error: ‘__u32’ does not name a type
    /usr/include/linux/wireless.h:708: error: ‘__u32’ does not name a type
    /usr/include/linux/wireless.h:717: error: ‘__u32’ does not name a type
    /usr/include/linux/wireless.h:744: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:745: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:746: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:748: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:760: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:772: error: ‘__u32’ does not name a type
    /usr/include/linux/wireless.h:773: error: ‘__u32’ does not name a type
    /usr/include/linux/wireless.h:806: error: ‘__u32’ does not name a type
    /usr/include/linux/wireless.h:807: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:808: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:812: error: ‘__u16’ does not name a type
    /usr/include/linux/wireless.h:813: error: ‘__u16’ does not name a type
    /usr/include/linux/wireless.h:814: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:820: error: ‘__u16’ does not name a type
    /usr/include/linux/wireless.h:821: error: ‘__u16’ does not name a type
    /usr/include/linux/wireless.h:834: error: ‘__u32’ does not name a type
    /usr/include/linux/wireless.h:836: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:842: error: ‘__u32’ does not name a type
    /usr/include/linux/wireless.h:844: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:851: error: ‘__u32’ does not name a type
    /usr/include/linux/wireless.h:852: error: ‘__u32’ does not name a type
    /usr/include/linux/wireless.h:863: error: ‘__u16’ does not name a type
    /usr/include/linux/wireless.h:886: error: ‘IFNAMSIZ’ was not declared in this scope
    /usr/include/linux/wireless.h:901: error: ‘__u32’ does not name a type
    /usr/include/linux/wireless.h:925: error: ‘IFNAMSIZ’ was not declared in this scope
    /usr/include/linux/wireless.h:945: error: ‘__u32’ does not name a type
    /usr/include/linux/wireless.h:954: error: ‘__u32’ does not name a type
    /usr/include/linux/wireless.h:955: error: ‘__u32’ does not name a type
    /usr/include/linux/wireless.h:958: error: ‘__u16’ does not name a type
    /usr/include/linux/wireless.h:959: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:962: error: ‘__u32’ does not name a type
    /usr/include/linux/wireless.h:965: error: ‘__s32’ does not name a type
    /usr/include/linux/wireless.h:985: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:986: error: ‘__s32’ does not name a type
    /usr/include/linux/wireless.h:989: error: ‘__s32’ does not name a type
    /usr/include/linux/wireless.h:990: error: ‘__s32’ does not name a type
    /usr/include/linux/wireless.h:993: error: ‘__s32’ does not name a type
    /usr/include/linux/wireless.h:994: error: ‘__s32’ does not name a type
    /usr/include/linux/wireless.h:997: error: ‘__s32’ does not name a type
    /usr/include/linux/wireless.h:998: error: ‘__s32’ does not name a type
    /usr/include/linux/wireless.h:999: error: ‘__s32’ does not name a type
    /usr/include/linux/wireless.h:1000: error: ‘__s32’ does not name a type
    /usr/include/linux/wireless.h:1001: error: ‘__u16’ does not name a type
    /usr/include/linux/wireless.h:1002: error: ‘__u16’ does not name a type
    /usr/include/linux/wireless.h:1003: error: ‘__u16’ does not name a type
    /usr/include/linux/wireless.h:1006: error: ‘__u16’ does not name a type
    /usr/include/linux/wireless.h:1007: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:1008: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:1010: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:1013: error: ‘__u16’ does not name a type
    /usr/include/linux/wireless.h:1014: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:1015: error: ‘__s32’ does not name a type
    /usr/include/linux/wireless.h:1018: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:1019: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:1022: error: ‘__u16’ does not name a type
    /usr/include/linux/wireless.h:1023: error: ‘__u16’ does not name a type
    /usr/include/linux/wireless.h:1024: error: ‘__u16’ does not name a type
    /usr/include/linux/wireless.h:1025: error: ‘__s32’ does not name a type
    /usr/include/linux/wireless.h:1026: error: ‘__s32’ does not name a type
    /usr/include/linux/wireless.h:1027: error: ‘__s32’ does not name a type
    /usr/include/linux/wireless.h:1028: error: ‘__s32’ does not name a type
    /usr/include/linux/wireless.h:1031: error: ‘__u16’ does not name a type
    /usr/include/linux/wireless.h:1032: error: ‘__u8’ does not name a type
    /usr/include/linux/wireless.h:1037: error: ‘__u32’ does not name a type
    /usr/include/linux/wireless.h:1046: error: ‘__u32’ does not name a type
    /usr/include/linux/wireless.h:1047: error: ‘__u16’ does not name a type
    /usr/include/linux/wireless.h:1048: error: ‘__u16’ does not name a type
    /usr/include/linux/wireless.h:1049: error: ‘IFNAMSIZ’ was not declared in this scope
    /usr/include/linux/wireless.h:1064: error: ‘__u16’ does not name a type
    /usr/include/linux/wireless.h:1065: error: ‘__u16’ does not name a type
    lan.cpp: In member function ‘bool LanImpl::isAvailable() const’:
    lan.cpp:550: error: ‘union iwreq::<anonymous>’ has no member named ‘ifrn_name’
    make[5]: *** [.obj/release-shared/lan.o] Error 1
    make[5]: Leaving directory `/home/gaojing/arm/qtopia-opensource-4.2.0/src/plugins/network/lan'
    make[4]: *** [all] Error 2
    make[4]: Leaving directory `/home/gaojing/arm/qtopia-opensource-4.2.0/src/plugins/network/lan'
    make[3]: *** [sub-plugins-network-lan] Error 2
    make[3]: Leaving directory `/home/gaojing/arm/qtopia-opensource-4.2.0/src'
    make[2]: *** [all] Error 2
    make[2]: Leaving directory `/home/gaojing/arm/qtopia-opensource-4.2.0/src'
    make[1]: *** [qtopia_all] Error 2
    make[1]: Leaving directory `/home/gaojing/arm/qtopia-opensource-4.2.0'
    make: *** [all] Error 2
lightning123
帖子: 19
注册时间: 2007-02-25 12:59
送出感谢: 0
接收感谢: 0

#8

帖子 lightning123 » 2007-11-29 11:29

我直接用deb包安装成功过
源码从没成功过
sciwander
帖子: 33
注册时间: 2006-09-14 20:23
送出感谢: 0
接收感谢: 0

#9

帖子 sciwander » 2007-12-04 18:06

我编译过好几次都过了,可能和编译器相关,尽量下载新的,对gcc-4支持的好些
scofield
帖子: 35
注册时间: 2006-07-14 17:32
送出感谢: 0
接收感谢: 0

#10

帖子 scofield » 2007-12-06 15:58

我的GCC version 4.1.3 编译没通过
zhouxin0223
帖子: 4
注册时间: 2008-01-03 14:32
送出感谢: 0
接收感谢: 0

#11

帖子 zhouxin0223 » 2008-01-28 2:25

正在用超级终端编译中,请问你们编译花了多少时间,我之前编译qt-x11,4.3.0版本的花了有3小时,正在编译的qtopia-4.3.0也有至少2小时了。我的系统是gutsy,内存1g,cpu是amd2600,编译器用的是gcc-4.1.1,实在不懂怎么这么慢,以前在fedora下编译内核的时间最多也就1个小时。编译过的说说你们用的时间阿,参考一下,好纳闷阿!
SUPERFIGHT
帖子: 17
注册时间: 2007-11-10 15:51
送出感谢: 0
接收感谢: 0

#12

帖子 SUPERFIGHT » 2008-03-16 0:18

靠~

新立得集成了 QT3 QT4~ 咋没有QTOPIA 4呢~

= = 快点把QTOPIA 4也加进去吧~
landwalker
帖子: 2
注册时间: 2008-04-02 11:17
送出感谢: 0
接收感谢: 0

#13

帖子 landwalker » 2008-04-02 11:21

修改wireless.h

添加
#include <linux/if.h>
#include <linux/types.h>

重新make
bestvalentine
帖子: 1
注册时间: 2008-04-08 16:53
送出感谢: 0
接收感谢: 0

#14

帖子 bestvalentine » 2008-04-08 16:56

13楼,正解,我也遇到了这个问题,加了那两个头文件就继续编译了,多谢多谢
回复

回到 “内核及嵌入式开发”