rFaaS
rFaaS copied to clipboard
(compile error) unimplemented: non-trivial designated initializers not supported
Hi, really excellent work! The research we were doing wanted to perform a performance comparison with rFaaS, but I got an error when compiling.
OS: Ubuntu 18.04.6 LTS Kernel: Linux 4.15.0-46-generic MLNX_OFED_LINUX-4.9-3.1.5.0 with 100Gbs Infiniband g++-7.5.0
I use rm -rf CMakeFiles && rm CMakeCache.txt && cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release /root/rFaaS && cmake --build .
Then I got a compile error: ... [ 50%] Building CXX object CMakeFiles/executor_manager.dir/server/executor_manager/cli.cpp.o In file included from /root/rFaaS/server/executor_manager/cli.cpp:16:0: /root/rFaaS/server/executor_manager/manager.hpp: In member function ‘void rfaas::executor_manager::ResourceManagerConnection::close_lease(int32_t, uint64_t, uint64_t, uint64_t)’: /root/rFaaS/server/executor_manager/manager.hpp:82:7: sorry, unimplemented: non-trivial designated initializers not supported }; ^ /root/rFaaS/server/executor_manager/manager.hpp:82:7: sorry, unimplemented: non-trivial designated initializers not supported /root/rFaaS/server/executor_manager/manager.hpp:82:7: sorry, unimplemented: non-trivial designated initializers not supported /root/rFaaS/server/executor_manager/manager.hpp:82:7: sorry, unimplemented: non-trivial designated initializers not supported /root/rFaaS/server/executor_manager/manager.hpp:82:7: warning: missing initializer for member ‘rfaas::common::LeaseDeallocation::execution_time’ [-Wmissing-field-initializers] /root/rFaaS/server/executor_manager/manager.hpp:75:49: warning: parameter ‘allocation_time’ set but not used [-Wunused-but-set-parameter] void close_lease(int32_t lease_id, uint64_t allocation_time, uint64_t execution_time, uint64_t hot_polling_time) ^~~~~~~~~~~~~~~ /root/rFaaS/server/executor_manager/manager.hpp:75:75: warning: parameter ‘execution_time’ set but not used [-Wunused-but-set-parameter] void close_lease(int32_t lease_id, uint64_t allocation_time, uint64_t execution_time, uint64_t hot_polling_time) ^~~~~~~~~~~~~~ /root/rFaaS/server/executor_manager/manager.hpp:75:100: warning: parameter ‘hot_polling_time’ set but not used [-Wunused-but-set-parameter] void close_lease(int32_t lease_id, uint64_t allocation_time, uint64_t execution_time, uint64_t hot_polling_tim) ^~~~~~~~~~~~~~~ CMakeFiles/executor_manager.dir/build.make:75: recipe for target 'CMakeFiles/executor_manager.dir/server/executor_manager/cli.cpp.o' failed
How to solve it please?
I solved this error using the following method:
*reinterpret_cast<common::LeaseDeallocation*>(_send_buffer.data()) = {
// .lease_id = lease_id,
// .allocation_time = allocation_time,
// .hot_polling_time = hot_polling_time,
// .execution_time = execution_time
// modified by me 2023-12-21
lease_id,
allocation_time,
hot_polling_time,
execution_time
};
@LiuMicheal Thank you for using rFaaS and raising this issue!
The issue is likely in the GCC version, which does not support this feature; I will try to apply your fix to make sure we have a wider compatibility with C++ compilers.