Re: Luminous RC1 build.c can't pass compile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 19, 2017 at 2:52 PM, Dun Pengcheng <dunpengcheng@xxxxxxx> wrote:

Pengcheng, you might want to change your local to C. before running
make. so the error message can be read by people who don't speak
Chinese.

and https://github.com/ceph/ceph/pull/16424 should address this issue.

> All:
>
> I download Luminous RC1 code and try to make compile environment on my machine. After installing so many required packages in my CentOS 7.1, I got “Makefile” in the root directory from “cmake -LH” command.  After that, I input "make" command to build the branch, But I found "build.c" can't pass compile. Messages are followed.
>
> [root@cephadmin ceph-12.1.0]# make
> [  0%] Built target Boost
> [  0%] Built target Boost.boost
> [  0%] Built target compressor_objs
> [  1%] Building C object src/CMakeFiles/crush_objs.dir/crush/builder.c.o
> In file included from /root/code/ceph-12.1.0/src/crush/builder.c:5:0:
> /root/code/ceph-12.1.0/src/include/assert.h:25:1: 错误:未知的类型名‘class’


seems you are building builder.c using c++

>  class CephContext;
>  ^
> /root/code/ceph-12.1.0/src/include/assert.h:65:37: 错误:expected declaration specifiers or ‘...’ before ‘CephContext’
>  extern void register_assert_context(CephContext *cct);
>                                      ^
> In file included from /root/code/ceph-12.1.0/src/crush/crush_compat.h:6:0,
>                  from /root/code/ceph-12.1.0/src/crush/crush.h:7,
>                  from /root/code/ceph-12.1.0/src/crush/builder.c:8:
> /root/code/ceph-12.1.0/src/crush/builder.c: 在函数‘crush_add_rule’中:
> /root/code/ceph-12.1.0/src/include/assert.h:118:6: 错误:‘static_cast’未声明(在此函数内第一次使用)
>     ? static_cast<void> (0)    \
>       ^
> /root/code/ceph-12.1.0/src/crush/builder.c:75:3: 附注:in expansion of macro ‘assert’
>    assert(r < CRUSH_MAX_RULES);
>    ^
> /root/code/ceph-12.1.0/src/include/assert.h:118:6: 附注:每个未声明的标识符在其出现的函数内只报告一次
>     ? static_cast<void> (0)    \
>       ^
> /root/code/ceph-12.1.0/src/crush/builder.c:75:3: 附注:in expansion of macro ‘assert’
>    assert(r < CRUSH_MAX_RULES);
>    ^
> /root/code/ceph-12.1.0/src/include/assert.h:118:18: 错误:expected expression before ‘void’
>     ? static_cast<void> (0)    \
>                   ^
> /root/code/ceph-12.1.0/src/crush/builder.c:75:3: 附注:in expansion of macro ‘assert’
>    assert(r < CRUSH_MAX_RULES);
>    ^
> /root/code/ceph-12.1.0/src/crush/builder.c: 在函数‘crush_rule_set_step’中:
> /root/code/ceph-12.1.0/src/include/assert.h:118:6: 错误:‘static_cast’未声明(在此函数内第一次使用)
>     ? static_cast<void> (0)    \
>       ^
> /root/code/ceph-12.1.0/src/crush/builder.c:120:2: 附注:in expansion of macro ‘assert’
>   assert((__u32)n < rule->len);
>   ^
> /root/code/ceph-12.1.0/src/include/assert.h:118:18: 错误:expected expression before ‘void’
>     ? static_cast<void> (0)    \
>                   ^
> /root/code/ceph-12.1.0/src/crush/builder.c:120:2: 附注:in expansion of macro ‘assert’
>   assert((__u32)n < rule->len);
>   ^
> /root/code/ceph-12.1.0/src/crush/builder.c: 在函数‘crush_remove_bucket’中:
> /root/code/ceph-12.1.0/src/include/assert.h:118:6: 错误:‘static_cast’未声明(在此函数内第一次使用)
>     ? static_cast<void> (0)    \
>       ^
> /root/code/ceph-12.1.0/src/crush/builder.c:181:8: 附注:in expansion of macro ‘assert’
>         assert(pos < map->max_buckets);
>         ^
> /root/code/ceph-12.1.0/src/include/assert.h:118:18: 错误:expected expression before ‘void’
>     ? static_cast<void> (0)    \
>                   ^
> /root/code/ceph-12.1.0/src/crush/builder.c:181:8: 附注:in expansion of macro ‘assert’
>         assert(pos < map->max_buckets);
>         ^
> /root/code/ceph-12.1.0/src/crush/builder.c: 在函数‘crush_make_tree_bucket’中:
> /root/code/ceph-12.1.0/src/include/assert.h:118:6: 错误:‘static_cast’未声明(在此函数内第一次使用)
>     ? static_cast<void> (0)    \
>       ^
> /root/code/ceph-12.1.0/src/crush/builder.c:13:19: 附注:in expansion of macro ‘assert’
>  #define BUG_ON(x) assert(!(x))
>                    ^
> /root/code/ceph-12.1.0/src/crush/builder.c:386:2: 附注:in expansion of macro ‘BUG_ON’
>   BUG_ON(bucket->node_weights[bucket->num_nodes/2] != bucket->h.weight);
>   ^
> /root/code/ceph-12.1.0/src/include/assert.h:118:18: 错误:expected expression before ‘void’
>     ? static_cast<void> (0)    \
>                   ^
> /root/code/ceph-12.1.0/src/crush/builder.c:13:19: 附注:in expansion of macro ‘assert’
>  #define BUG_ON(x) assert(!(x))
>                    ^
> /root/code/ceph-12.1.0/src/crush/builder.c:386:2: 附注:in expansion of macro ‘BUG_ON’
>   BUG_ON(bucket->node_weights[bucket->num_nodes/2] != bucket->h.weight);
>   ^
> /root/code/ceph-12.1.0/src/crush/builder.c: 在函数‘crush_make_choose_args’中:
> /root/code/ceph-12.1.0/src/include/assert.h:118:6: 错误:‘static_cast’未声明(在此函数内第一次使用)
>     ? static_cast<void> (0)    \
>       ^
> /root/code/ceph-12.1.0/src/crush/builder.c:13:19: 附注:in expansion of macro ‘assert’
>  #define BUG_ON(x) assert(!(x))
>                    ^
> /root/code/ceph-12.1.0/src/crush/builder.c:1425:3: 附注:in expansion of macro ‘BUG_ON’
>    BUG_ON(space + size != ids_end);
>    ^
> /root/code/ceph-12.1.0/src/include/assert.h:118:18: 错误:expected expression before ‘void’
>     ? static_cast<void> (0)    \
>                   ^
> /root/code/ceph-12.1.0/src/crush/builder.c:13:19: 附注:in expansion of macro ‘assert’
>  #define BUG_ON(x) assert(!(x))
>                    ^
> /root/code/ceph-12.1.0/src/crush/builder.c:1425:3: 附注:in expansion of macro ‘BUG_ON’
>    BUG_ON(space + size != ids_end);
>    ^
> /root/code/ceph-12.1.0/src/include/assert.h:118:18: 错误:expected expression before ‘void’
>     ? static_cast<void> (0)    \
>                   ^
> /root/code/ceph-12.1.0/src/crush/builder.c:13:19: 附注:in expansion of macro ‘assert’
>  #define BUG_ON(x) assert(!(x))
>                    ^
> /root/code/ceph-12.1.0/src/crush/builder.c:1450:3: 附注:in expansion of macro ‘BUG_ON’
>    BUG_ON((char*)weight_set_ends != (char*)weight_set);
>    ^
> /root/code/ceph-12.1.0/src/include/assert.h:118:18: 错误:expected expression before ‘void’
>     ? static_cast<void> (0)    \
>                   ^
> /root/code/ceph-12.1.0/src/crush/builder.c:13:19: 附注:in expansion of macro ‘assert’
>  #define BUG_ON(x) assert(!(x))
>                    ^
> /root/code/ceph-12.1.0/src/crush/builder.c:1451:3: 附注:in expansion of macro ‘BUG_ON’
>    BUG_ON((char*)weights_end != (char*)weights);
>    ^
> /root/code/ceph-12.1.0/src/include/assert.h:118:18: 错误:expected expression before ‘void’
>     ? static_cast<void> (0)    \
>                   ^
> /root/code/ceph-12.1.0/src/crush/builder.c:13:19: 附注:in expansion of macro ‘assert’
>  #define BUG_ON(x) assert(!(x))
>                    ^
> /root/code/ceph-12.1.0/src/crush/builder.c:1452:3: 附注:in expansion of macro ‘BUG_ON’
>    BUG_ON((char*)ids != (char*)ids_end);
>    ^
> make[2]: *** [src/CMakeFiles/crush_objs.dir/crush/builder.c.o] 错误 1
> make[1]: *** [src/CMakeFiles/crush_objs.dir/all] 错误 2
> make: *** [all] 错误 2
>
> Who can tell me how to resolve the problem. Thanks
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Regards
Kefu Chai
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux