LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1353|回复: 9

高手请进,我在安装moxa串口卡进运行make install时出错!会的看一下!

[复制链接]
发表于 2008-8-9 21:45:53 | 显示全部楼层 |阅读模式
/mxdrv/driver/moxa.c:295: error: expected ')' before string constant
/mxdrv/driver/moxa.c:296: error: expected ')' before string constant
/mxdrv/driver/moxa.c:297: error: expected ')' before string constant
/mxdrv/driver/moxa.c:298: error: expected ')' before string constant
/mxdrv/driver/moxa.c:299: error: expected ')' before string constant
/mxdrv/driver/moxa.c:300: error: expected ')' before string constant
/mxdrv/driver/moxa.c:421: warning: initialization from incompatible pointer type
/mxdrv/driver/moxa.c: In function 'moxa_init':
/mxdrv/driver/moxa.c:522: error: 'TTY_DRIVER_NO_DEVFS' undeclared (first use in                                              this function)
/mxdrv/driver/moxa.c:522: error: (Each undeclared identifier is reported only on                                             ce
/mxdrv/driver/moxa.c:522: error: for each function it appears in.)
/mxdrv/driver/moxa.c:541: warning: assignment from incompatible pointer type
/mxdrv/driver/moxa.c: In function 'moxa_ioctl':
/mxdrv/driver/moxa.c:1288: warning: implicit declaration of function 'verify_are                                             a'
/mxdrv/driver/moxa.c: In function 'receive_data':
/mxdrv/driver/moxa.c:1797: error: 'struct tty_struct' has no member named 'flip'
/mxdrv/driver/moxa.c:1805: error: 'struct tty_struct' has no member named 'flip'
/mxdrv/driver/moxa.c:1806: error: 'struct tty_struct' has no member named 'flip'
/mxdrv/driver/moxa.c:1807: error: 'struct tty_struct' has no member named 'flip'
/mxdrv/driver/moxa.c:1824: error: 'struct tty_struct' has no member named 'flip'
/mxdrv/driver/moxa.c:1825: error: 'struct tty_struct' has no member named 'flip'
/mxdrv/driver/moxa.c:1826: error: 'struct tty_struct' has no member named 'flip'
make[3]: *** [/mxdrv/driver/moxa.o] Error 1
make[2]: *** [_module_/mxdrv/driver] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-2.6.18-4-486'
make[1]: *** [module] Error 2
make[1]: Leaving directory `/mxdrv/driver'
make: *** [driver_install] Error 2
 楼主| 发表于 2008-8-9 21:46:51 | 显示全部楼层
更完整的内容:

        make install
make[1]: Entering directory `/mxdrv/driver'
cc -DLINUX moxaload.c -o moxaload
moxaload.c: In function 'main':
moxaload.c:105: warning: incompatible implicit declaration of built-in function                                              'exit'
moxaload.c: In function 'errexit':
moxaload.c:482: warning: incompatible implicit declaration of built-in function                                              'exit'
strip   moxaload
make -C /lib/modules/2.6.18-4-486/build SUBDIRS=/mxdrv/driver modules
make[2]: Entering directory `/usr/src/linux-headers-2.6.18-4-486'
  CC [M]  /mxdrv/driver/moxa.o
/mxdrv/driver/moxa.c:295: error: expected ')' before string constant
/mxdrv/driver/moxa.c:296: error: expected ')' before string constant
/mxdrv/driver/moxa.c:297: error: expected ')' before string constant
/mxdrv/driver/moxa.c:298: error: expected ')' before string constant
/mxdrv/driver/moxa.c:299: error: expected ')' before string constant
/mxdrv/driver/moxa.c:300: error: expected ')' before string constant
/mxdrv/driver/moxa.c:421: warning: initialization from incompatible pointer type
/mxdrv/driver/moxa.c: In function 'moxa_init':
/mxdrv/driver/moxa.c:522: error: 'TTY_DRIVER_NO_DEVFS' undeclared (first use in                                              this function)
/mxdrv/driver/moxa.c:522: error: (Each undeclared identifier is reported only on                                             ce
/mxdrv/driver/moxa.c:522: error: for each function it appears in.)
/mxdrv/driver/moxa.c:541: warning: assignment from incompatible pointer type
/mxdrv/driver/moxa.c: In function 'moxa_ioctl':
/mxdrv/driver/moxa.c:1288: warning: implicit declaration of function 'verify_are                                             a'
/mxdrv/driver/moxa.c: In function 'receive_data':
/mxdrv/driver/moxa.c:1797: error: 'struct tty_struct' has no member named 'flip'
/mxdrv/driver/moxa.c:1805: error: 'struct tty_struct' has no member named 'flip'
/mxdrv/driver/moxa.c:1806: error: 'struct tty_struct' has no member named 'flip'
/mxdrv/driver/moxa.c:1807: error: 'struct tty_struct' has no member named 'flip'
/mxdrv/driver/moxa.c:1824: error: 'struct tty_struct' has no member named 'flip'
/mxdrv/driver/moxa.c:1825: error: 'struct tty_struct' has no member named 'flip'
/mxdrv/driver/moxa.c:1826: error: 'struct tty_struct' has no member named 'flip'
make[3]: *** [/mxdrv/driver/moxa.o] Error 1
make[2]: *** [_module_/mxdrv/driver] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-2.6.18-4-486'
make[1]: *** [module] Error 2
make[1]: Leaving directory `/mxdrv/driver'
make: *** [driver_install] Error 2
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-8-10 12:41:41 | 显示全部楼层
没有人知道吗?这个错误是什么意思
/mxdrv/driver/moxa.c:295: error: expected ')' before string constant
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-8-12 09:50:27 | 显示全部楼层
顶起来!大家帮忙看看!
回复 支持 反对

