Skip to content

compile error #9

@lwh1990

Description

@lwh1990

hi,i meet some errors when compile the code. After I type "make build && cd build && cmake .."

it shows:
/home/lwh/rdma_bench-master/libhrd_cpp/hrd_conn.cc: In function ‘hrd_ctrl_blk_t* hrd_ctrl_blk_init(size_t, size_t, size_t, hrd_conn_config_t*, hrd_dgram_config_t*)’:
/home/lwh/rdma_bench-master/libhrd_cpp/hrd_conn.cc:105:26: error: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Werror=sign-conversio ]
cb->dgram_buf_mr = ibv_reg_mr(cb->pd, const_cast<uint8_t*>(cb->dgram_buf),
^~~~~~~~~~
/home/lwh/rdma_bench-master/libhrd_cpp/hrd_conn.cc:110:26: error: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Werror=sign-conversio ]
cb->dgram_buf_mr = ibv_reg_mr(cb->pd, const_cast<uint8_t*>(cb->dgram_buf),
^~~~~~~~~~
/home/lwh/rdma_bench-master/libhrd_cpp/hrd_conn.cc:143:25: error: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Werror=sign-conversio ]
cb->conn_buf_mr = ibv_reg_mr(cb->pd, const_cast<uint8_t*>(cb->conn_buf),
^~~~~~~~~~
/home/lwh/rdma_bench-master/libhrd_cpp/hrd_conn.cc:151:25: error: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result [-Werror=sign-conversio ]
cb->conn_buf_mr = ibv_reg_mr(cb->pd, const_cast<uint8_t*>(cb->conn_buf),
^~~~~~~~~~
/home/lwh/rdma_bench-master/libhrd_cpp/hrd_conn.cc: In function ‘void hrd_create_dgram_qps(hrd_ctrl_blk_t*)’:
/home/lwh/rdma_bench-master/libhrd_cpp/hrd_conn.cc:236:33: error: aggregate ‘hrd_create_dgram_qps(hrd_ctrl_blk_t*)::ibv_exp_cq_init_attr cq_init_attr’ has incomplete type and cannot be defined
struct ibv_exp_cq_init_attr cq_init_attr;
^~~~~~~~~~~~
/home/lwh/rdma_bench-master/libhrd_cpp/hrd_conn.cc:239:28: error: ‘ibv_exp_create_cq’ was not declared in this scope
cb->dgram_send_cq[i] = ibv_exp_create_cq(
^~~~~~~~~~~~~~~~~
/home/lwh/rdma_bench-master/libhrd_cpp/hrd_conn.cc:239:28: note: suggested alternative: ‘ibv_create_cq’
cb->dgram_send_cq[i] = ibv_exp_create_cq(
^~~~~~~~~~~~~~~~~
ibv_create_cq
/home/lwh/rdma_bench-master/libhrd_cpp/hrd_conn.cc:253:33: error: aggregate ‘hrd_create_dgram_qps(hrd_ctrl_blk_t*)::ibv_exp_qp_init_attr create_attr’ has incomplete type and cannot be defined
struct ibv_exp_qp_init_attr create_attr;
^~~~~~~~~~~
/home/lwh/rdma_bench-master/libhrd_cpp/hrd_conn.cc:256:9: error: ‘IBV_EXP_QP_INIT_ATTR_PD’ was not declared in this scope
IBV_EXP_QP_INIT_ATTR_PD | IBV_EXP_QP_INIT_ATTR_CREATE_FLAGS;
^~~~~~~~~~~~~~~~~~~~~~~
/home/lwh/rdma_bench-master/libhrd_cpp/hrd_conn.cc:256:9: note: suggested alternative: ‘IBV_QP_INIT_ATTR_PD’
IBV_EXP_QP_INIT_ATTR_PD | IBV_EXP_QP_INIT_ATTR_CREATE_FLAGS;
^~~~~~~~~~~~~~~~~~~~~~~
IBV_QP_INIT_ATTR_PD
/home/lwh/rdma_bench-master/libhrd_cpp/hrd_conn.cc:256:35: error: ‘IBV_EXP_QP_INIT_ATTR_CREATE_FLAGS’ was not declared in this scope
IBV_EXP_QP_INIT_ATTR_PD | IBV_EXP_QP_INIT_ATTR_CREATE_FLAGS;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lwh/rdma_bench-master/libhrd_cpp/hrd_conn.cc:256:35: note: suggested alternative: ‘IBV_QP_INIT_ATTR_CREATE_FLAGS’
IBV_EXP_QP_INIT_ATTR_PD | IBV_EXP_QP_INIT_ATTR_CREATE_FLAGS;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IBV_QP_INIT_ATTR_CREATE_FLAGS
/home/lwh/rdma_bench-master/libhrd_cpp/hrd_conn.cc:270:23: error: ‘ibv_exp_create_qp’ was not declared in this scope
cb->dgram_qp[i] = ibv_exp_create_qp(cb->resolve.ib_ctx, &create_attr);
^~~~~~~~~~~~~~~~~
/home/lwh/rdma_bench-master/libhrd_cpp/hrd_conn.cc:270:23: note: suggested alternative: ‘ibv_create_qp’
cb->dgram_qp[i] = ibv_exp_create_qp(cb->resolve.ib_ctx, &create_attr);
^~~~~~~~~~~~~~~~~
ibv_create_qp
/home/lwh/rdma_bench-master/libhrd_cpp/hrd_conn.cc:274:28: error: aggregate ‘hrd_create_dgram_qps(hrd_ctrl_blk_t*)::ibv_exp_qp_attr init_attr’ has incomplete type and cannot be defined
struct ibv_exp_qp_attr init_attr;
^~~~~~~~~
/home/lwh/rdma_bench-master/libhrd_cpp/hrd_conn.cc:284:9: error: ‘ibv_exp_modify_qp’ was not declared in this scope
ibv_exp_modify_qp(cb->dgram_qp[i], &init_attr, init_comp_mask) == 0,
^~~~~~~~~~~~~~~~~
/home/lwh/rdma_bench-master/libhrd_cpp/hrd_conn.cc:284:9: note: suggested alternative: ‘ibv_modify_qp’
ibv_exp_modify_qp(cb->dgram_qp[i], &init_attr, init_comp_mask) == 0,
^~~~~~~~~~~~~~~~~
ibv_modify_qp
/home/lwh/rdma_bench-master/libhrd_cpp/hrd_conn.cc:288:28: error: aggregate ‘hrd_create_dgram_qps(hrd_ctrl_blk_t*)::ibv_exp_qp_attr rtr_attr’ has incomplete type and cannot be defined
struct ibv_exp_qp_attr rtr_attr;
^~~~~~~~
/home/lwh/rdma_bench-master/libhrd_cpp/hrd_conn.cc:296:28: error: aggregate ‘hrd_create_dgram_qps(hrd_ctrl_blk_t*)::ibv_exp_qp_attr rts_attr’ has incomplete type and cannot be defined
struct ibv_exp_qp_attr rts_attr;
^~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/sender-scalability.dir/build.make:76: CMakeFiles/sender-scalability.dir/libhrd_cpp/hrd_conn.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/sender-scalability.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

How can i fix it? Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions