Compilation error:
/home/service/rpc/goya-rpc/src/rpc_server_impl.cc: In member function ‘void goya::rpc::RpcServerImpl::OnCallbackDone(google::protobuf::Message*, boost::shared_ptr<boost::asio::basic_stream_socket<boost::asio::ip::tcp> >)’:
/home/service/rpc/goya-rpc/src/rpc_server_impl.cc:101:44: warning: ‘int google::protobuf::MessageLite::ByteSize() const’ is deprecated (declared at /home/service/rpc/goya-rpc/thirdparty/install/include/google/protobuf/message_lite.h:430): Please use ByteSizeLong() instead [-Wdeprecated-declarations]
int serialized_size = resp_msg->ByteSize();
^
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make[2]: *** [src/CMakeFiles/goya-rpc.dir/rpc_server_impl.cc.o] Error 4
make[1]: *** [src/CMakeFiles/goya-rpc.dir/all] Error 2
make: *** [all] Error 2
The reason for the error is that the compiling machine is running out of memory, and a large number of template extensions need enough memory.
#View linux memory usage by.
1.ps aux --sort -rss
2.free -m
3.top Press [shift + M keys] to arrange them in reverse order
4.cat /proc/meminfo
Solution:
You can solve this problem by temporarily using swap partitions:
=[step 1: operate as follows]=========================================
Sudo DD if=/dev/zero of=/swapfile bs=64m count=16
\count is the size of the increased swap space. 64M is the block size, so the space size is bs*count=1024mb
sudo mkswap /swapfile \=[step 2: close release] ==================================================================================
Sudo swapoff /swapfile
sudo RM /swapfile
then continue to perform your relevant operations…Note: if you still prompt “g++: internal compiler error: killed (program cc1plus)” after creating the temporary space, it may be because the allocated space is not large enough. You can continue to allocate more space.
Read More:
- g++: internal compiler error: Killed (program cc1plus)
- Linux c running error killed
- ninja Compiling the C compiler identification source file CMakeCCompilerId.c failed
- error C2057: expected constant expression (Can the size of an array in C language be defined when the program is running?)
- fatal error C1001: INTERNAL COMPILER ERROR
- Solutions to error c2143: syntax error: missing ‘;’ before ‘type’ in C + + program compilation
- Configuration: error: no acceptable C compiler found in $path error in Linux installation file
- C language string processing error warning, c4996, sprintf, predicted, c4996, strcpy, c4996, strcat
- configure: error: C compiler cannot create executables
- Vscode running C program error luanch:program does not exsist
- cenos Upgrade g++ gcc(cc1plus: error: unrecognized command line option “-std=c++11”)
- The C compiler identification is unknown
- The C compiler identification is unknown solution
- C# Compiler Errors
- Configuration: error: no acceptable C compiler found in $path
- Solve the problem of the C compiler identification is unknown or the cxx compiler identification is unknown in the process of using cmake
- configure: error: no acceptable C compiler found in $PATH
- Three kinds of errors in C + + program
- configure: error: C compiler cannot create executables See `config.log’ for more details
- The problem of C + + compile result window flash by