折腾:
【整理】移植OpenPLC以支持ST编程语言
期间,去试试编辑器
先去下载Editor编辑器:
OpenPLC Editor v1.0
for Linux
./install.sh Installing OpenPLC Editor Please be patient. This may take a couple minutes... [INSTALLING DEPENDENCIES] Password: sudo: apt-get: command not found sudo: apt-get: command not found DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. Requirement already satisfied: future in /Users/crifan/Library/Python/2.7/lib/python/site-packages (0.16.0) Collecting zeroconf==0.19.1 Downloading https://files.pythonhosted.org/packages/6b/88/48dbe88b10098f98acef33218763c5630b0081c7fd0849ab4793b1e9b6d3/zeroconf-0.19.1-py2.py3-none-any.whl Requirement already satisfied: numpy in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (1.8.0rc1) Requirement already satisfied: matplotlib in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (1.3.1) Collecting lxml Downloading https://files.pythonhosted.org/packages/c6/ad/fe41992c0d3f1a8935f35bcfa6ac3f2d2f022959cf2d52651e3a1b432b11/lxml-4.3.4-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (8.7MB) 100% |████████████████████████████████| 8.7MB 38kB/s Collecting pyro Downloading https://files.pythonhosted.org/packages/61/68/0978adae315261b87acd216517c2c7f00780396e4d1426c5412458c6a28f/Pyro-3.16.tar.gz (298kB) 100% |████████████████████████████████| 307kB 52kB/s Collecting sslpsk Downloading https://files.pythonhosted.org/packages/87/1c/b8b5a2d0af9f9a3624d65ce1981777275ac765be45839c4c052018ec715e/sslpsk-1.0.0.tar.gz Collecting enum-compat (from zeroconf==0.19.1) Downloading https://files.pythonhosted.org/packages/95/6e/26bdcba28b66126f66cf3e4cd03bcd63f7ae330d29ee68b1f6b623550bfa/enum-compat-0.0.2.tar.gz Requirement already satisfied: six in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from zeroconf==0.19.1) (1.4.1) Collecting netifaces!=0.10.5 (from zeroconf==0.19.1) Downloading https://files.pythonhosted.org/packages/c9/c9/2c443dee67325b6017bfbef3185f487f1ccb4023f8f475775d1576b41f48/netifaces-0.10.9-cp27-cp27m-macosx_10_13_x86_64.whl Requirement already satisfied: python-dateutil in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from matplotlib) (1.5) Collecting tornado (from matplotlib) Downloading https://files.pythonhosted.org/packages/e6/78/6e7b5af12c12bdf38ca9bfe863fcaf53dc10430a312d0324e76c1e5ca426/tornado-5.1.1.tar.gz (516kB) 100% |████████████████████████████████| 522kB 39kB/s Requirement already satisfied: pyparsing>=1.5.6 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from matplotlib) (2.0.1) Collecting nose (from matplotlib) Downloading https://files.pythonhosted.org/packages/99/4f/13fb671119e65c4dce97c60e67d3fd9e6f7f809f2b307e2611f4701205cb/nose-1.3.7-py2-none-any.whl (154kB) 100% |████████████████████████████████| 163kB 74kB/s Requirement already satisfied: enum34 in /Users/crifan/Library/Python/2.7/lib/python/site-packages (from enum-compat->zeroconf==0.19.1) (1.1.6) Requirement already satisfied: futures in /Users/crifan/Library/Python/2.7/lib/python/site-packages (from tornado->matplotlib) (3.2.0) Requirement already satisfied: singledispatch in /Users/crifan/Library/Python/2.7/lib/python/site-packages (from tornado->matplotlib) (3.4.0.3) Collecting backports_abc>=0.4 (from tornado->matplotlib) Downloading https://files.pythonhosted.org/packages/7d/56/6f3ac1b816d0cd8994e83d0c4e55bc64567532f7dc543378bd87f81cebc7/backports_abc-0.5-py2.py3-none-any.whl Building wheels for collected packages: pyro, sslpsk, enum-compat, tornado Building wheel for pyro (setup.py) ... done Stored in directory: /Users/crifan/Library/Caches/pip/wheels/c5/fa/3f/d751237ebe7c685c597807d8d71f5d0c3f33d285a48f03079c Building wheel for sslpsk (setup.py) ... error Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/46/2hjxz38n22n3ypp_5f6_p__00000gn/T/pip-install-D9MvGf/sslpsk/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/46/2hjxz38n22n3ypp_5f6_p__00000gn/T/pip-wheel-lwj_IQ --python-tag cp27: running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.14-intel-2.7 creating build/lib.macosx-10.14-intel-2.7/sslpsk copying sslpsk/sslpsk.py -> build/lib.macosx-10.14-intel-2.7/sslpsk copying sslpsk/__init__.py -> build/lib.macosx-10.14-intel-2.7/sslpsk creating build/lib.macosx-10.14-intel-2.7/sslpsk/test copying sslpsk/test/__init__.py -> build/lib.macosx-10.14-intel-2.7/sslpsk/test copying sslpsk/test/test_sslpsk.py -> build/lib.macosx-10.14-intel-2.7/sslpsk/test copying sslpsk/test/__main__.py -> build/lib.macosx-10.14-intel-2.7/sslpsk/test running build_ext building 'sslpsk._sslpsk' extension creating build/temp.macosx-10.14-intel-2.7 creating build/temp.macosx-10.14-intel-2.7/sslpsk cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -I/usr/local/opt/zlib/include -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c sslpsk/_sslpsk.c -o build/temp.macosx-10.14-intel-2.7/sslpsk/_sslpsk.o sslpsk/_sslpsk.c:19:10: fatal error: 'openssl/ssl.h' file not found #include <openssl/ssl.h> ^~~~~~~~~~~~~~~ 1 error generated. error: command 'cc' failed with exit status 1 ---------------------------------------- Failed building wheel for sslpsk Running setup.py clean for sslpsk Building wheel for enum-compat (setup.py) ... done Stored in directory: /Users/crifan/Library/Caches/pip/wheels/b1/69/f4/229af6a49beece0f688c9c73d9188769b89e698361d21ce96a Building wheel for tornado (setup.py) ... done Stored in directory: /Users/crifan/Library/Caches/pip/wheels/6d/e1/ce/f4ee2fa420cc6b940123c64992b81047816d0a9fad6b879325 Successfully built pyro enum-compat tornado Failed to build sslpsk Installing collected packages: enum-compat, netifaces, zeroconf, lxml, pyro, sslpsk, backports-abc, tornado, nose Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/enum_compat-0.0.2.dist-info' Consider using the `--user` option or check the permissions. You are using pip version 19.0.3, however version 19.1.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. [COMPILING MATIEC] checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes /Users/crifan/dev/dev_tool/PLC/OpenPLC_Editor/matiec/config/missing: Unknown `--is-lightweight' option Try `/Users/crifan/dev/dev_tool/PLC/OpenPLC_Editor/matiec/config/missing --help' for more information configure: WARNING: 'missing' script is too old or missing checking for a thread-safe mkdir -p... config/install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking for bison... bison -y checking whether make supports the include directive... yes (GNU style) checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking dependency style of gcc... gcc3 checking for flex... flex checking lex output file root... lex.yy checking lex library... -ll checking whether yytext is a pointer... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc3 checking whether ln -s works... yes checking whether make sets $(MAKE)... (cached) yes checking for ranlib... ranlib checking for gawk... (cached) awk ------------------------------------------ Wrong bison version: 2.3 < 2.4 ------------------------------------------ running CONFIG_SHELL=/bin/bash /bin/bash ./configure --no-create --no-recursion checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes /Users/crifan/dev/dev_tool/PLC/OpenPLC_Editor/matiec/config/missing: Unknown `--is-lightweight' option Try `/Users/crifan/dev/dev_tool/PLC/OpenPLC_Editor/matiec/config/missing --help' for more information configure: WARNING: 'missing' script is too old or missing checking for a thread-safe mkdir -p... config/install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking for bison... bison -y checking whether make supports the include directive... yes (GNU style) checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking dependency style of gcc... gcc3 checking for flex... flex checking lex output file root... lex.yy checking lex library... -ll checking whether yytext is a pointer... yes checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc3 checking whether ln -s works... yes checking whether make sets $(MAKE)... (cached) yes checking for ranlib... ranlib checking for gawk... (cached) awk ------------------------------------------ Wrong bison version: 2.3 < 2.4 ------------------------------------------ make: *** [Makefile:385: config.status] Error 1
TODO:有空再折腾。