The manual is intended to help in the building of OpenSCADA from source texts. In the process of accumulation of experience of building OpenSCADA for different OS Linux distributions and others platforms generally, the document will be appended by the features and details of the building in the environments.
Pre-configuration of the built program on the latest versions of OpenSCADA is not required if used when building the "openscada-res" resource package or the source tree from the SVN repository, even after a direct build. Therefore, immediately after building and installation, the program is ready for use!
Building OpenSCADA from source texts requires experience in building free software, as well as basic knowledge of the Linux OS and the used Linux distribution. That will allow you to correctly satisfy dependencies and solve possible building problems.
As a build system, the OpenSCADA project uses a set of utilities AutoTools. Any building of the project under the control of AutoTools is preceded by the configuration stage for the OS environment, and sometimes the formation of the building system itself. The configuration stage, as well as the direct building, is always carried out and does not depend on whether it is a direct building or a package building.
AutoTools utilities autoconf, automake and libtool must be installed to create a building system. General formation can be done with the command autoreconf -if. A previously formed building system may sometimes need to be reformatted, for example, in the case of a significant difference between the OS environment of the formation and the current one! Reformation of the building system is also carried out by the previously defined formation command.
The configuration of the building system is carried out by calling the configure command. By specifying arguments to this command, you can enable-disable an OpenSCADA function or module. You can get the entire list of available OpenSCADA configuration parameters and modules by specifying the configure --help argument.
OpenSCADA modules are enabled and disabled by passing the arguments configure --enable-{ModName} and configure --disable-{ModName} . When selecting modules, you can specify the policy "Enable all modules" — configure --enable-AllModuls or "Disable all modules" — configure --disable-AllModuls, and further enable-disable individual modules, whichever is easier. Most OpenSCADA modules can be linked (embedded) directly into the OpenSCADA core library, rather than being built as a separate library, for which the configure --enable-{ModName}=incl argument must be specified.
Generically you can build OpenSCADA in three binary configurations, operating the core library place by the argument configure --enable-CoreLibStatic:
Upon successful completion of the configuration, a summary result of the settings will be generated, with which you can check the main points.
Before building, you need to decide on the source of the source texts, FTP/HTTP-server or SVN-repository, and the branch of OpenSCADA that you will build. Since the LTS branch is automatically built for many Linux distributions, is rarely updated and its version changes with the release of a new LTS, this guide will consider the assembly of the working branch (Work), which, in turn, is automatically compiled for a limited range of Linux distributions, often changes and its address always the same, unless you count the revision number. As a rule, the building of the LTS branch is carried out in the same way, and in the instructions "Work" should be replaced with the LTS version and the name of the source text package should be changed. In general, the names of packages and folders should be treated carefully, because they can differ from version to version!
Building must be done as a normal user, although for isolated environments it can also be done as a superuser. At the same time, variants for installation and execution will be considered both globally — in the system, and locally — in the user's folder. We accept the user's login (account) as "user".
Log in as a normal user and replace the "user" account with yours, decide on the installation method (global or local) and follow the instructions:
Steps of preparation the source tree for building:
mkdir ~/projects
cd ~/projects
wget http://ftp.oscada.org/OpenSCADA/Work/openscada-1+r2920.tar.xz
wget http://ftp.oscada.org/OpenSCADA/Work/openscada-res-1+r2920.tar.xz
tar -xvf openscada-1+r2920.tar.xz
cd openscada-1+r2920
tar -xvf ../openscada-res-1+r2920.tar.xz
svn co http://oscada.org/svn/trunk/OpenSCADA/
cd OpenSCADA
autoreconf -ivf
Steps of the global building:
./configure
make
su # Entry for superuser
make install
exit
openscada
Steps of the local building:
mkdir ~/OScadaW
./configure --prefix=/home/user/OScadaW
make
make install
cd ~/OScadaW/bin
./openscada
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:
mkdir ~/build
cd ~/build
wget http://ftp.oscada.org/OpenSCADA/Work/openscada-1+r2920.tar.xz
wget http://ftp.oscada.org/OpenSCADA/Work/openscada-res-1+r2920.tar.xz
tar -xvf openscada-1+r2920.tar.xz
cd openscada-1+r2920
tar -xvf ../openscada-res-1+r2920.tar.xz
svn co http://oscada.org/svn/trunk/OpenSCADA/
cd OpenSCADA
ln -s data/debian debian
ln -s data/debian_mod debian
dpkg-buildpackage -rfakeroot
fakeroot debian/rules binary
fakeroot debian/rules build
For building 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 a 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 the RPM packages takes place in a directory with a special structure that is usually created when installing the appropriate distribution package (as "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 RPMBuildDir of RPM Packages of different distributions:
If you have no directory of RPM packets after installing the specialized package, then you need to create it with the command:
install -m 755 -d ~/rpmbuild/{SPECS,SOURCES} # RedHat, CentOS, Mandriva, Fedora
install -m 755 -d /usr/src/packages/{SPECS,SOURCES} # SuSE
install -m 755 -d ~/RPM/{SPECS,SOURCES} # ALTLinux
Building steps at the RPM specification file:
cp openscada-1+r2920.tar.xz openscada-res-1+r2920.tar.xz {RPMBuildDir}/SOURCES
cp openscada.spec {RPMBuildDir}/SPECS
rpmbuild -bb {RPMBuildDir}/SPECS/openscada.spec
rpmbb -i {RPMBuildDir}/SPECS/openscada.spec
Building steps for the SRPMS package:
rpmbuild --rebuild openscada-1+r2920.src.rpm
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).
PORTDIR_OVERLAY="/usr/local/portage"
cd /usr/local/portage/dev-util/openscada
wget http://ftp.oscada.org/OpenSCADA/LTS/Gentoo/openscada-0.9.4.ebuild.tar.bz2
tar -xvf openscada-0.9.4.ebuild.tar.bz2
dev-util/openscada
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
dev-util/openscada dcon demo http javalikecalc mysql qtcfg qtstarter ssl vision webcfg webcfgd webvision blockcalc dbarch dbase doc flibcomplex1 flibmath flibsys fsarch logiclev modbus serial sockets sqlite vcaengine
emerge -q openscada
An area of application of the package manager and packages IPKG has builtin 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 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".
Documents/How_to/Build_from_source/en - GFDL | December 2024 | OpenSCADA 1+r3000 |