I've managed to install OpenPLC v3.1 runtime in Arch Linux, adapting install.sh to suit Arch Linux dependencies.
See attached openplc_runtime_w_archlinux_install.sh.
All the installation process went fine, I have OpenPLC webserver running at localhost:8080 and I can upload different programs for testing web interface and generated .st files.
OpenPLC Hardware Layer is Blank Linux at the moment, as intended due the lack of Modbus Slave Devices driver in v3.
I've uploaded a very simple test program generated in BeremizIDE (BTW: PLCOpenEditor from http://www.openplcproject.com refuses to properly work in my system).
The only change I have needed to succefully upload the program in OPLC runtime, is to change CONFIGURATION config to Config0 in generated_ plc.st file (found in build sub directory under my project directory).
Attached generated_ plc.st
Uploading it in OPLC webserver interface brings this results:
<code>
Optimizing ST program...
Generating C files...
POUS.c
POUS.h
LOCATED_VARIABLES.h
VARIABLES.csv
Config0.c
Config0.h
Res0.c
Moving Files...
Compiling for Linux
Generating object files...
Generating glueVars...
varName: __IX0_0 varType: BOOL
varName: __IX0_1 varType: BOOL
varName: __QX0_0 varType: BOOL
Compiling main program...
Compilation finished successfully!
</code>
However, when I try to start program execution (Start PLC button in webserver interface), it fails with "OpenPLC Runtime is not running" message.
Below, terminal OPLC logs:
<code>
[daniel@hardwork OpenPLC_v3]$ ./start_ openplc.sh
* Serving Flask app "webserver" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://0.0.0.0:8080/ (Press CTRL+C to quit)
127.0.0.1 - - [01/Jul/2018 22:11:45] "GET /dashboard HTTP/1.1" 302 -
127.0.0.1 - - [01/Jul/2018 22:11:45] "GET /login HTTP/1.1" 200 -
127.0.0.1 - - [01/Jul/2018 22:11:45] "GET /static/openplc_logo.gif HTTP/1.1" 200 -
127.0.0.1 - - [01/Jul/2018 22:11:55] "POST /login HTTP/1.1" 302 -
127.0.0.1 - - [01/Jul/2018 22:11:55] "GET /dashboard HTTP/1.1" 200 -
127.0.0.1 - - [01/Jul/2018 22:11:55] "GET /static/default-user.png HTTP/1.1" 200 -
127.0.0.1 - - [01/Jul/2018 22:11:55] "GET /static/home-icon-64x64.png HTTP/1.1" 200 -
127.0.0.1 - - [01/Jul/2018 22:11:55] "GET /static/programs-icon-64x64.png HTTP/1.1" 200 -
127.0.0.1 - - [01/Jul/2018 22:11:55] "GET /static/arrow.png HTTP/1.1" 200 -
127.0.0.1 - - [01/Jul/2018 22:11:55] "GET /static/modbus-icon-512x512.png HTTP/1.1" 200 -
127.0.0.1 - - [01/Jul/2018 22:11:55] "GET /static/hardware-icon-980x974.png HTTP/1.1" 200 -
127.0.0.1 - - [01/Jul/2018 22:11:55] "GET /static/monitoring-icon-64x64.png HTTP/1.1" 200 -
127.0.0.1 - - [01/Jul/2018 22:11:55] "GET /static/users-icon-64x64.png HTTP/1.1" 200 -
127.0.0.1 - - [01/Jul/2018 22:11:55] "GET /static/settings-icon-64x64.png HTTP/1.1" 200 -
127.0.0.1 - - [01/Jul/2018 22:11:55] "GET /static/logout-icon-64x64.png HTTP/1.1" 200 -
127.0.0.1 - - [01/Jul/2018 22:11:55] "GET /runtime_logs HTTP/1.1" 200 -
127.0.0.1 - - [01/Jul/2018 22:11:56] "GET /runtime_logs HTTP/1.1" 200 -
127.0.0.1 - - [01/Jul/2018 22:11:57] "GET /runtime_logs HTTP/1.1" 200 -
127.0.0.1 - - [01/Jul/2018 22:11:58] "GET /runtime_logs HTTP/1.1" 200 -
127.0.0.1 - - [01/Jul/2018 22:11:59] "GET /runtime_logs HTTP/1.1" 200 -
127.0.0.1 - - [01/Jul/2018 22:12:00] "GET /runtime_logs HTTP/1.1" 200 -
./core/openplc: error while loading shared libraries: libasiodnp3.so: cannot open shared object file: No such file or directory
OpenPLC Runtime is not running. Error: [Errno 111] Connection refused
127.0.0.1 - - [01/Jul/2018 22:12:01] "GET /runtime_logs HTTP/1.1" 200 -
Openning database
Enabling Modbus on port 5020
Enabling DNP3 on port 20000
127.0.0.1 - - [01/Jul/2018 22:12:02] "GET /start_plc HTTP/1.1" 302 -
127.0.0.1 - - [01/Jul/2018 22:12:02] "GET /dashboard HTTP/1.1" 200 -
127.0.0.1 - - [01/Jul/2018 22:12:02] "GET /runtime_logs HTTP/1.1" 200 -
127.0.0.1 - - [01/Jul/2018 22:12:03] "GET /runtime_logs HTTP/1.1" 200 -
</code>
Note the log: ./core/openplc: error while loading shared libraries: libasiodnp3.so: cannot open shared object file: No such file or directory.
However, I have all required shared libraries under /usr/local/lib/
-rwxr-xr-x 1 root root 764048 jul 1 20:40 libasiodnp3.so
-rwxr-xr-x 1 root root 471352 jul 1 20:38 libasiopal.so
-rwxr-xr-x 1 root root 1599960 jul 1 20:38 libopendnp3.so
-rwxr-xr-x 1 root root 49152 jul 1 20:36 libopenpal.so
Is /usr/local/lib/ the directory on which OPLC runtime search for shared libraries, or I mus to move /copy them ontoanother directory?
Your answer will be welcome.
Best regards,
DanielH