LinuxSir.cn,穿越时空的Linuxsir!

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

zhcon、mplayer 都在编译过程中出错中止了

[复制链接]
发表于 2007-1-7 22:04:55 | 显示全部楼层 |阅读模式
如题,make.conf 里已经加入了 ACCEPT_KEYWORDS="~x86",emerge zhcon 和 mplayer 时,顺利下载源码,解压,检查,然后开始编译,但在编译过程中停止并提示出错,如附件图示,看不明白是什么造成的........

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
发表于 2007-1-7 22:58:27 | 显示全部楼层
不是stable的经常会出问题
回复 支持 反对

使用道具 举报

发表于 2007-1-8 09:00:38 | 显示全部楼层
贴bugs.gentoo.org搜索结果
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-1-8 16:04:07 | 显示全部楼层
多谢版主,我在 bugs.gentoo.org 上搜索到了 mplayer 的解决方法,现已解决(我用了sse 的 USE,现在补加 mmx 就好了),

但 zhcon 的问题依然存在,在网上看了些资料,也找到一个“解决方法”的,但作者只列出一些代码,没有做相应解释,我基础有限,看不明白,向版主请教,

另外,eix zhcon 发现要安装的 zhcon 是 0.2.6 版的,但发现下载源码是 0.2.5 的,还有一个 0.2.5 to 0.2.6 的 diff.gz 文件,没有 0.2.6 的,不知道问题是不是在这里,

以下是网上的引文,我用的是 x86,内核版本号和他的相同,gcc 不确定是不是 4.1.1,环境相差不大,但错误信息一样,希望这个引文对解决问题有所帮助:
zhcon0.2.6编译出错
Friday, 24. November 2006, 15:09:21

