求高手编译!!!!!!!!!!!!!!!!

编译打包和其他
回复
头像
pllion
帖子: 216
注册时间: 2008-11-09 9:06

求高手编译!!!!!!!!!!!!!!!!

#1

帖子 pllion » 2009-11-05 0:32

karmic i386

求高手帮忙编译下,我编译的时候提示有变量没有声明,请大侠指教! 谢谢!
附件
lrmi-0.10(2).tar.gz
(10.03 KiB) 已下载 101 次
viewtopic.php?f=33&t=172235
Sometimes I wonder will God ever forgive us for what we've done to each other? Then I look around and I realize,God left this place a long time ago.
头像
wangdu2002
帖子: 13284
注册时间: 2008-12-13 19:39
来自: 物华天宝人杰地灵

Re: 求高手编译!!!!!!!!!!!!!!!!

#2

帖子 wangdu2002 » 2009-11-05 0:38

某是菜鸟,U910的系统。。。下回来编译了下,也是提示变量没有声明。。。应该是源码不规范的原因,向作者反馈bug吧。
wdub1004@wdnb01:/tmp/lrmi-0.10$ sudo make
[sudo] password for wdub1004:
cc -c -g -Wall -o lrmi.o lrmi.c
lrmi.c: In function ‘set_regs’:
lrmi.c:400: error: ‘IF_MASK’ undeclared (first use in this function)
lrmi.c:400: error: (Each undeclared identifier is reported only once
lrmi.c:400: error: for each function it appears in.)
lrmi.c:400: error: ‘IOPL_MASK’ undeclared (first use in this function)
lrmi.c: In function ‘run_vm86’:
lrmi.c:825: error: ‘VIF_MASK’ undeclared (first use in this function)
lrmi.c:825: error: ‘TF_MASK’ undeclared (first use in this function)
lrmi.c: In function ‘LRMI_int’:
lrmi.c:1052: error: ‘IF_MASK’ undeclared (first use in this function)
lrmi.c:1052: error: ‘IOPL_MASK’ undeclared (first use in this function)
make: *** [lrmi.o] 错误 1
wdub1004@wdnb01:/tmp/lrmi-0.10$
行到水穷处,坐看云起时。
海内生明月,天涯共此夕。
--------------------吾本独!
头像
pllion
帖子: 216
注册时间: 2008-11-09 9:06

Re: 求高手编译!!!!!!!!!!!!!!!!

#3

帖子 pllion » 2009-11-05 23:04

thanks,我也认为应该是源码问题!
viewtopic.php?f=33&t=172235
Sometimes I wonder will God ever forgive us for what we've done to each other? Then I look around and I realize,God left this place a long time ago.
enthumelon
帖子: 86
注册时间: 2006-11-29 10:18
来自: USTC
联系:

Re: 求高手编译!!!!!!!!!!!!!!!!

#4

帖子 enthumelon » 2009-11-07 16:29

没有问题~~您的gcc版本是?顺便说,这个代码不要sudo make~~我的编译结果(gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu4)):

代码: 全选

cc -c  -g -Wall -o lrmi.o lrmi.c
ar -rs liblrmi.a lrmi.o
ar: creating liblrmi.a
cc -c  -g -Wall -fPIC -o lrmi.lo lrmi.c
cc  -g -Wall -Wl,-soname,liblrmi.so.0 -fPIC -shared -o liblrmi.so.0.10 lrmi.lo
ln -sf liblrmi.so.0.10 liblrmi.so.0
ln -sf liblrmi.so.0 liblrmi.so
cc  -g -Wall -o vbetest vbetest.c liblrmi.a
头像
pllion
帖子: 216
注册时间: 2008-11-09 9:06

Re: 求高手编译!!!!!!!!!!!!!!!!

#5

帖子 pllion » 2009-11-08 15:34

我gcc version 4.4.4.1-ubuntu2。
能不能把你编译好的文件发到我的邮箱[email protected]?谢谢 !
viewtopic.php?f=33&t=172235
Sometimes I wonder will God ever forgive us for what we've done to each other? Then I look around and I realize,God left this place a long time ago.
enthumelon
帖子: 86
注册时间: 2006-11-29 10:18
来自: USTC
联系:

Re: 求高手编译!!!!!!!!!!!!!!!!

#6

帖子 enthumelon » 2009-11-08 21:34

已经发送~请查收。
zldrobit
帖子: 27
注册时间: 2011-02-28 0:27

Re: 求高手编译!!!!!!!!!!!!!!!!

#7

帖子 zldrobit » 2011-02-28 0:36

编译atitvout(里边有lrmi vbetest)时,lrmi.c中的一些宏定义出错IF_MASK等.需要
打上atitvout 0.4-13的补丁。atitvout的作者在0.4版本后就不再更新维护了,debian
ubuntu的人发布的0.4-13.其实只需加上宏定义的补丁就可以了,就只有几行。lrmi就可
以通过编译了。

只需要在lrmi.c的开头加上:

#if defined(__linux__) && !defined(TF_MASK)
#define TF_MASK X86_EFLAGS_TF
#define IF_MASK X86_EFLAGS_IF
#define VIF_MASK X86_EFLAGS_VIF
#define IOPL_MASK X86_EFLAGS_IOPL
#endif


就可以了:)
回复