Author: Roman Savochenko, Constantine
This manual made for help on OpenSCADA building from the source texts. In process of accumulation of experience of building OpenSCADA for different OS Linux distributions and others platforms generally, the document will be complemented by the features and details of the building in a variety of environments.
In the latest versions of OpenSCADA, you do not need to pre-configure the building of the program when you use the "openscada-res" package or the source texts tree from the SVN repository when you build it, even after the direct building. Therefore, immediately after the building and installation, the program is ready for use!
To build OpenSCADA from the source code, you need the experience of a opensource program building, as well as basic knowledge of the Linux operating system and the used Linux distribution, which will allow you to adequately satisfy the dependencies and solve the possible building problems.
The OpenSCADA project, as a build system, uses a set of utilities AutoTools. Any building of a project under the control of "AutoTools" precedes the configuration stage, and sometimes the formation of the build system, under the environment of the OS.
To create the build system, the AutoTools utility must be installed: "autoconf", "automake" and "libtool". The general formation can be done by the command $ autoreconf -if. A previously formed build system may sometimes require reformatting, for example, in the case of a significant difference in the OS environment on which the build system was formed and current! Reformation of the build system is also carried out by the previously defined formation command.
The configuration of the build system is called by the command $ configure. By defining the arguments for this command, you can enable-disable the OpenSCADA function or module. You can get the entire list of available configuration options and OpenSCADA modules by specifying the argument --help.
The enabling and disabling of OpenSCADA modules is by passing the arguments --enable-{ModName} and --disable-{ModName}. When selecting modules, you can specify "the Enable All Modules" --enable-AllModuls or "Disable All Modules" --disable-AllModuls, and then enable-disable individual modules, depending on what will be easier. Most OpenSCADA modules can be linked(embedded) directly into the OpenSCADA core library, rather than built by a separate library, which specifies the argument --enable-{ModName}=incl.
Upon completion of the configuration, a summary of the settings will be formed, by which you can check the desired configuration.
Before building, you need to define source of the source texts ftp/http server or SVN repository, and the OpenSCADA branch you will build. Since the LTS branch is automatically built for many Linux distributions, it is rarely updated and its version changes with the release of the new LTS, then in this manual we will consider a building of the work branch (Work) which, in turn, is automatically built for a limited circle of Linux distributions, often changes and its address always the same. Building of LTS branches, as a rule, is carried out in the same way and in the instructions it is necessary to replace the "Work" with the version of LTS and change the name of the package of the source texts. In general, the names of packages and folders should be treated carefully, because they, from version to version, may differ!
The building should be performed from the name of the ordinary user, although it can be from the superuser for isolated environments. This will consider the variants of installation and execution both globally — in the system and locally — in the user's directory. We accept the login(account) of the user — "user".
Entering as an ordinary user and replacing the "user" account with your account, considering the installation method (global or local) and follow the instructions:
Steps of preparation of the source tree to build:
Steps of the global building:
Steps of the local building:
To build OpenSCADA RPM packages, you will need source texts archives, resources, and a RPM package specification file (openscada.spec, openscada_mod_ALT.spec, openscada_mod_RH.spec), or an SRPM package of all these source materials.
The RPM package specification file and the SRPM package may differ for different Linux distributions, taking into account their features, so you should try to load them according to the distribution. If there is no special SRPM packet then you can try to build from the unified specification file (openscada.spec) in the main SRPM package or resource packet.
Building of RPM packages takes place in a directory with a special structure that is usually created when installing the appropriate distribution package (for example: rpm-build). This directory, depending on the distribution, is located in the user's home directory or in the /usr/src directory. Known facts of location of the directory of RPM Packages of different distributions:
If you do not have the directory of RPM packets after installing the specialized package, then you need to create it with the command:
Building steps at the RPM specification file:
Building steps for the SRPMS package:
In order to build OpenSCADA DEB packages, you will need archives of source texts and resources.
Building of DEB packages is located in the "debian" folder with build scripts contained in archives of the OpenSCADA source texts.
Building steps:
OpenSCADA is not included to the official portage Gentoo tree, so the building is made from the overlay. Before the building of the OpenSCADA package itself, portage will satisfy dependencies, ie build the missing packages (if necessary).
$ emerge -vp openscada These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ~] dev-util/openscada-0.9 USE="mysql ssl -bfn -blockcalc -daqgate -dbarch -dbase -dcon -demo -diamondboards -doc (-firebird) -flibcomplex1 -flibmath -flibsys -fsarch -http -icp_das -javalikecalc -logiclev -modbus -portaudio -qtcfg -qtstarter -selfsystem -serial -simens -snmp -sockets -sqlite -system -systemtest -vcaengine -vision -webcfg -webcfgd -webvision" 79,647 kB [1] Total: 1 package (1 reinstall), Size of downloads: 79,647 kB Portage tree and overlays: [0] /usr/portage [1] /usr/local/portage
An area of application of the package manager and packages IPKG has built-in Linux environments with limited amount of memory, such as wireless routers. Accordingly, the building of IPKG packages is a part of the build systems of such environments, and the description of this procedure can not be considered separately from the build system itself, so for the creation of IPKG packages of OpenSCADA read in the section "OpenWrt distributive of the subproject OpenSCADA generic embedding and programmable logical controllers (PLC)".
The operating system Android is a Linux-kernel based software that is primarily designed and used on mobile phones, smartphones, tablets, and other touch-screened devices. The third-party software for Android is distributed in the form of APK-packages, the building of which can not be considered apart from the build environment of the Android SDK, NDK and a building of all dependencies of OpenSCADA, so read on the subject of the building of OpenSCADA and the creation of its APK-packages in the sub-project "OpenSCADA adaption to the software platform Android".