erpc-io / eRPC

Efficient RPCs for datacenter networks
https://erpc.io/
Other
840 stars 138 forks source link

A few compile warnings and errors in applications #11

Closed yiwenzhang92 closed 5 years ago

yiwenzhang92 commented 5 years ago

Hi Anuj,

Thank you for open-sourcing eRPC and keeping it well-maintained. I can build apps like "small_rpc_tput" if I take out Werror, but I encounter some errors when building other apps. I raise this issue to ask for some hints if possible :)

First of all, my current setting (CloudLab Apt Utah): NIC: Connect-X3 pro (IB) driver: MLXN_OFED 4.2-1.0.0.0 OS: ubuntu-14.04 gcc: 8.1.0 cmake: 3.12.0 gflags: 2.2.1 glogs: 0.3.5 hugepages and shared memory are configured and I'm using InfiniBand I configure cmake using cmake . -DPERF=ON -DTRANSPORT=infiniband I'm using commit (latest one at master)

Now the issues:

<1> Compile Warnings: basically 2 types. -warning (1): ``` In file included from /users/yiwenzhg/eRPC/src/rpc_impl/rpc_queues.cc:1: /users/yiwenzhg/eRPC/src/rpc.h: In instantiation of ‘void erpc::Rpc::reset_dpath_stats() [with TTr = erpc::IBTransport]’: /users/yiwenzhg/eRPC/src/rpc_impl/rpc_queues.cc:80:1: required from here /users/yiwenzhg/eRPC/src/rpc.h:366:36: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct erpc::Rpc::’; use assignment or value-initialization instead [-Wclass-memaccess] void reset_dpath_stats() { memset(&dpath_stats, 0, sizeof(dpath_stats)); } ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /users/yiwenzhg/eRPC/src/rpc.h:1011:10: note: ‘struct erpc::Rpc::’ declared here struct { ``` -warning (2): ``` cc1plus: warning: unrecognized command line option ‘-Wno-keyword-macro’ cc1plus: warning: unrecognized command line option ‘-Wno-nested-anon-types’ ``` <2> build error in app "latency": ``` /users/yiwenzhg/eRPC/apps/latency/latency.cc:106:26: error: variable or field ‘app_cont_func’ declared void void app_cont_func(erpc::RespHandle *, void *, size_t); ^~~~~~~~~~ /users/yiwenzhg/eRPC/apps/latency/latency.cc:106:26: error: ‘RespHandle’ is not a member of ‘erpc’ /users/yiwenzhg/eRPC/apps/latency/latency.cc:106:26: note: suggested alternative: ‘ReqHandle’ void app_cont_func(erpc::RespHandle *, void *, size_t); ``` <3> build error in app "masstree-analytics": ``` cc1plus: fatal error: /users/yiwenzhg/masstree-beta/config.h: No such file or directory ``` which looks for config.h under anujkaliaiitd/masstree-beta. Thanks! Best regards, Yiwen
anujkaliaiitd commented 5 years ago

Thanks! Fixed in 3398a27928cc472306622479c7a85ec6bd08afe5, 9d9ed60119929db999c98bdd69a1fd65ac44476a, and 7e50dbf8ae8a51e888f7db8a127b1d7d27bccd3f.

The error in the latency application is due to a recent eRPC API simplification that removes the RespHandle class. Some apps still need to be updated to use the new API.

yiwenzhang92 commented 5 years ago

Thanks Anuj,

I confirm all issues are resolved. I really appreciate it.

Best, Yiwen