erpc-io / eRPC

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

Compiling error with dpdk-19.11 on Ubuntu 18.04 #39

Closed zarzen closed 4 years ago

zarzen commented 4 years ago

Hi Anuj,

I got an error while compiling the eRPC on ubuntu 18.04. Here is the log

# output from
~/eRPC$ cmake . -DPERF=OFF -DTRANSPORT=dpdk
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found GTest: /usr/lib/libgtest.a
-- Compilation not optimized for performance.
-- Profile-guided optimization is disabled.
-- Logging level = warn.
-- Debugging is enabled. Perf will be low.
-- Testing is enabled. Performance will be low.
-- LTO is disabled. Performance will be low.
-- Boost version: 1.65.1
-- Boost include directory = /usr/include
-- Selected transport = dpdk.
-- Compiling eRPC as a library
-- No autorun_app_file found. No application will be compiled.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/eRPC
# Then errors
In file included from /home/ubuntu/eRPC/src/transport_impl/dpdk/dpdk_transport.cc:8:0:
/home/ubuntu/eRPC/src/transport_impl/dpdk/dpdk_transport.h: In static member function ‘static void erpc::DpdkTransport::install_flow_rule(size_t, size_t, uint32_t, uint16_t)’:
/home/ubuntu/eRPC/src/transport_impl/dpdk/dpdk_transport.h:125:69: error: ‘int rte_eth_dev_filter_supported(uint16_t, rte_filter_type)’ is deprecated [-Werror=deprecated-declarations]
     if (rte_eth_dev_filter_supported(phy_port, RTE_ETH_FILTER_NTUPLE) == 0) {
                                                                     ^
In file included from /home/ubuntu/eRPC/src/transport_impl/dpdk/dpdk_transport.h:17:0,
                 from /home/ubuntu/eRPC/src/transport_impl/dpdk/dpdk_transport.cc:8:
/usr/local/include/rte_ethdev.h:3553:5: note: declared here
 int rte_eth_dev_filter_supported(uint16_t port_id,
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/eRPC/src/transport_impl/dpdk/dpdk_transport.cc:8:0:
/home/ubuntu/eRPC/src/transport_impl/dpdk/dpdk_transport.h:139:68: error: ‘int rte_eth_dev_filter_ctrl(uint16_t, rte_filter_type, rte_filter_op, void*)’ is deprecated [-Werror=deprecated-declarations]
                                         RTE_ETH_FILTER_ADD, &ntuple);
....
cc1plus: error: unrecognized command line option ‘-Wno-keyword-macro’ [-Werror]
cc1plus: error: unrecognized command line option ‘-Wno-nested-anon-types’ [-Werror]
cc1plus: all warnings being treated as errors
CMakeFiles/erpc.dir/build.make:470: recipe for target 'CMakeFiles/erpc.dir/src/rpc_impl/rpc_sm_api.cc.o' failed
make[2]: *** [CMakeFiles/erpc.dir/src/rpc_impl/rpc_sm_api.cc.o] Error 1
CMakeFiles/erpc.dir/build.make:182: recipe for target 'CMakeFiles/erpc.dir/src/rpc_impl/rpc_rfr.cc.o' failed
make[2]: *** [CMakeFiles/erpc.dir/src/rpc_impl/rpc_rfr.cc.o] Error 1
CMakeFiles/erpc.dir/build.make:158: recipe for target 'CMakeFiles/erpc.dir/src/rpc_impl/rpc_queues.cc.o' failed
make[2]: *** [CMakeFiles/erpc.dir/src/rpc_impl/rpc_queues.cc.o] Error 1
CMakeFiles/erpc.dir/build.make:374: recipe for target 'CMakeFiles/erpc.dir/src/rpc_impl/rpc_rx.cc.o' failed
make[2]: *** [CMakeFiles/erpc.dir/src/rpc_impl/rpc_rx.cc.o] Error 1
At global scope:
cc1plus: error: unrecognized command line option ‘-Wno-keyword-macro’ [-Werror]
cc1plus: error: unrecognized command line option ‘-Wno-nested-anon-types’ [-Werror]
cc1plus: all warnings being treated as errors
CMakeFiles/erpc.dir/build.make:302: recipe for target 'CMakeFiles/erpc.dir/src/rpc_impl/rpc_ev_loop.cc.o' failed
make[2]: *** [CMakeFiles/erpc.dir/src/rpc_impl/rpc_ev_loop.cc.o] Error 1
At global scope:
cc1plus: error: unrecognized command line option ‘-Wno-keyword-macro’ [-Werror]
cc1plus: error: unrecognized command line option ‘-Wno-nested-anon-types’ [-Werror]
cc1plus: all warnings being treated as errors
CMakeFiles/erpc.dir/build.make:398: recipe for target 'CMakeFiles/erpc.dir/src/rpc_impl/rpc_connect_handlers.cc.o' failed
make[2]: *** [CMakeFiles/erpc.dir/src/rpc_impl/rpc_connect_handlers.cc.o] Error 1
CMakeFiles/Makefile2:363: recipe for target 'CMakeFiles/erpc.dir/all' failed
make[1]: *** [CMakeFiles/erpc.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2

Here is the full version of the log output: log

The system is running on AWS, I have installed dpdk library globally. I see the first part of the errors are due to [-Werror=deprecated-declarations], is it safe to surpass error by removing the -Werror flag here?

anujkaliaiitd commented 4 years ago

Thanks for raising the issue. I see that compiling with DTRANSPORT=dpdk is broken with the latest DPDK (19.11) due to DPDK API changes. I'll get to fixing this.

zarzen commented 4 years ago

@anujkaliaiitd What version is currently supported? I can downgrade to

anujkaliaiitd commented 4 years ago

Sorry for the very late reply. eRPC seems to work with DPDK-19.08.0-rc2.

VoVAllen commented 3 years ago

I met the same issue. Will this be fixed?

skpupil commented 3 years ago

I tried DPDK-19.08.0-rc2 which was downloaded from http://git.dpdk.org/dpdk-stable/commit/?h=19.08&id=83a124fb73c50b051ee20ef6b1998c81be7e65df. It doesn't work!!!