LinuxSir.cn,穿越时空的Linuxsir!

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

linux-2.6.14-rc2-mm2 编译不通过

[复制链接]
发表于 2005-10-14 12:22:50 | 显示全部楼层 |阅读模式
make
  CHK     include/linux/version.h
  CHK     include/linux/compile.h
  CHK     usr/initramfs_list
  CC      fs/reiser4/debug.o
In file included from fs/reiser4/lock.h:15,
                 from fs/reiser4/context.h:14,
                 from fs/reiser4/debug.c:25:
fs/reiser4/txnmgr.h: In function `spin_atom_init':
fs/reiser4/txnmgr.h:512: error: duplicate case value
fs/reiser4/txnmgr.h:512: error: previously used here
fs/reiser4/txnmgr.h: In function `spin_txnh_init':
fs/reiser4/txnmgr.h:513: error: duplicate case value
fs/reiser4/txnmgr.h:513: error: previously used here
fs/reiser4/txnmgr.h: In function `spin_txnmgr_init':
fs/reiser4/txnmgr.h:514: error: duplicate case value
fs/reiser4/txnmgr.h:514: error: previously used here
In file included from fs/reiser4/context.h:14,
                 from fs/reiser4/debug.c:25:
fs/reiser4/lock.h: In function `spin_stack_init':
fs/reiser4/lock.h:198: error: duplicate case value
fs/reiser4/lock.h:198: error: previously used here
In file included from fs/reiser4/znode.h:16,
                 from fs/reiser4/tree.h:15,
                 from fs/reiser4/super.h:9,
                 from fs/reiser4/debug.c:26:
fs/reiser4/jnode.h: In function `spin_jnode_init':
fs/reiser4/jnode.h:344: error: duplicate case value
fs/reiser4/jnode.h:344: error: previously used here
fs/reiser4/jnode.h: In function `spin_jload_init':
fs/reiser4/jnode.h:348: error: duplicate case value
fs/reiser4/jnode.h:348: error: previously used here
In file included from fs/reiser4/super.h:9,
                 from fs/reiser4/debug.c:26:
fs/reiser4/tree.h: In function `spin_epoch_init':
fs/reiser4/tree.h:169: error: duplicate case value
fs/reiser4/tree.h:169: error: previously used here
In file included from fs/reiser4/debug.c:26:
fs/reiser4/super.h: In function `spin_super_init':
fs/reiser4/super.h:379: error: duplicate case value
fs/reiser4/super.h:379: error: previously used here
make[2]: *** [fs/reiser4/debug.o] Error 1
make[1]: *** [fs/reiser4] Error 2
make: *** [fs] Error 2
发表于 2005-10-14 13:14:12 | 显示全部楼层
打这个补丁试试看

  1. diff --git a/spin_macros.h b/spin_macros.h
  2. --- a/spin_macros.h
  3. +++ b/spin_macros.h
  4. @@ -82,8 +82,6 @@ typedef struct reiser4_rw_data {
  5. static inline void spin_ ## NAME ## _init(TYPE *x) \
  6. { \
  7. __ODCA("nikita-2987", x != NULL); \
  8. - cassert(sizeof(x->FIELD) != 0); \
  9. - memset(& x->FIELD, 0, sizeof x->FIELD); \
  10. spin_lock_init(& x->FIELD.lock); \
  11. } \
  12. \
  13. @@ -236,7 +234,6 @@ typedef struct { int foo; } NAME ## _spi
  14. static inline void rw_ ## NAME ## _init(TYPE *x) \
  15. { \
  16. __ODCA("nikita-2988", x != NULL); \
  17. - memset(& x->FIELD, 0, sizeof x->FIELD); \
  18. rwlock_init(& x->FIELD.lock); \
  19. } \
  20. \

复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-14 13:41:53 | 显示全部楼层
http://lkml.org/lkml/2005/9/30/45

It seems to appear when CONFIG_SMP=N and CONFIG_DEBUG_SPINLOCK=N and
CONFIG_REISER4_DEBUG=N.

In this case, spinlock_t is an empty struct (see
include/linux/spinlock_types.h and
include/linux/spinlock_types_up.h). Then sizeof(spinlock_t) _is_ 0,
and this breaks some code like cassert calls from
fs/reiser4/spin_macros.h line 85 (FIELD is a spinlock_t) :
     82 static inline void spin_ ## NAME ## _init(TYPE *x)      \
     83 {                                                       \
     84         __ODCA("nikita-2987", x != NULL);               \
     85         cassert(sizeof(x->FIELD) != 0);                 \

     86         memset(& x->FIELD, 0, sizeof x->FIELD);         \

     87         spin_lock_init(& x->FIELD.lock);                \

     88 }                                                       \
     89
回复 支持 反对

使用道具 举报

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

本版积分规则

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