pydnp3 icon indicating copy to clipboard operation
pydnp3 copied to clipboard

error "c++: internal compiler error: Killed (program cc1plus)" when using command "python setup.py install"

Open andy88980 opened this issue 6 years ago • 4 comments

I was following the step in readme, but when I used the "python setup.py install" the error happened.

andy88980@ubuntu:~/python_work/pydnp3$ sudo python setup.py install running install running bdist_egg running egg_info writing requirements to pydnp3.egg-info/requires.txt writing pydnp3.egg-info/PKG-INFO writing top-level names to pydnp3.egg-info/top_level.txt writing dependency_links to pydnp3.egg-info/dependency_links.txt reading manifest file 'pydnp3.egg-info/SOURCES.txt' writing manifest file 'pydnp3.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_ext CMake build is: Release -- pybind11 v2.3.dev0 CMake build is: Release ASIO has been checked out as a git submodule: /home/andy88980/python_work/pydnp3/deps/dnp3/deps/asio/asio/include -- Configuring done -- Generating done -- Build files have been written to: /home/andy88980/python_work/pydnp3/build/temp.linux-x86_64-2.7 [ 9%] Built target openpal [ 16%] Built target asiopal [ 89%] Built target opendnp3 [ 99%] Built target asiodnp3 [ 99%] Building CXX object CMakeFiles/pydnp3.dir/src/pydnp3.cpp.o c++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-5/README.Bugs for instructions. CMakeFiles/pydnp3.dir/build.make:62: recipe for target 'CMakeFiles/pydnp3.dir/src/pydnp3.cpp.o' failed make[2]: *** [CMakeFiles/pydnp3.dir/src/pydnp3.cpp.o] Error 4 CMakeFiles/Makefile2:70: recipe for target 'CMakeFiles/pydnp3.dir/all' failed make[1]: *** [CMakeFiles/pydnp3.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2 Traceback (most recent call last): File "setup.py", line 72, in zip_safe=False, File "/home/andy88980/.local/lib/python2.7/site-packages/setuptools/init.py", line 145, in setup return distutils.core.setup(**attrs) File "/usr/lib/python2.7/distutils/core.py", line 151, in setup dist.run_commands() File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/home/andy88980/.local/lib/python2.7/site-packages/setuptools/command/install.py", line 67, in run self.do_egg_install() File "/home/andy88980/.local/lib/python2.7/site-packages/setuptools/command/install.py", line 109, in do_egg_install self.run_command('bdist_egg') File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/home/andy88980/.local/lib/python2.7/site-packages/setuptools/command/bdist_egg.py", line 172, in run cmd = self.call_command('install_lib', warn_dir=0) File "/home/andy88980/.local/lib/python2.7/site-packages/setuptools/command/bdist_egg.py", line 158, in call_command self.run_command(cmdname) File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/home/andy88980/.local/lib/python2.7/site-packages/setuptools/command/install_lib.py", line 11, in run self.build() File "/usr/lib/python2.7/distutils/command/install_lib.py", line 111, in build self.run_command('build_ext') File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "setup.py", line 33, in run self.build_extension(ext) File "setup.py", line 59, in build_extension subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp) File "/usr/lib/python2.7/subprocess.py", line 541, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2

I try to create swap to increase RAM size, but it does not work. Is there any idea?

andy88980 avatar Jul 19 '19 11:07 andy88980

I stuck at the 99% too. The computer I am using will simply freeze from there. Did you solve the problem? @andy88980

mzy2240 avatar Sep 08 '19 23:09 mzy2240

I solve the problem by increasing the RAM of my virtual machine. The following website is the tutorial of using the "swap file" to increase the RAM for Ubuntu. https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-18-04

andy88980 avatar Sep 09 '19 06:09 andy88980

Just keep increasing the RAM if the problem still happening.

andy88980 avatar Sep 09 '19 06:09 andy88980

Yes it solves my problem. Thank you very much @andy88980

mzy2240 avatar Sep 12 '19 19:09 mzy2240