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)
- Mysql cannot allocate memory for the buffer pool solution
- Linux CentOS installing protobuf
- EXSI6.0 virtual machine swap error causes it to fail to start
- Error resolution by Ubuntu: aclocal-1.14 ‘is missing on your system
- Server composer install error: proc_open(): fork failed-Cannot allocate memory
- Solution of Prophet error reporting when installing R package in Kubuntu virtual machine environment
- Error C1001 vs2013, a solution
- Importerror using tensorflow: DLL load failed: the specified program cannot be found
- Failed to extend swap file from 0 kb to xxx kb.
- Linux c running error killed
- Kvm internal error: process exited :cannot set up guest memory ‘pc.ram‘:Cannot allocate memory
- C language write() function analysis: write failed bad address
- caffe deep learning [three] compilation error: fatal error: hdf5.h: No such file or directory compilation terminated.
- write error in swap file problem solving
- Linux configuration SFTP server
- Swap off failed: cannot allocate memory
- RuntimeError: CUDA out of memory. Tried to allocate 600.00 MiB (GPU 0; 23.69 GiB total capacity)
- JVM start error: could not reserve enough space for object heap error
- [Linux] e297: write error in swap file solution