Closed Chiff closed 3 years ago
Hi Cliff Many many thanks for your improvements! This is important for me, in particular because pysimCoder is developed only by me in my spare time, and I need more feedback to find out all the problems!
Forcing to work with python3 is a good idea. Probably most of the users have already python pointing to python3, but forcing to avoid the use of python 2 is a good idea!
I can completely understand the problem with pyblock.h in LinuxRT. pyblock.h is now in a common include folder and this is included in the template Makefiles through COMMON_INCDIR = $(PYCODEGEN)/Common/include Can you give me more info about this problem? My idea is that pyblock.h is common to all targets, and should remain in this common folder, thus is important to correct your problem!
Your modifications in the setup files are very important to help installing pysimCoder directly in Linux. This is probably one of the reason that blocks more people to use it (together, of course, with little problems already present in the graphic editor...)
Thanks again! Roberto
Hi @robertobucher
thank you for your quick reply.
python3
to python
was a case but I didn't know it was possible - I am not working with this technologypyblock.h
- this one is funny, I wanted to reproduce the issue but I could not - it seems this problem happens only in the first installation. I reverted my machine to the snapshot I took at the beginning (clean state without any dependencies installed). Later, when running make
as superuser there is a goal full_lib
(points to the makefile in LinuxRT/devices
)debian@debian:~/Desktop/pysimCoder/CodeGen/LinuxRT/devices$ make all
cc -c -g -I/CodeGen/Common/include -I../include comedi_digital_input.c
comedi_digital_input.c:21:10: fatal error: pyblock.h: No such file or directory
#include <pyblock.h>
^~~~~~~~~~~
compilation terminated.
make: *** [Makefile:45: comedi_digital_input.o] Error 1
LinuxRT/devices/Makefile
relies on variable called $PYSUPSICTRL
which is empty and resulting path of COMMON_DIR
is /Codegen/Common
. If I modify that makefile like thisallfiles:
PYSUPSICTRL=$(PYSUPSICTRL)
COMMON_DIR=$(COMMON_DIR)
GENERIC_INC=$(GENERIC_INC)
it outputs
root@debian:/home/debian/Desktop/pysimCoder# make
...
cd CodeGen/LinuxRT/devices; make all
make[1]: Entering directory '/home/debian/Desktop/pysimCoder/CodeGen/LinuxRT/devices'
PYSUPSICTRL= ## <- my tmp change to log variable
COMMON_DIR=/CodeGen/Common ## <- my tmp change log variable
GENERIC_INC=/CodeGen/Common/include ## <- my tmp change log variable
cc -c -g -I/CodeGen/Common/include -I../include comedi_digital_input.c
comedi_digital_input.c:21:10: fatal error: pyblock.h: No such file or directory
#include <pyblock.h>
^~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:48: comedi_digital_input.o] Error 1
make[1]: Leaving directory '/home/debian/Desktop/pysimCoder/CodeGen/LinuxRT/devices'
make: *** [Makefile:33: full_lib] Error 2
I hope it helps you enough to fix this
Martin
TLDR; for pyblock.h
running command cc -c -g -I/CodeGen/Common/include -I../include comedi_digital_input.c
has incorrect path /CodeGen/Common
and that's a reason why is copied that file to LinuxRT/include
- there is relative path ../include
pyblock.h
to LinuxRT includesI have spent few hours figuring out how to make pysimCoder run. In this PR, I fixed installation scripts (*.py) and switched to python3 because the
Slycot
library dropped python2 in versionv0.3.3
and because of thatmake
command would fail. Also, there were some problems with includingpyblock.h
file and something was messed up with python2/python3 libraries.After my changes, I managed to install and run pysimCoder in few minutes on fresh Debian installation.
Feel free to close this PR if there was something in my installation process I have missed. However, in that case, I would like to see some steps on how to install pysimCoder without my changes.
Thanks, Martin