使用道具 举报

发表于 2008-8-13 20:39:09 | 显示全部楼层
不清楚 moxa 是啥玩意,但似乎該軟件需要 devfs 相關的定義,可是內核自 2.6.13.x 後廢除了 devfs,也就是說用新版內核的 headers 是沒有 devfs 的定義的,也許樓主找個舊版內核及頭文件才能進行編譯

以上只屬推測,如果依然不行,請見諒。

建議樓主查看該軟件的編譯條件是否滿足。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-8-13 21:39:26 | 显示全部楼层
非常感谢楼上的朋友!我用的是2.6.18-4-686版本的,我现在重新安装后又试了一下出来这样的提示!
make install
make[1]: Entering directory `/mxdrv/utility'
cd diag;\
        make install
make[2]: Entering directory `/mxdrv/utility/diag'
cc -O -c -DLINUX        diag.c
diag.c:11:19: stdio.h: ?????????
diag.c:12:19: fcntl.h: ?????????
In file included from diag.c:16:
../global.h:40: error: syntax error before "ushort"
../global.h:40: warning: no semicolon at end of struct or union
../global.h:41: warning: data definition has no type or storage class
../global.h:42: warning: data definition has no type or storage class
../global.h:47: error: syntax error before "ulong"
../global.h:47: warning: no semicolon at end of struct or union
../global.h:49: error: syntax error before "pciInfo"
../global.h:49: warning: data definition has no type or storage class
../global.h:50: warning: data definition has no type or storage class
diag.c: In function `main':
diag.c:34: error: syntax error before "moxa_boards"
diag.c:40: error: `O_RDWR' undeclared (first use in this function)
diag.c:40: error: (Each undeclared identifier is reported only once
diag.c:40: error: for each function it appears in.)
diag.c:60: error: `moxa_boards' undeclared (first use in this function)
make[2]: *** [diag.o] Error 1
make[2]: Leaving directory `/mxdrv/utility/diag'
make[1]: *** [diag_install] Error 2
make[1]: Leaving directory `/mxdrv/utility'
make: *** [utility_install] Error 2
回复 支持 反对

使用道具 举报

发表于 2008-8-13 22:21:44 | 显示全部楼层
make 通过了麽?
回复 支持 反对

使用道具 举报

发表于 2008-8-13 23:25:51 | 显示全部楼层
内核自带moxa驱动的,没必要自己编译,找找看你的内核模块中有没有现成的。
你需要安装的可能只是moxa的用户端管理程序。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-8-14 11:41:36 | 显示全部楼层
Post by 聚焦深空;1885710
内核自带moxa驱动的,没必要自己编译,找找看你的内核模块中有没有现成的。
你需要安装的可能只是moxa的用户端管理程序。



这个不知道怎么装,我现在只要能认到这个卡就OK了!
回复 支持 反对

使用道具 举报

发表于 2008-8-14 13:58:47 | 显示全部楼层
直接运行
modprobe moxa
查看dmesg输出看硬件信息,
加载成功后,就找到卡啦,但这样是不能用的,你还差用户端程序。

diag.c:11:19: stdio.h: [color="Red"]?????????
diag.c:12:19: fcntl.h: [color="Red"]?????????
diag.c:40: error: [color="Red"]`O_RDWR' undeclared (first use in this function)

看起来,你机器上头文件缺失。

上moxa官网,看有没有软件包升级。

不行就找moxa供货商客服好好聊聊。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表