if i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I.. -DSYSCONF_DIR=\"/etc\" -O2 -march=athlon-xp -pipe -fomit-frame-pointer -fvisibility-inlines-hidden -funsigned-char -O2 -march=i686 -DNDEBUG -Wall -MT zhcon-inputserver.o -MD -MP -MF ".deps/zhcon-inputserver.Tpo" -c -o zhcon-inputserver.o `test -f 'inputserver.cpp' || echo './'`inputserver.cpp; \
then mv -f ".deps/zhcon-inputserver.Tpo" ".deps/zhcon-inputserver.Po"; else rm -f ".deps/zhcon-inputserver.Tpo"; exit 1; fi
/usr/include/linux/wait.h: In function ‘int wait_on_bit(void*, int, int (*)(void*), unsigned int)’:
/usr/include/linux/wait.h:376: 错误:从类型 ‘void*’ 到类型 ‘const volatile long unsigned int*’ 的转换无效
/usr/include/linux/wait.h:376: 错误: 初始化实参 2,属于 ‘int constant_test_bit(int, const volatile long unsigned int*)’
/usr/include/linux/wait.h:376: 错误:从类型 ‘void*’ 到类型 ‘const volatile long unsigned int*’ 的转换无效
/usr/include/linux/wait.h:376: 错误: 初始化实参 2,属于 ‘int variable_test_bit(int, const volatile long unsigned int*)’
/usr/include/linux/wait.h: In function ‘int wait_on_bit_lock(void*, int, int (*)(void*), unsigned int)’:
/usr/include/linux/wait.h:400: 错误:从类型 ‘void*’ 到类型 ‘volatile long unsigned int*’ 的转换无效
/usr/include/linux/wait.h:400: 错误: 初始化实参 2,属于 ‘int test_and_set_bit(int, volatile long unsigned int*)’
make[3]: *** [zhcon-inputmanager.o] 错误 1
make[3]: *** 正在等待未完成的任务....
make[3]: Leaving directory `/var/tmp/portage/app-i18n/zhcon-0.2.6/work/zhcon-0.2.5/src'
make[2]: *** [all-recursive] 错误 1
make[2]: Leaving directory `/var/tmp/portage/app-i18n/zhcon-0.2.6/work/zhcon-0.2.5/src'
make[1]: *** [all-recursive] 错误 1
make[1]: Leaving directory `/var/tmp/portage/app-i18n/zhcon-0.2.6/work/zhcon-0.2.5'
make: *** [all] 错误 2

!!! ERROR: app-i18n/zhcon-0.2.6 failed.
Call stack:
ebuild.sh, line 1568: Called dyn_compile
ebuild.sh, line 937: Called src_compile
ebuild.sh, line 608: Called die

!!! emake failed
!!! If you need support, post the topmost build error, and the call stack if relevant.

gcc4.1.1 gentoo-source-2.6.18

解决方法:


--- /usr/include/linux/wait.h2005-08-16 17:51:20.000000000 +0800
+++ /tmp/wait.h2005-08-16 17:50:57.000000000 +0800
@@ -373,7 +373,7 @@
static inline int wait_on_bit(void *word, int bit,
int (*action)(void *), unsigned mode)
{
-if (!test_bit(bit, word))
+if (!test_bit(bit, (const volatile long unsigned int *)word))
return 0;
return out_of_line_wait_on_bit(word, bit, action, mode);
}
@@ -397,7 +397,7 @@
static inline int wait_on_bit_lock(void *word, int bit,
int (*action)(void *), unsigned mode)
{
-if (!test_and_set_bit(bit, word))
+if (!test_and_set_bit(bit, (volatile long unsigned int *)word))
return 0;
return out_of_line_wait_on_bit_lock(word, bit, action, mode);
}

看近来的帖子,出现类似的错误似乎挺多的,
回复 支持 反对

使用道具 举报

发表于 2007-1-8 16:14:57 | 显示全部楼层
前几天更新,也是加mmx就好了。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-1-8 16:55:41 | 显示全部楼层
Post by 松心心
前几天更新,也是加mmx就好了。

但加了 mmx 后,zhcon 还是不行噢,,5555
回复 支持 反对

使用道具 举报

发表于 2007-1-8 17:14:12 | 显示全部楼层
我的zhcon记不清了,好象我原先去下的最新源码,手动装的。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-1-8 19:02:20 | 显示全部楼层
--- /usr/include/linux/wait.h2005-08-16 17:51:20.000000000 +0800
+++ /tmp/wait.h2005-08-16 17:50:57.000000000 +0800
@@ -373,7 +373,7 @@
static inline int wait_on_bit(void *word, int bit,
int (*action)(void *), unsigned mode)
{
-if (!test_bit(bit, word))
+if (!test_bit(bit, (const volatile long unsigned int *)word))
return 0;
return out_of_line_wait_on_bit(word, bit, action, mode);
}
@@ -397,7 +397,7 @@
static inline int wait_on_bit_lock(void *word, int bit,
int (*action)(void *), unsigned mode)
{
-if (!test_and_set_bit(bit, word))
+if (!test_and_set_bit(bit, (volatile long unsigned int *)word))
return 0;
return out_of_line_wait_on_bit_lock(word, bit, action, mode);
}

想了几个小时,终于明白是什么意思了,应该是指 /usr/include/linux/wait.h 和 /tmp/wait.h 这两个文件的内容不一致而造成这个错误的。不一致的地方在下面的代码中标示出来,带“-”的那行是前一个文件的,带“+”的那行是后一个文件的,而 @@ -373,7 +373,7 @@ 和 @@ -397,7 +397,7 @@ 则指明了这两行代码在原文件中的位置,

/tmp/wait.h 文件是编译时动态生成的,因此只要改动 /usr/include/linux/wait.h 文件使得和编译时生成的文件一致就可以了,也就是把“-”那行改成相应的“+”那行。

改动后,成功编译安装。^_^
回复 支持 反对

使用道具 举报

发表于 2007-1-8 19:09:25 | 显示全部楼层
zhcon的那个补丁是我做的
zhcon目前是我代为维护的
就是那个样子,作者比较懒,连个0.2.6的正式包都不发布
你的linux-header是什么版本,我的是2.6.19,这个问题应该很早以前没有了
回复 支持 反对

使用道具 举报

发表于 2007-1-8 19:11:28 | 显示全部楼层
这种形式的文件叫patch,补丁
回复 支持 反对

使用道具 举报

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

本版积分规则

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