ChargePoint / pydnp3

Python bindings for opendnp3 libary
Apache License 2.0
31 stars 34 forks source link

pydnp3 Install Error #6

Open ManualReader opened 6 years ago

ManualReader commented 6 years ago

I'm trying to get pydnp3 installed on an Ubuntu VM, and am getting the following error. I checked, and the file LinkedList.h exists where the code thinks it should be. Any ideas?

image

anhnguyen-cpi commented 5 years ago

Which ubuntu version are you using? I tried it on Ubuntu 16.04 and it worked fine. Make sure to install required packages by running "pip install -r requirements.txt" before running "python setup.py install".

nosaj66au commented 5 years ago

same issue Ubuntu 16.04 server

[ 99%] Building CXX object CMakeFiles/pydnp3.dir/src/pydnp3.cpp.o In file included from /root/pydnp3/src/AllHeaders.h:215:0, from /root/pydnp3/src/pydnp3.cpp:38: /root/pydnp3/src/openpal/container/LinkedList.h:34:42: fatal error: openpal/container/LinkedList.h: No such file or directory compilation terminated. 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 1 CMakeFiles/Makefile2:70: recipe for target 'CMakeFiles/pydnp3.dir/all' failed make[1]: [CMakeFiles/pydnp3.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: * [all] Error 2 Traceback (most recent call last): File "setup.py", line 72, in zip_safe=False, File "/usr/local/lib/python3.5/dist-packages/setuptools/init.py", line 143, in setup return distutils.core.setup(attrs) File "/usr/lib/python3.5/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/local/lib/python3.5/dist-packages/setuptools/command/install.py", line 67, in run self.do_egg_install() File "/usr/local/lib/python3.5/dist-packages/setuptools/command/install.py", line 109, in do_egg_install self.run_command('bdist_egg') File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/local/lib/python3.5/dist-packages/setuptools/command/bdist_egg.py", line 172, in run cmd = self.call_command('install_lib', warn_dir=0) File "/usr/local/lib/python3.5/dist-packages/setuptools/command/bdist_egg.py", line 158, in call_command self.run_command(cmdname) File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/local/lib/python3.5/dist-packages/setuptools/command/install_lib.py", line 11, in run self.build() File "/usr/lib/python3.5/distutils/command/install_lib.py", line 109, in build self.run_command('build_ext') File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.5/distutils/dist.py", line 974, 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/python3.5/subprocess.py", line 581, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2 root@ubuntu:~/pydnp3#

thejoelpatrol commented 5 years ago

This is probably due to having the wrong version of opendnp3 checked out in the submodule. If you are trying to use a newer version of opendnp3, to take advantage of bug fixes there, you may find that pydnp3/deps/dnp3/cpp/libs/include/openpal/container/LinkedList.h in fact does not exist. I want to use a newer opendnp3, but it seems it may not be supported by pydnp3 yet.